cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3496
Views
10
Helpful
15
Replies

OSPF to prefer "O IA E1" route over "O E1" route

gavin han
Level 1
Level 1

 I need help with route preference in OSPF (traffic engineering). 10.10.10.0/24 is redistributed into OSPF on R1 as E1 route. R4 is learning this route as "O E1" (intra-area E1) with cost 51 from R2 and it is also learning this route from R3 as "O IA E1" (inter-area E1) with cost 21 and  it is  preferring this route that was learned from R2. I want R2 to prefer route learned from R3. how to achieve this? I applied ip policy route-map on R4's R2 facing interface to change ospf metric type to type-2 but metric type didn't change. how can i fix this so that R4 prefers route learned from R3?

 

 

 ospf.jpg

15 Replies 15

gavin han
Level 1
Level 1

my apologies. routes learned from R2 and R3 are both "O E1" type but R4 is preferring route learned from R2 even though it has higher cost. What can we do so that R4 prefers route learned from R3?

Hi,

R4 should prefer Routes from R2 instead of R3. Could you please share the show ip route and show ip ospf neighbor output? 




>> Marcar como útil o contestado, si la respuesta resolvió la duda, esto ayuda a futuras consultas de otros miembros de la comunidad. <<

It is normal behavior. The path to the ASBR via R2 is an intra area route and the one via R3 is an inter area route, hence the path via R2 being preferred regardless of the cost.

 

A quick and dirty trick to have R4 to prefer the external route via R3 would be to configure a virtual link between R3 and R4. This way R4 would see an intra area path via R3 and would prefer it, due to the lower metric.

 

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

Can you please tell me How to create Virtual Link between R3 and R4 ( include config )

R3:

router ospf xxx

area 200 virtual-link <R4 router id>

R4:

router ospf xxx

area 200 virtual-link <R3 router id>

 

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

This is not proper behavior. Can you please send the output for the command "sh ip ospf database external 10.10.10.0/24"

Hello

 

R4-R2_R1 - Intra area route (asbr via AREA 0) <----- will always be preffered
R4-R3_R1 - Inter area route (asbr via AREA 200)

 

Ospf path selection:
O = Intra are
O IA =Inter area
E1-=External type 1
E2= External trype 2
N1-=NSSA type 1
N2= NSSA type 2



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

The only way to prefer R3 instead R2 from R4's perspective is changing the area to 0 between R3 and R4 then play with cost. Increasing the cost between R2 and R4




>> Marcar como útil o contestado, si la respuesta resolvió la duda, esto ayuda a futuras consultas de otros miembros de la comunidad. <<

Hola Julio,

 

The virtual link between R3 and R4 would be another way.

 

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,

I agree, it could be other option, I think tunnel could be useful as well. I was thinking other option like static and redistributing but it could commit the HA. Changing the area could be less intrusive and manageable but we should meet the entire topology first or how the flow should pass through.

 




>> Marcar como útil o contestado, si la respuesta resolvió la duda, esto ayuda a futuras consultas de otros miembros de la comunidad. <<

a.alekseev
Level 7
Level 7

MikeO5422
Level 1
Level 1

Hello,

 

This is normal behavior as most folks have said. It occurs because the link between R3 and R4 is in a different area than the route was originated in. Area logic always takes precedence over cost. You have a few options, some of which folks have already said:

 

1) Virtual link between R3 and R4 in area 0

2) Tunnel between R3 and R4 in area 0 (similar to 1)

3) Add a static route on R4 pointing to R3. Be sure to track it and remove it from the table if R3 is no longer reachable. That way the OSPF route can kick in during a failure.

 

A point of note, if you lose the link between R1 and R2, you have split area 0 and you may run into some issues despite having a second link up between R3 and R4. Therefore options 1 and 2 could be considered assuming you understand the global impact of implementing them (proper costing). Option 3 could be a quick and dirty.

Please see OP follow-up reply. Both learned routes are intra-area routes. So the logic of intra being preferred over inter is not valid in this case. We still need to see the full lsa info for the learned route to see what is going on.

External routes always show up as O E1|2 (unless you are in an nssa area). O E1|2 has no bearing on the area of origin. You cannot accurately say both routes were learned via an ASBR that's intra area based upon that information alone.

 

Pretty sure intra vs inter area logic still apply when the LSDB is processed to find the closest path to the ASBR that advertised the external route (as others have indicated as well). i.e. is the ASBR in the same area or a different area as me.

 

Review Cisco Networking for a $25 gift card