03-02-2022 12:40 AM
For BGP path selection, one of the path selection criteria says prefer ebgp routes over ibgp. The AD of ebgp is always less than ad for ibgp. So why is there a need of having one of the bgp path selection criteria saying prefer ebgp over ibgp? It should always prefer ebgp routes because of less ad, what was the need of having a specific path selection criteria ??
03-02-2022 04:42 AM
Perhaps it might help if you think about it this way: the specification of BGP (and its path selection criteria) are designed for multi vendor environments. Not all vendors implement AD the way that Cisco does.
03-02-2022 05:31 AM
Hi @parthparnerkar123 ,
We are talking about two different concepts here. First how BGP make the decision on what is considered the best path to a given destination. On the other hand, the AD is used to choose which routes from different sources (ospf, eigrp, static, ibgp, ebgp, etc) will be installed in the routing table.
The BGP best path selection process does not use the AD in order to select the best path. It will prefer ebgp over ibgp regardless of the AD configured. This means that if you were to change the default AD so that ibgp has a lower AD than ebgp, the best path selection process would still prefer ebgp over ibgp.
Hope this helps.
Regards,
03-02-2022 06:17 AM
See a similar example below on what Harold has stated.
Lets say a site has dual wan rtrs that are performing mutual redistribution (bgp/eigrp) and these wan rtrs interconnect internally only via eigrp.
It could be after say an outage to of either wan rtrs external interface, The rtr now has to re-route via its igp connection to the other site wan rtr to reach external networks
Now during the rtrs reconverge and when it is re-established it will for a short period have dual routes in its bgp table for the same prefix(s)
1 via eigrp AD 90/170 but redistributed into bgp when the wan link failed
1 via ebgp AD 20 after the wan link re-established
At this point the rtr needs to choose again, you would think the ebgp prefix would take precedence ebgp/AD 20,no weight,
However an igp redistributed route comes into bgp rib table with a default weight of 32768 and based on bgp best path selection, weight is preferred over ebgp route, So the redistributed eigrp route with an higher AD is selected and installed into the global route table so at that point AD didn’t come into the equation just the best path selection did.
03-02-2022 07:04 AM
eBGP path must be prefer weight/LP/originate/AS-Path!!! before it prefer over iBGP.
iBGP net add it path in AS-Path but eBGP add it Path and hence iBGP always prefer except case that iBGP learn it route from eBGP and re-advertise it to other iBGP peer, this Peer have two path eBGP and iBGP and since the AS-Path is tie then peer prefer the eBGP, and that make sense since it close to Peer than iBGP.
03-03-2022 01:08 AM
If I am not mistaken, If you see BGP routing table like sh ip bgp x.x.x.x, you will not see AD value in the output. That is self-explaintory it will not be used to make any comparison among BGP route.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide