cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
667
Views
1
Helpful
8
Replies

Bgp AD

Bruno23
Level 1
Level 1

Hi 

I have a doubt if anyone could help me please! 

Imagine that I have the route 1.1.1.1 and I am receiving this network by iBGP and EBGP with the AS path attribute 200 200 200, the router will choose the IBGP route right?

That is my doubt, if iBGP has distance administrative 200 and EBGP 20 why the router don't use Administrative distance as tiebreaker?

If anyone could help me to unterstand that!

Thank you very much 

8 Replies 8

Because bgp is path vector protocol not like ospf or eigrp.

It first select best path and there are criteria and then inject it into rib with AD.

MHM

@Bruno23 

You said well "tiebreaker".   "tiebreaker" is used when there is a match and we need to take decision. But, BGP have a list of attribute  to look at.

If you receive a route from eBGP and iBGP and they have none of attribute from 1 to 6 below, eBGP route will be choosen, not iBGP.

 

Priority Attribute
1 Weight
2 Local Preference
3 Originate
4 AS path length
5 Origin code
6 MED
7 eBGP path over iBGP path
8 Shortest IGP path to BGP next hop
9 Oldest path
10 Router ID
11 Neighbor IP address

Joseph W. Doherty
Hall of Fame
Hall of Fame

"That is my doubt, if iBGP has distance administrative 200 and EBGP 20 why the router don't use Administrative distance as tiebreaker?"

Normally, an eBGP route would be preferred over an iBGP route, so you're saying you have a case that it isn't?

AD breaks prefix matches between routing protocols.  I.e. iBGP and eBGP are treated as distinct protocols, just like OSPF vs. RIP.

AS path attribute, would only come into play between matching prefixes within iBGP or eBGP, just as OSPF's cost only factors into matching prefixes within OSPF.

Where things become "interesting", between routing protocols, is when their ADs match.

Yes, I have a case that happens! 

I receive the save route by iBGP and EBGP and the router only chooses iBGP route because EBGP route as higher As path. That why I am confused!

Administrative distance should be the first option 

Example to see effect of as-path is 

Two edge routers interconnects via ibgp and both connect to ISP.

So if one edge router receive prefix from ISP via ebgp(it advertise prefix from other edge router) and from other edge router via ibgp

If we use AD then edge router will prefer send to other edge router pass through ISP !!! do you see that correct ???

MHM

Bruno23
Level 1
Level 1

See ? this is what happen , the router chooses the IBGP route , the attributes are the default.
this is just a virtual Lab , is just a problem with the lab ?

Captura de ecrã 2024-11-15 093328.png

 

So the BGP select ibgp neighor which is direct connect which is more better than select ebgp which is one hop away even if ibgp AD is larger than ebgp.

that why BGP use criteria to select ibgp than ebgp. 

MHM

Could you provide a diagram and relevant config snippets?