[nsp] BGP question

Bradley Dunn bradley at dunn.org
Thu Sep 11 23:59:27 EDT 2003


Kevin wrote:
> I'm still a newbie at bgp, so please bear with me.
> I have two links to the internet. 
> A lot of routes from both providers have equal AS paths.
> If one bgp session gets reset all that traffic (the equal AS path
> routes) goes out to provider2 and does'nt reset back to provider1,
> providing that the bgp session to provider1 was the first one to come
> up. I don't have any metrics, weights or localpref on any routes.
> Is there any way to have those equal path routes default to provider1
> rather than provider2 if provider1's link and bgp session are up?
> Right now in order to reset those routes back to provider1 I have to do
> a hard "clear ip bgp provider2" reset. 

You're running into step 10 (prefer the oldest path) of cisco's BGP path 
selection process. See:
http://www.cisco.com/warp/public/459/25.shtml

One possible solution would be to set the MED (metric) on incoming 
routes such that provider1's MED is lower than provider2's MED. This 
requires turning on 'bgp always-compare-med'. 'bgp deterministic med' is 
a good idea as well.

Example:
!
! 1.1.1.1 -> provider1   2.2.2.2 -> provider2
router bgp 65000
  neighbor 1.1.1.1 route-map med10 in
  neighbor 2.2.2.2 route-map med20 in
  bgp always-compare-med
  bgp deterministic med
!
route-map med10 permit 10
  set metric 10
!
route-map med20 permit 10
  set metric 20
!
end
!


Bradley



More information about the cisco-nsp mailing list