Routers have higher OSPF AD value(210) by using distance command under OSPF.
And they have IBGP peering and they are redistributing OSPF routes to IBGP(AD 200)
I see they keep routes learned from OSPF(AD 210) even if the IBGP AD(200) is lower AD 210.
Why don't Routers install IBGP route in this case?
* The OSPF routes come redistributed from L3 SW, which it's external OSPF like below picture.
Hi @DaeHeon Kang ,
The reason the ospf route is installed even if it has a higher AD, is because the iBGP route cannot replace the route it was redistributed from. The AD is irrelevant in this case.
That makes me understand the situation.
I have another quick question.
I see RTR01 router installs IBGP route(AD 200) after rebooting, which redistributed from RTR02 router.
And, RTR01 router keeps the IBGP route(AD 200) even if it starts to receive external OSPF route(AD 210) redistributed from SW1-1.
I guessed it's because AD200 is lower than AD210.
Or does this happen with the same reason as what you explained?
If it does, is the fact that "AD value doesn't affect tp redistributed route" true always?
Hi @DaeHeon Kang ,
> I guessed it's because AD200 is lower than AD210. Or does this happen with the same reason as what you explained?
In this case, it is because of the lower AD.
Just to add to Harold's post.
Are both routers using the OSPF route because I would expect one of them to be using the OSPF route and one to be using the IBGP route.
Both routers redistribute the OSPF route into IBGP and then advertise to the other router so whichever router receives that advertisement first should use the IBGP route and not the OSPF route.
I agree with @Harold RitterIf you redistribute routes from one protocol to another, the source protocol routes are preferred until the router learns the same route from any other path.
But here in your topology, I can see a switch with the iBGP neighborship (connected to subnet B) as the second route, but again it is an iBGP neighborship, so BGP has a default rule to avoid routing loops. BGP routers do not advertise routes to an iBGP, learned from iBGP neighbor
The switch having subnet B is L2 switch, not L3 switch running BGP routing protocol.
RTR01 and RTR02 has LAN connection via the L2 switch.
And, IBGP peering is established between RTR01 and RTR02 via L2 switch.
Based on the topology supplied its possible the bgp ribs would have two paths to the same route however the ospf redistributed route will be installed in the route tables because a redistributed igp route will by default have a bgp weight of 32768 assigned to it
So referring to bgp path section, Weight is most preferred, however if one of the ospf adjacencies failed then that ibgp rtr would have a route table entry being advertised to it from its connected ibgp peer as best path.