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

BGP Path Selection - Favor Oldest Routes

Mike Schultz
Level 1
Level 1

I've been poking around in a few test routers trying to find where BGP states how long a route has been known from a neighbor. Based on Cisco's BGP path selection article: http://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/13753-25.html, #10 states BGP prefers the oldest known route. 

 

What command shows the amount of time a route has been known via BGP?

10 Replies 10

vishal vyas
Level 1
Level 1

# show ip bgp summary  will show you peer's up time

Yes, but a peer can stay up but still lose a route through that peer. That age isn't what I'm looking for. Thanks for your reply, though.

 

Anyway to see a particular route's age?

Hello

sh ip bgp neighbors x.x.x.x | in  BGP state

sh ip route x.x.x.x | in Last
 

res

Paul
 


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

Thanks for your reply, Paul.

 

The first command just shows the same timer as the sh ip bgp summary timer. It's just the timer of the neighbor relationship.

 

The second command just displays how long the route has been in the routing table. I've tested this and found that when BGP loses a route to a network and then selects a different path that it had known about, the timer resets to 0. Even though it had known about the path for a while, it still resets to 0. 

 

So thanks to everyone for your responses, but I'm still looking for some way to see the age of a BGP-learned route.

Hello

yes but the surely the only significance  is the valid best route as once that best path of that route is t anymore the age of the new learned path needs to be set to zero as it a new!


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

So what if BGP has 3 routes to a certain network? One will be installed into the routing table, while 2 will not. If the route that is installed in the routing table is lost, BGP will need to choose between the other 2 routes. If all metrics are equal except time known about each route, BGP will choose based on length-of-age. I want to be able to see the age of the two routes before the original route is lost.

 

Hello

Instead of leaving bgp to select via its default path selection criteria  would you want manually choose which route path should take precedence and to be entered in the routers rib through route manipulation of bgp  ( Weight, Pref  As-path, Med etc..)..?

res

Paul

 


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

That's getting sidetracked. My issue isn't path selection manipulation. I can configure BGP to choose whatever path I want it to choose.

Cisco routers choose BGP routes based on a certain set of criteria that we call attributes. I can see all of the attributes except the BGP route age as defined in the link I provided in the OP. There has to be a command that shows it and I want to know that command.

vanoordtm
Level 1
Level 1

I don't know of command that will show you a time stamp of the oldest route in bgp.  However, if you look at the possible paths under a prefix using the command show ip bgp 112.1.1.0, the router automatic orders the paths from newest to oldest.  This information should help in your path selection for rule  #10

eddie.harmoush
Level 1
Level 1

There is no command that shows you the age of a specific path.

As other users have pointed out, there are commands that show you how long a peer has been up, but a peer can remain up while a particular path is learned / unlearned / learned from that same peer. 

The reason there is no command is this information is not tracked or used in the BGP path selection process.

I know, I know... but the path selection process says BGP favors the oldest path. BUT, it doesn't work as most people think. Let me explain...

 

When a NEW path is learned, and the new path has all identical path atributes, the CURRENT BEST path remains as "best". The idea is the current path is likely more stable than the path which was just learned.

When a CURRENT best path is forgotten/lost, then among the REMAINING paths, the next chosen "best" path is the one from the BGP speaker with the best Router ID -- the age of the remaining paths are not considered.

 

The "prefer oldest path"only applies when a new path is learned, not when an best path is forgotten and the speaker is picking among remaining paths.

This is proven and illustrated in detail in the following article:

http://www.practicalnetworking.net/stand-alone/bgp-oldest-path/

 

Review Cisco Networking for a $25 gift card