cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2052
Views
15
Helpful
5
Replies

route selection criteria in a multi-process OSPF environment

kabuelenain
Level 1
Level 1

This should be a straight-forward question:

 

If a router is running two different ospf processes, each process with a separate neighbor, what happens if the router receives the a Type 5 LSA for the same destination from both neighbors aka from each of the OSPF processes ?

 

How can I prefer one external route over the other, if each is received from a different process ? Using OSPF cost, or Admin distance ?

 

Thanks !

1 Accepted Solution

Accepted Solutions

Giuseppe Larosa
Hall of Fame
Hall of Fame

Hello Khaled,

 

>> If a router is running two different ospf processes, each process with a separate neighbor, what happens if the router receives the a Type 5 LSA for the same destination from both neighbors aka from each of the OSPF processes ?

 

Multiple OSPF processes run separately (ships in the night concept)  and each of them attempts to install its own version of the route in the routing table.

The IP routing table daemon does not care about the type of route O, O IA , O E1 , O E2 it can only compare the admin distance and metric. The IP routing table daemon cannot compare the router-ids of the two external LSAs and the two OSPF processes do not communicate between them directly.

If the metric is the same the first = faster OSPF process will have its route installed in the routing table.

This means not deterministic results.

 

>> How can I prefer one external route over the other, if each is received from a different process ? Using OSPF cost, or Admin distance ?

As explained before to avoid competition between the two OSPF processes you should tweak the OSPF admin distance for different types of routes

The distance command in OSPF allows to specify the admin distance for intra area, inter area, external routes.

! primary process

router ospf 10

distance ospf intra-area 105 inter-area 105 external 115

! secondary process

router ospf 20

distance ospf intra-area 110 inter-area 110 external 120

 

This way you have a clear hierarchy on the OSPF processes and competition is avoided.

I used this approach in a complex migratation merging two service provider networks with good results.

 

Edit:

I verified in a recent document the behaviour is still the same as I have described.

 

>> The preference rule between a given OSPF process and any other process (be it OSPF or another routing protocol) should follow the administrative distance rule. However, because different OSPF processes will have the same administrative distance by default, OSPF distance should be configured explicitly for different OSPF processes in order to achieve the desired behavior.

see

https://www.cisco.com/c/en/us/support/docs/ip/open-shortest-path-first-ospf/4170-ospfprocesses.html

last update Jan 2018

 

 

Hope to help

Giuseppe

 

View solution in original post

5 Replies 5

Hello,

 

if everything else is equal, the OSPF process with the highest router ID will be the one whose route is installed. That said, post tthe exact configurations you have...

Thank you Georg.

 

The configs are simply along the lines of:

!
interface GigabitEthernet0/1.10

description *** Link to Router XX ***
encapsulation dot1Q 10
ip address 172.16.0.1 255.255.255.252
ip ospf network point-to-point
ip ospf 1 area 0
!
interface GigabitEthernet0/1.20

description *** Link to Router YY ***
encapsulation dot1Q 20
ip address 172.16.0.5 255.255.255.252
ip ospf network point-to-point
ip ospf 2 area 0
!

So I understand from your answer that if router XX has a higher router ID than router YY, then the route received from ospf process 1 will be preferred ?

 

If this is the case, my follow up question would be: What can be used to prefer one route over the other: cost or admin distance ? Noting that both routes have the same type.

 

Thank you again.

Giuseppe Larosa
Hall of Fame
Hall of Fame

Hello Khaled,

 

>> If a router is running two different ospf processes, each process with a separate neighbor, what happens if the router receives the a Type 5 LSA for the same destination from both neighbors aka from each of the OSPF processes ?

 

Multiple OSPF processes run separately (ships in the night concept)  and each of them attempts to install its own version of the route in the routing table.

The IP routing table daemon does not care about the type of route O, O IA , O E1 , O E2 it can only compare the admin distance and metric. The IP routing table daemon cannot compare the router-ids of the two external LSAs and the two OSPF processes do not communicate between them directly.

If the metric is the same the first = faster OSPF process will have its route installed in the routing table.

This means not deterministic results.

 

>> How can I prefer one external route over the other, if each is received from a different process ? Using OSPF cost, or Admin distance ?

As explained before to avoid competition between the two OSPF processes you should tweak the OSPF admin distance for different types of routes

The distance command in OSPF allows to specify the admin distance for intra area, inter area, external routes.

! primary process

router ospf 10

distance ospf intra-area 105 inter-area 105 external 115

! secondary process

router ospf 20

distance ospf intra-area 110 inter-area 110 external 120

 

This way you have a clear hierarchy on the OSPF processes and competition is avoided.

I used this approach in a complex migratation merging two service provider networks with good results.

 

Edit:

I verified in a recent document the behaviour is still the same as I have described.

 

>> The preference rule between a given OSPF process and any other process (be it OSPF or another routing protocol) should follow the administrative distance rule. However, because different OSPF processes will have the same administrative distance by default, OSPF distance should be configured explicitly for different OSPF processes in order to achieve the desired behavior.

see

https://www.cisco.com/c/en/us/support/docs/ip/open-shortest-path-first-ospf/4170-ospfprocesses.html

last update Jan 2018

 

 

Hope to help

Giuseppe

 

Thank you Giuseppe. Very helpful indeed.

Hi Giuseppe

    Please correct me if I understood your reply wrongly, but I think your reply is a bit misleading. For the same route received from two OSPF processes, they compare AD first. When AD's are equal, they don't compare the metric but select the routes based on LSA type rules. Eg, the same route, one is from process 2, OE1, metric 70 (20+50, 50 is forward metric); the other is from process 1, OE2, metric 65. The result is that the route prefers OE1 although it has higher metric 70. Based on the LSA type rule, OE1 always wins OE2. I have the same results from the real environment and the virtual testing platform. 

    Could you please double check it? 

    Thanks.  

Getting Started

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:

Review Cisco Networking products for a $25 gift card