0%
BGP Best Path Selection
BGP Best Path Selection
BGP Best Path Selection
N
WLLA
OMNI
MAR-CL N
N for Valid Next hop
W for Weight - Highest because heavier weight,
if same between 2 different paths to same destination then move on
L for Local Preference - Highest preference because one is preferred 'over' the other
if same between 2 different paths to same destination then move on
L for Locally originated perferred over learned from peers (both local pref and this has local) in its name
Cisco achieves this by assigning weight of 32768 to locally originated routes
If no locally originated prefix exists in the BGP table for the paths being compared
A for AS Path - shortest is preferred - to keep latency low
If same AS Path between 2 different paths to same destination then move on
O for Origin - this refers to origin codes, i for IGP and ? For incomplete / redistributed
i or IGP is preferred over ? or incomplete
if same between 2 different paths to same destination then move on
M for MED, lowest MED or lowest cost is preferred,
This check is only done if the first hop AS is identical in the paths being compared
(can be changed), If the first hop AS is different
or the MED is identical is same between 2 different paths to same destination
then move to next
N for Neighbor type - ibgp or ebgp, routes learned from ebgp are preferred over ibgp
if all paths were learned from the same type of peer, move on to next
I for IGP Metric, The path with the lower IGP metric of next hop address is preferred
If the IGP metrics are identical on different paths to same destination then move on
M for Multipathing, if configured lets BGP keep 2 or more best paths as second best and ends here
and so on, if multipathing is not allowed (default) then move on
A for Age - when routes are learned from ebgp peer, route that was learned first (oldest / most aged)
wins, logic is that the longer a route has been in the BGP Table, the more stable
that path must be, This does not apply to iBGP routes
if Age is same on different paths to same destination then move on
R for Router ID, Prefer the path that is learned from the peer with the lower BGP Router-ID.
Usually this is a tie breaker and algorithm stops here because no 2 routers in BGP network should have
same Router IDs, If 2 different paths with same destination have same RID (that can only happen if 2x
routes are coming from same neighbor and that is also because this peer has multipath on) then move on
CL for Cluster List Length, The path with the minimum Cluster List Length
is preferred. (This only comes into play in BGP Route-Reflector environments)
If the Cluster List Length is identical, move on
N for Nieghbor address, This is the catch-all rule in the best path selection process
Path with lower neighbor address will be preferrred You cannot configure multiple
neighbors with the same IP address, so it is impossible for this step to result in a tie