BGP best path selection process part-3

10-oldest ebgp peer

This is not actually what step 10 is, though kind of. Here is the selection process for 10 from the Cisco documentation.

“When both paths are external, prefer the path that was received first (the oldest one).”

This one needs a bit of detail to explain. So, the purpose of the oldest route is to maintain route stability in BGP (one of the most important things in all of BGP is stability). What this says is, if I get a route from router 2, and I did not have this route before, it will be installed in my routing table.

Now, I get routers 3 and 4 advertising the same route, after I’ve already chosen a route. Well, I had router 2 selected first, so I won’t change over to the others unless I am told there is a higher priority (higher up in the selection process, like maybe weight or local preference). This is because I’ve had this route through router 2 the longest, and therefore it is the most stable path I know of.

Now comes the confusing part, BGP does NOT track how long it has known a route. This means, it doesn’t know if it learned the route from router 3 or router 4 first. So let’s say router 2 goes down, I lose the route from that neighbor. Now I no longer have an “oldest route” at all, because BGP doesn’t track the age of routes learned. This means that among the routes I have from router 3 and router 4, I will use the lowest RID.

So “oldest route” means all else being equal, I chose this as my route for a reason, and unless you can tell me this other route is better, I’m not changing. If I forget this route, we then skip this test. we will then move on to router ID.

Amusingly enough though, once I select let’s say router 3 based on router ID. That route will now become my “oldest route” for the purposes of BGP routes in future. So if router 2 comes back online, I will go through, see that all other metrics are equal, and I will get to the oldest route step, and decide to keep the route from router 3.

It’s kind of poorly worded and can be a bit confusing, but basically step 10 in the BGP selection process is saying if I have already picked a route, that one wins. Just because another router comes in with a lower router ID doesn’t mean I’m going to shift my traffic over to it, because I’ve already got a perfectly good route in use and I don’t want to risk that the newest route is less stable.

This naturally lowers priority for less stable routes. Let’s say Router 2 has a habit of going down once a week. Well, because router 3 is stable and is my new “oldest route”, I don’t swap over to router 2 every single time it goes down and comes back up, which provides a better connection for the end users. The Internet is all about stability.

TLDR: Step 10 in the process is saying if my route isn’t broken, I don’t see a need to fix it. If it does get broken, move on to step 11.

1 Like