cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1426
Views
0
Helpful
10
Replies

OSPF Metrics

AllezLom63194
Level 1
Level 1

Hi the Community,

 

On an ISR4331 or ASR 1001-x routers:

If there are multiple way to join a network with OSPF routing protocol, is there a command to display all the way to join this specific network with the corresponding metric to understand why the router install only one way on the routing table ?

 

I looked on the RIB but didn't saw the metric of each ways.

 

Thank for your help.

 

Regards.

10 Replies 10

Joseph W. Doherty
Hall of Fame
Hall of Fame
Possibly indirectly through analysis of the LSA database. (See https://www.cisco.com/c/en/us/support/docs/ip/open-shortest-path-first-ospf/16437-ospfdbtoc.html)

If you're looking for a command that somehow reveals the whole STP tree, before its been "pruned", I don't believe that information is retained.

Hello Joseph,

I have read theses documentations but they doesn't answer to my needs.

 

I would like to know on one router (ex R1) that have two way (R2 or R3) to join one specific network (ex 4.4.4.0/24)

  • If the tow router annonce the network 4.4.4.0/24
  • What is the two  cost to join 4.4.4.0/24 using R2 and using R3

Then I'll be able to understand why router R1 make the choice of R2 (for exemple) to join the network 4.4.4.0

 

My goal is to force the way to join 4.4.4.0/24 from R1.

 

Regards.

Hello @AllezLom63194 ,

if you are within a single area the total metric is the sum of the OSPF costs of each link on the path to destination.

You can use

show ip ospf interface

to check the OSPF cost from a node to another one

Then you move to the next node and you repeat the process

 

At the end you can compare the cumulative costs via R2 or via R3.

To be noted the OSPF cost of the directly connected interface to the prefix 4.4.4.0/24 has to be taken in account too.

 

Hope to help

Giuseppe

 

Hello Giuseppe,

Thank for your response.

Anyway routers R1, R2 and R3 are connected to a L2 broadcast network.

The ospf cost configured on R1 interface is 100.

So the cost to join 4.4.4.0 network is 100 and is the same using R2 or R3. Isn't it ?

 

Regards,

 

Hello @AllezLom63194 ,

actually the total cost to destination prefix includes the OSPF cost of R2 to it and the OSPF cost of R3 to it , they may be different and this can cause one device to be preferred.

If the OSPF costs of R2 and R3 to destination are equal R1 will perform load balancing flow based.

This means that for a specific pair IP source address IP destination address with IP destination address within 4.4.4.0 R1 will alwasy choice the same neighbor as next-hop.

In this case changing the source address will give you a chance to see the other router used as next-hop.

CEF load balancing uses an EXOR of the last meaningful bits of IP source with the last meaningful bits of the IP destination address then EXOR with a SEED value that is chosen randomly at router startup.

 

Hope to help

Giuseppe

 

Giuseppe,

Yes It help me.

I have changed the OSPF cost of R2 (100) and R3 (200) and normally the route should use R2 router.

Is there a notion of préemption because it is alway R3 taht is used instead of R2.

Maybe I have to clear ip ospf process ?

 

Regards.

Hello @AllezLom63194 ,

there is no pre-emption in OSPF

 

waiting some time may be enough, clearing the OSPF process it will restart it.

 

This may be needed if you are emulating the network scenario.

Are you sure that both R2 and R3 are advertising the same prefix and with the same prefix length ?

 

Because if R3 advertises a more specific prefix it will be preferred for destinations within it regardless of metric.

 

Hope to help

Giuseppe

 

Hello Giuseppe,

 

Yes R2 and R3 advertise the same prefix withe the same prefix lenght.

 

I can't clear ip ospf process because theses routers are in production and it will break the network sessions.

 

The problem is that it makes an asymetric routing because R2 is the prefered router to go away from the site and R3 is prefered router to come on this same site.

As noted in my first post "If you're looking for a command that somehow reveals the whole STP tree, before its been "pruned", I don't believe that information is retained."

If you can post (or explain in detail) your topology, perhaps we can explain and/or answer your question.

Joseph,

 

The topology is the same as my other post on the "OSPF route choice".

I can post it here if you want.

My need is the same but I was looking for the metrics informations to understand the metrics and the way OSPF used to install network entry on the route table.

Regards. 

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: