07-31-2011 08:06 PM - edited 03-04-2019 01:08 PM
See attached diagram. I have 3 routers (A,B,C) that are running IBGP. I have another router (D) that is connected to routers (B,C) and running EBGP. I am trying to prepend the as path from router D to router C so that the preferred return path is through router B. This works fine. However, I don't understand why router C stops advertising the prefixes it learns from router D to router A and B once the as path prepends are applied. I would have thought that router C would still advertise the prefixes it learns from router D but with a longer as-path. However, once it learns the prefixes from router D with an extra as-path prepended, it stops advertising the prefixes altogether. Can someone explain this to me?
Configs:
Rtr-A
router bgp 1
bgp log-neighbor-changes
neighbor 10.10.10.38 remote-as 1
neighbor 10.10.10.42 remote-as 1
!
address-family ipv4
neighbor 10.1010.38 activate
neighbor 10.10.10.38 next-hop-self
neighbor 10.10.10.38 default-originate
neighbor 10.10.10.42 activate
neighbor 10.10.10.42 next-hop-self
neighbor 10.10.10.42 default-originate
no auto-summary
no synchronization
exit-address-family
Rtr-B
router bgp 1
bgp log-neighbor-changes
neighbor 10.10.10.21 remote-as 1
neighbor 10.10.10.33 remote-as 2
neighbor 10.10.10.41 remote-as 1
!
address-family ipv4
neighbor 10.10.10.21 activate
neighbor 10.10.10.21 next-hop-self
neighbor 10.10.10.33 activate
neighbor 10.10.10.33 default-originate
neighbor 10.10.10.41 activate
neighbor 10.10.10.41 next-hop-self
no auto-summary
no synchronization
exit-address-family
Rtr-C
router bgp 1
bgp log-neighbor-changes
neighbor 10.10.10.22 remote-as 1
neighbor 10.10.10.29 remote-as 2
neighbor 10.10.10.37 remote-as 1
!
address-family ipv4
neighbor 10.10.10.22 activate
neighbor 10.10.10.22 next-hop-self
neighbor 10.1010.29 activate
neighbor 10.10.10.29 default-originate
neighbor 10.10.10.37 activate
neighbor 10.10.10.37 next-hop-self
no auto-summary
no synchronization
exit-address-family
Rtr-D
router bgp 2
bgp log-neighbor-changes
neighbor 69.8.160.30 remote-as 1
neighbor 69.8.160.34 remote-as 1
!
address-family ipv4
neighbor 10.10.10.30 activate
neighbor 10.10.10.30 route-map outbound out
neighbor 10.10.10.34 activate
neighbor 10.10.10.34 send-community both
neighbor 10.10.10.34 route-map outbounnd out
no auto-summary
no synchronization
network 10.1.1.0 mask 255.255.255.0
network 10.1.2.0 mask 255.255.255.0
exit-address-family
ip prefix-list prefixes seq 5 permit 10.1.1.0/24
ip prefix-list prefixes seq 10 permit 10.1.2.0/24
!
route-map outbound permit 10
match ip address prefix-list prefixes
set as-path prepend 2
07-31-2011 10:41 PM
Hi Charles,
There seems to be a small typo in your Router D configuration: towards the neighbor 10.10.10.34, you are using the route-map outbounnd with an extra "n" in its name.
However, what is probably happening here:
One of the most confusing aspects in BGP is the fact that every BGP speaker announces only the best path towards a destination from its database. It keeps me confused all the time
Best regards,
Peter
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide