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. :
(pls rate helpful posts)
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.
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.
AD will never be used between two BGP paths. AD is only used to prefer one protocol over the other.
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?
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.
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
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.
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
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
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?
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.
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.
The eBGP path is preferred over the iBGP path, assuming that all previous steps in the BGP best path selection process were equals.