Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Community Member

ibgp and ebgp path selection

hello,

if a router learn a network from iBGP and eBGP, and eBGP source has prepend the AS, which one would be preferred path?

assume origin code is incomplete due to redistribution from an ibgp router.

would the longer prefix from eBGP less preferred, or eBGP preferred due to admin distance or rule 9 where eBGP is preferred over iBGP?

1 ACCEPTED SOLUTION

Accepted Solutions

Re: ibgp and ebgp path selection

Hi Sam,

Thank you very much for your feedback and the rating.

Cheers:

Istvan

5 REPLIES

Re: ibgp and ebgp path selection

EBGP would take precendence over IBGP learned route, regardless of prepending.

Sam

Community Member

Re: ibgp and ebgp path selection

thanks lad.

Re: ibgp and ebgp path selection

Hi,

Evaluation of the AS-PATH attribute is well before evaluating if the route is learned from iBGP or eBGP.

Therefore, if the AS-PATH attribute of the iBGP route is shorter, then the BGP process will select the iBGP route.

If both AS-PATH attributes have the same length, then the eBGP route will be selected because its origin code is lower (the origin code of the ibgp route is incomplete, the origin code of the eBGP route is igp, I suppose).

Prefix lengths are not accounted for in the BGP path selection process because different prefix lengths mean different routes.

Admin distance is accounted for only in the routing table process, when the router should select between prefixes learned from different routing protocols.

Cheers:

Istvan

Re: ibgp and ebgp path selection

I agree with Istvan and stand corrected !

My test was flawed, the IGP router redistrubuting prefix has a NH that was unknown to the second IGP router which has the EBGP session. as a result thsi latter RTR was only seeing EBG prefix as best despite the prepending.

Sam

Re: ibgp and ebgp path selection

Hi Sam,

Thank you very much for your feedback and the rating.

Cheers:

Istvan

399
Views
10
Helpful
5
Replies
CreatePlease to create content