iBGP and eBGP question

Unanswered Question
Aug 5th, 2008
User Badges:

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,

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 3.6 (12 ratings)
Loading.
n.nandrekar Tue, 08/05/2008 - 22:56
User Badges:
  • Silver, 250 points or more

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)

Harold Ritter Wed, 08/06/2008 - 03:42
User Badges:
  • Cisco Employee,

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,

n.nandrekar Wed, 08/06/2008 - 04:44
User Badges:
  • Silver, 250 points or more

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

lamav Wed, 08/06/2008 - 04:47
User Badges:
  • Blue, 1500 points or more

Niranjan:


Just my 2 cents...


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


Victor



Harold Ritter Wed, 08/06/2008 - 04:54
User Badges:
  • Cisco Employee,

Victor,


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


Regards,



lamav Wed, 08/06/2008 - 13:27
User Badges:
  • Blue, 1500 points or more

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

Harold Ritter Thu, 08/07/2008 - 06:40
User Badges:
  • Cisco Employee,

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,

lamav Thu, 08/07/2008 - 08:09
User Badges:
  • Blue, 1500 points or more

Harold:


Thank you for that great explanation.


Much appreciated...


Victor

Marwan ALshawi Wed, 08/06/2008 - 04:46
User Badges:
  • Purple, 4500 points or more
  • Community Spotlight Award,

    Best Publication, December 2015

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


lamav Wed, 08/06/2008 - 04:48
User Badges:
  • Blue, 1500 points or more

Marwan, you are wrong.


Read Ritters post -- and mine.


Thanks


VL

Marwan ALshawi Wed, 08/06/2008 - 06:57
User Badges:
  • Purple, 4500 points or more
  • Community Spotlight Award,

    Best Publication, December 2015

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


harish.ab Wed, 08/06/2008 - 09:03
User Badges:

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

n.nandrekar Wed, 08/06/2008 - 09:54
User Badges:
  • Silver, 250 points or more

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?

:)

lamav Wed, 08/06/2008 - 13:23
User Badges:
  • Blue, 1500 points or more

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

Harold Ritter Thu, 08/07/2008 - 06:49
User Badges:
  • Cisco Employee,

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 Thu, 08/07/2008 - 06:55
User Badges:
  • Cisco Employee,

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,

Actions

This Discussion