cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
775
Views
10
Helpful
5
Replies

ibgp and ebgp path selection

chinkevi_2
Level 1
Level 1

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

Hi Sam,

Thank you very much for your feedback and the rating.

Cheers:

Istvan

View solution in original post

5 Replies 5

cisco_lad2004
Level 5
Level 5

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

Sam

thanks lad.

Istvan_Rabai
Level 7
Level 7

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

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

Hi Sam,

Thank you very much for your feedback and the rating.

Cheers:

Istvan

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: