cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3084
Views
10
Helpful
6
Replies

Effect of 'bgp bestpath compare-routerid'

Venison Mogambi
Level 1
Level 1

I'm confused about the exact effect of the BGP command 'bgp bestpath compare-routerid'. If you configure this command, it tells the router to use Router ID as the deciding factor in choosing between two identical prefix advertisements. But does that mean it uses Router ID as the first criteria in the Path Selection process? In other words, does this push it to the front, ahead of the usual factors like Weigh, Local Pref, etc.? Or does this just move Router ID up one spot, ahead of Prefer Newer Routes? 

 

6 Replies 6

Seb Rupik
VIP Alumni
VIP Alumni

Hi there,

The documentation states " use the router ID as the tie breaker for best path selection when two identical routes are received from two different peers (all the attributes are the same except for the router ID)" . It can e inferred that is is an additional check used at the end of the normal best-path selection process. It does not replace the entire selection process with a single step.

 

cheers,

Seb.

 

https://www.cisco.com/c/en/us/td/docs/ios/iproute_bgp/command/reference/irg_book/irg_bgp1.html

Yes, but the Router-ID comparison is itself part of the normal BGP path selection process (the second-to-last one checked). If Router-ID comparison is enabled by default, as part of the normal path selection process, then why specifically have a command telling the router to use it? My guess is that it must have some effect, like maybe moving Router-ID up the list? 

 

Enabling that command will cause it to skip step 10 (assuming comparison is between eBGP peers), and jump straight to step 11 (and beyond) for the tie-break.

https://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/13753-25.html

 

cheers,

Seb.

Martin L
VIP
VIP

 

it is used to skip step of comparing and preferring older routes.  this is useful if you worry about route/routers flapping (going up/down) and also increases your BGP network stability.  

Also, some books has mentioned that this step of comparing lowest router-id is only active if you have command 'bgp bestpath compare-routerid' turn on, which would indicate to me that some IOS versions and/or routers do not have it on,

 

Regards, ML
**Please Rate All Helpful Responses **

Hello @Martin L ,

my understanding is that without the command, if the two candidate paths are eBGP the older is taken.

So normally the Step 11 would be used as a tie breaker only if the remaining candidate paths are iBGP .

With the command discussed in this threas this critera is used also for the case of eBGP candidate paths skipping Step 10 that would give more importance to the older path a sign of stability.

 

On the other hand the use of the command bgp bestpath compare-routerid would make the choice of the best path to be more deterministic as BGP Router-IDs are not going to change  over time (unless there is a need and a configuration change)

 

Hope to help

Giuseppe

 

Hello
Instead of selecting two identical routes based on the first route received (oldest path), BGP will select based on the lowest RID of the routes as best path, so in essence step 10 in the bgp best path section process will be skipped when this feature is enabled.


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul
Review Cisco Networking for a $25 gift card