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

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

iBGP and eBGP question

Hi All,

If a router running both iBGP and eBGP, iBGP local preference is 250, eBGP local preference 100, be default, what's the route it should choose? and Why?

Thank you,

18 REPLIES
Silver

Re: iBGP and eBGP question

Hi!

The e-BGP route will always be installed in the routing table as the admin distance for e-bgp is 20 while that for i-bgp is 200.

Only when selecting among routes that belong to the same admin distance (all are ibgp or all are ebgp), then the bgp route selection process is followed as given in the following doc. :

http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a0080094431.shtml

Regards,

Niranjan

(pls rate helpful posts)

Cisco Employee

Re: iBGP and eBGP question

Niranjan,

The AD will not come into play in such a case. The decision will be made based on the BGP best path decision process that you are referring to.

The two paths will first be compared, the best one will be selected and then be installed in the RIB. In the particular scenario explained by the original poster, the iBGP path would be selected since its local preference is 250 vs. 100 for the ebgp learnt path.

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
Silver

Re: iBGP and eBGP question

Hi Harold!

Thanks for the correction! I terribly messed it up. (Have to brush up the things again). Prefer ebgp over ibgp is itself a rule (#7) in the path selection criteria. So the local pref will play first and the ibgp path will be selected. So the ebgp and ibgp AD will come into picture only when comparing with other routing protocols. :).

Got it! Thanks.

Cheers!

Niranjan

Blue

Re: iBGP and eBGP question

Niranjan:

Just my 2 cents...

The AD will be the deciding BGP attribute for route selection only when all previous attributes are equal.

Victor

Cisco Employee

Re: iBGP and eBGP question

Victor,

AD will never be used between two BGP paths. AD is only used to prefer one protocol over the other.

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
Blue

Re: iBGP and eBGP question

Harold:

The way I interpreted step 7 of the BGP route selection process, in which eBGP is selected over iBGP -- given everything else being equal, of course -- was that eBGP was being selected because it has a better (lower) AD than iBGP. Perhaps I am wrong.

If it is not the AD of iBGP and eBGP that are compared in step 7 of the BGP route selection process, why then is eBGP automatically selected over iBGP? What is being compared?

Victor

Cisco Employee

Re: iBGP and eBGP question

Victor,

Step 7 simply compares the routes based on whether they are external (eBGP) or internal (iBGP). The AD has nothing to do with it. You could for instance change the AD for eBGP to 201 (making it worst than iBGP (200)) and the BGP best path selection process would still prefer the eBGP over iBGP learnt path.

As mentioned in my previous post, AD only comes into play between protocols.

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
Blue

Re: iBGP and eBGP question

Harold:

Thank you for that great explanation.

Much appreciated...

Victor

New Member

Hello,

Hello,

I think something is wrong, given the cisco example below, the behavior is opposite of what is been described in the forum, please check this discussion

https://supportforums.cisco.com/discussion/13315956/bgp-multihoming-dual-ce-single-link-dual-pe

Silver

Actually nothing wrong with

Actually nothing wrong with the example and what they described is the correct BGP route selection process. I have explained and corrected your topology in the link you provided.

I hope you find it useful.

Re: iBGP and eBGP question

simply

always if u have route reachable through IBGP and EBGP

EBGP will be selcted

and it is not recomended to change this default behivaur

rate if helpful

Blue

Re: iBGP and eBGP question

Marwan, you are wrong.

Read Ritters post -- and mine.

Thanks

VL

Re: iBGP and eBGP question

so what wrong

i am already talking about default behivour

and dont forget that bgp dose not pass route updat between IBGP peers from IBGP

unless it is from ebgp peer

so that they made it prefered by default and they dont recomend to be changed

New Member

Re: iBGP and eBGP question

It is BGP feature behaviour( BGP route selecetion criteria) that BGP path would be prefer over IBGP

Silver

Re: iBGP and eBGP question

Harold, To your reply stating "AD will never be used to compare 2 bgp routes" , I would like to comment that we indirectly are. I mean, the path selection criteria #7 states that prefer e-bgp over i-bgp. So though we are not looking and comparing the AD, its just another way to look at it; isn't it?

:)

Blue

Re: iBGP and eBGP question

Marwan:

I was interpreting your response within the context of the question that was asked.

"If a router running both iBGP and eBGP, iBGP local preference is 250, eBGP local preference 100, be default, what's the route it should choose?"

Then your answer:

"simply always if u have route reachable through IBGP and EBGP EBGP will be selcted"

It seems as though you are saying that, NO MATTER WHAT, even given the circumstances given in the question, eBGP will always be selected.

If you meant that all other things being equal that eBGP will be selected, then you are right.

Shukrun

Victor

Cisco Employee

Re: iBGP and eBGP question

Niranjan,

Step #7 is not about the AD but rather about internal vs. external. You could change the AD for eBGP to be higher than iBGP and the BGP best path selection process would still select the external path over the internal path, given that all attributes compared in the previous steps are equals.

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
Cisco Employee

Re: iBGP and eBGP question

Harish,

The eBGP path is preferred over the iBGP path, assuming that all previous steps in the BGP best path selection process were equals.

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
5624
Views
43
Helpful
18
Replies