cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
762
Views
45
Helpful
5
Replies

BGP path selection

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 ??

5 Replies 5

Richard Burts
Hall of Fame
Hall of Fame

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.

HTH

Rick

Harold Ritter
Cisco Employee
Cisco Employee

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,

 

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México

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. 


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

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. 

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.

Review Cisco Networking for a $25 gift card