07-31-2018 04:35 PM
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?
07-31-2018 04:43 PM
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?
07-31-2018 04:51 PM - edited 08-01-2018 04:35 AM
R4 should prefer Routes from R2 instead of R3. Could you please share the show ip route and show ip ospf neighbor output?
07-31-2018 05:55 PM - edited 07-31-2018 06:02 PM
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.
08-03-2018 09:38 AM
Can you please tell me How to create Virtual Link between R3 and R4 ( include config )
08-03-2018 09:42 AM - edited 08-03-2018 09:43 AM
router ospf xxx
area 200 virtual-link <R4 router id>
router ospf xxx
area 200 virtual-link <R3 router id>
07-31-2018 06:27 PM
08-01-2018 03:05 AM - edited 08-01-2018 05:47 AM
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
08-01-2018 04:46 AM - edited 08-01-2018 04:53 AM
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
08-01-2018 07:55 AM
The virtual link between R3 and R4 would be another way.
08-01-2018 09:45 AM - edited 08-01-2018 09:55 AM
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.
07-31-2018 11:48 PM
08-01-2018 09:15 AM
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.
08-01-2018 03:20 PM
08-01-2018 07:05 PM
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.
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: