cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2012
Views
20
Helpful
10
Replies

Path selection between IBGP(AD 200) and OSPF(AD 210)

DaeHeon Kang
Level 1
Level 1

Hi,

 

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.

Routing.PNG 

 

 

10 Replies 10

Harold Ritter
Level 12
Level 12

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.

 

Regards,

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México

Hi Harold,

 

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. 

 

Regards,

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México

Jon Marshall
Hall of Fame
Hall of Fame

 

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. 

 

Jon

Deepak Kumar
VIP Alumni
VIP Alumni

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

Regards,
Deepak Kumar,
Don't forget to vote and accept the solution if this comment will help you!

 

I assumed that was a L2 switch but looking at it again that may well be a L3 switch which would explain why both routers are using the OSPF route (assuming they are). 

 

Jon

As explained above, It's L2 switch, not L3 switch running BGP routing protocol.

Both routers are peering IBGP through the L2 switch(LAN). 

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.

 

 

 

can we see 
show ip bgp ?

Hello
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.


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul
Review Cisco Networking for a $25 gift card