Conditional advertisement allows the BGP speaker to advertise a set of BGP prefixes to a peer only if certain other prefixes are present or not present in the local BGP table.
We will advertise route 55.55.55.0 towards R4 if we don't see route for 5.5.5.0 in loacl BGP table of R2
R2#
interface FastEthernet0/0
ip address 12.1.1.2 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/1
ip address 24.1.1.2 255.255.255.0
duplex auto
speed auto
!
router bgp 123
no synchronization
bgp log-neighbor-changes
network 2.2.2.0 mask 255.255.255.0
neighbor 12.1.1.1 remote-as 123
neighbor 12.1.1.1 next-hop-self
neighbor 24.1.1.4 remote-as 400
neighbor 24.1.1.4 send-community
neighbor 24.1.1.4 advertise-map ADVERTISE non-exist-map MATCH-ROUTE
no auto-summary
!
access-list 10 permit 5.5.5.0 0.0.0.255
access-list 20 permit 55.55.55.0 0.0.0.255
no cdp log mismatch duplex
!
route-map MATCH-ROUTE permit 10
match ip address 10
!
route-map ADVERTISE permit 10
match ip address 20
As we see 5.5.5.0 prefix inn the BGP table of R2, Currently we see on router R4 there is only one path present in the BGP table for 55.55.55.0
Shut down the Lo0 interface on R5
we see there is now no route for 5.5.5.0 in R2 which matches the condition and 55.55.55.0 prefix is advertised by R2
we here see on R4 two paths for prefix 55.55.55.0/24
No comments:
Post a Comment