11-14-2024 10:16 AM
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
11-14-2024 10:23 AM
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
11-14-2024 10:39 AM - edited 11-14-2024 10:41 AM
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 |
11-14-2024 10:52 AM
"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.
11-14-2024 11:42 AM
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
11-14-2024 11:45 AM
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
11-15-2024 01:42 AM
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 ?
11-15-2024 01:56 AM
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
11-15-2024 05:05 AM
Could you provide a diagram and relevant config snippets?
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide