cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1291
Views
0
Helpful
2
Replies

BGP Conditional Advertisement Exist-Map Issue

rick505d3
Level 1
Level 1

Hi,

 

I am using BGP advertise-map and exist-map to conditionally advertise a prefix 10.10.10.10/24 from R2 to R1, only when R2 can receive default-route from R3. I am using "prefix-list" to match on desired prefixes.

 

R1 --- R2 ------- R3

 

 

!!!! R2 config snippet

router bgp 2
  neighbor 192.168.1.1 remote-as 2
  neighbor 192.168.1.1 advertise-map bgp-adv exist-map bgp-exist

route-map bgp-adv permit 10
  match ip address prefix-list bgp-adv
route-map bgp-exist permit 10
  match ip address prefix-list bgp-exist

ip prefix-list bgp-adv seq 10 permit 10.10.10.10/24
ip prefix-list bgp-exist seq 20 permit 0.0.0.0/0

 

R2 always sets the exist-map condition successful, the status is set to Advertise on R2 and R1 receives the 10 route. This is true regardless R2 has received 0.0.0.0/0 from R3 or not.

 

Now for the sake of testing, If I base the conditional check on a normal prefix say 20.20.20.20/24 on R2 (received from R3), the check passes only when the 20 route exists in R2's bgp table. 

 

The BGP conditional check works with a normal prefix but not with a default-route. Is this expected?

 

I am Lab'ing this in GNS3 on 3745 router and IOS 12.4(15)T14.

 

Regards, 

Rick.

2 Replies 2

Hello,

 

post the config you use with the default route...

 

Actually, post the full configs of R1 and R2 you use with the default route...

Hello,

 

I tested in GNS3 with and without a default route, results are as desired. Compare your configs to mine.

 

With default route:

 

R3

 

router bgp 3
bgp router-id 3.3.3.3
bgp log-neighbor-changes
neighbor 192.168.13.1 remote-as 1
neighbor 192.168.13.1 default-originate
neighbor 192.168.13.1 soft-reconfiguration inbound
!
ip route 0.0.0.0 0.0.0.0 null 0

 

R1

 

router bgp 1
bgp router-id 1.1.1.1
bgp log-neighbor-changes
network 1.1.1.1 mask 255.255.255.255
network 10.10.10.10 mask 255.255.255.255
neighbor 192.168.1.2 remote-as 2
neighbor 192.168.1.2 soft-reconfiguration inbound
neighbor 192.168.1.2 advertise-map bgp-adv exist-map bgp-exist
neighbor 192.168.13.3 remote-as 3
neighbor 192.168.13.3 soft-reconfiguration inbound
!
ip prefix-list bgp-adv seq 10 permit 10.10.10.10/32
!
ip prefix-list bgp-exist seq 20 permit 0.0.0.0/0
!
route-map bgp-exist permit 10
match ip address prefix-list bgp-exist
!
route-map bgp-adv permit 10
match ip address prefix-list bgp-adv

 

R1#sh ip bgp

Network Next Hop Metric LocPrf Weight Path
*> 0.0.0.0 192.168.13.3 0 3 i
*> 1.1.1.1/32 0.0.0.0 0 32768 i
*> 2.2.2.2/32 192.168.1.2 0 0 2 i
*> 10.10.10.10/32 0.0.0.0 0 32768 i

 

R2

 

R2#sh ip bgp

Network Next Hop Metric LocPrf Weight Path
*> 0.0.0.0 192.168.1.1 0 1 3 i
*> 1.1.1.1/32 192.168.1.1 0 0 1 i
*> 2.2.2.2/32 0.0.0.0 0 32768 i
*> 10.10.10.10/32 192.168.1.1 0 0 1 i
R2#

-------------------------------------

No default route

 

R3

router bgp 3
bgp router-id 3.3.3.3
bgp log-neighbor-changes
neighbor 192.168.13.1 remote-as 1
neighbor 192.168.13.1 soft-reconfiguration inbound


R1

router bgp 1
bgp router-id 1.1.1.1
bgp log-neighbor-changes
network 1.1.1.1 mask 255.255.255.255
network 10.10.10.10 mask 255.255.255.255
neighbor 192.168.1.2 remote-as 2
neighbor 192.168.1.2 soft-reconfiguration inbound
neighbor 192.168.1.2 advertise-map bgp-adv exist-map bgp-exist
neighbor 192.168.13.3 remote-as 3
neighbor 192.168.13.3 soft-reconfiguration inbound
!
ip prefix-list bgp-adv seq 10 permit 10.10.10.10/32
!
ip prefix-list bgp-exist seq 20 permit 0.0.0.0/0
!
route-map bgp-exist permit 10
match ip address prefix-list bgp-exist
!
route-map bgp-adv permit 10
match ip address prefix-list bgp-adv

R1#sh ip bgp

Network Next Hop Metric LocPrf Weight Path
*> 1.1.1.1/32 0.0.0.0 0 32768 i
*> 2.2.2.2/32 192.168.1.2 0 0 2 i
*> 10.10.10.10/32 0.0.0.0 0 32768 i

 

R2

 

R2#sh ip bgp

Network Next Hop Metric LocPrf Weight Path
*> 1.1.1.1/32 192.168.1.1 0 0 1 i
*> 2.2.2.2/32 0.0.0.0 0 32768 i

 

 

 

Review Cisco Networking for a $25 gift card