Case -1 ADVRTISE-MAP with EXIST-MAP
R1
router bgp 101
bgp asnotation dot
bgp log-neighbor-changes
network 11.11.11.11 mask 255.255.255.255
neighbor 3.3.3.3 remote-as 101
neighbor 3.3.3.3 update-source Loopback0
neighbor 3.3.3.3 route-reflector-client
neighbor 3.3.3.3 next-hop-self
neighbor 3.3.3.3 advertise-map ADVERTISE exist-map NON
{ if 69.0.0.0/11 is present in BGP table , we will advertise 11.11.11.11/32 to neighbor, otherwise will drop}
int lo10
ip add 11.11.11.11 255.255.255.255
ip prefix-list ADD seq 5 permit 11.11.11.11/32
!
ip prefix-list NON seq 5 permit 69.0.0.0/11
!
route-map ADVERTISE permit 10
match ip address prefix-list ADD
!
route-map NON permit 10
match ip address prefix-list NON
R6
router bgp 1.301
bgp asnotation dot
bgp log-neighbor-changes
network 66.6.6.6 mask 255.255.255.255
aggregate-address 69.0.0.0 255.224.0.0 {Advertising summary route }
R1
we can see status is advertise as 69.0.0.0/11 is in bgp table.
R1#sh ip bgp nei 3.3.3.3 | in Condition-map
Condition-map NON, Advertise-map ADVERTISE, status: Advertise
R3
R3#sh ip bgp | in 11
*>i 11.11.11.11/32 1.1.1.1 0 100 0 i
*>i 69.0.0.0/11 1.1.1.1 0 100 0 1.301 i
*>i 111.111.111.111/32
Now we are removing aggregate address from R6
R6
R6(config)#router bgp 1.301
R6(config-router)#no aggregate-address 69.0.0.0 255.224.0.0
R1
R1#sh ip bgp | in 69
* i 69.1.1.0/24 6.6.6.6 0 100 0 1.301 ?
* i 69.2.1.0/24 6.6.6.6 0 100 0 1.301 ?
* i 69.3.1.0/24 6.6.6.6 0 100 0 1.301 ?
* i 69.4.1.0/24 6.6.6.6 0 100 0 1.301 ?
R1#
We can see now it is withdraw status as 69.0.0.0/11 is not present in bgp table.
R1#sh ip bgp nei 3.3.3.3 | in Condition-map
Condition-map NON, Advertise-map ADVERTISE, status: Withdraw
R3
R3#sh ip bgp | in 11
*>i 111.111.111.111/32 No BGP prefix for 69.0.0.0/11 and 11.11.11.11/32
Case 2-ADVRTISE-MAP with NON-EXIST-MAP
R1
router bgp 101
neighbor 3.3.3.3 remote-as 101
neighbor 3.3.3.3 update-source Loopback0
neighbor 3.3.3.3 route-reflector-client
neighbor 3.3.3.3 next-hop-self
neighbor 3.3.3.3 advertise-map ADVERTISE non-exist-map NON
{ if 69.0.0.0/11 is not present in BGP table , we will advertise 11.11.11.11/32 to neighbor, otherwise will drop}
R1
we can see status is advertise as 69.0.0.0/11 is not in bgp table.
R1#sh ip bgp nei 3.3.3.3 | in Condition-map
Condition-map NON, Advertise-map ADVERTISE, status: Advertise
R1#
As we don't have 69.0.0.0/11 in bgp table status is advertise
R1#sh ip bgp | in 69
* i 69.1.1.0/24 6.6.6.6 0 100 0 1.301 ?
* i 69.2.1.0/24 6.6.6.6 0 100 0 1.301 ?
* i 69.3.1.0/24 6.6.6.6 0 100 0 1.301 ?
* i 69.4.1.0/24 6.6.6.6 0 100 0 1.301 ?
R1#
R3
R3#sh ip bgp | in 11
*>i 11.11.11.11/32 1.1.1.1 0 100 0 i
*>i 111.111.111.111/32
Now 69.0.0.0/11 will be advertise in R6 so it would be in R1 bgp table
R6(config-router)#router bgp 1.301
R6(config-router)# aggregate-address 69.0.0.0 255.224.0.0
R1
R1#sh ip bgp | in 69
* i 69.0.0.0/11 6.6.6.6 0 100 0 1.301 i
R1#sh ip bgp nei 3.3.3.3 | in Condition-map
Condition-map NON, Advertise-map ADVERTISE, status: Withdraw
R3
We can see no 11.11.11.11/32 in bgp table
R3#sh ip bgp | in 11
*>i 69.0.0.0/11 1.1.1.1 0 100 0 1.301 i
*>i 111.111.111.111/32
R3#
No comments:
Post a Comment