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

Doubt to check the priority of OSPF learned route.

ciscolover
Beginner
Beginner

Hi  all ¡¡

I have a virtual environment mounted with Gns3.

I have an environment of several L3 switches 3600 Software (C3640-IK9O3S-M), Version 12.4(25b) connected to area 0 OSPF.

Specifically, a switch connects through 2 different networks to area 0. It learns a network twice (172.25.3.0/24) from 2 different neighbors, each of them on a different network. I don't know how I can see why it chooses one or the other route, when adding it  to the route table. He always chooses the same destination in to the routing table and only if that neighbor is down, does he put the other one. Could you tell me why it takes one route and not the other? How can I see it?

"SW1#show ip route 172.25.3.0
Routing entry for 172.25.3.0/24
Known via "ospf 1", distance 110, metric 20, type extern 2, forward metric 1
Last update from 10.127.7.6 on Vlan404, 00:20:28 ago
Routing Descriptor Blocks:
* 10.127.7.6, from 172.25.3.2, 00:20:28 ago, via Vlan404
Route metric is 20, traffic share count is 1"

CORE#show ip ospf database
172.25.3.0 172.25.3.1 1368 0x80000001 0x00DE2F 0
172.25.3.0 172.25.3.2 1367 0x80000001 0x00D834 0

 

I understand that if I don't have the route twice in the route table, is it because one has better costs than the other? Or maybe because you learn on different networks in the same area?

Thanks '¡¡¡¡¡

 

1 ACCEPTED SOLUTION

Accepted Solutions

MHM Cisco World
Advisor
Advisor

issue sile.png

The issue start when you 
redistribute connect subnet in R2 & R3 for subnet 100.0.0.0 
even so this subnet connect two ospf router neighbor
this make R2 and R3 advertise E2 of 100.0.0.0/24 to R1
R1 will advertise both E2 but
R4 will process one because this prefix is pass through same Neighbor so R4 will only process one E2 not both. 

View solution in original post

15 REPLIES 15

David Ruess
Rising star
Rising star

Hello,

 

OSPF chooses routes the following way:

  • Priority – Intra area, Inter area, E1, E2, N1, N2.

So even at a higher cost it could still choose Intra-area routes over Inter area routes. 

Can you provide the metrics of how both routes are learned from SW1 perspective ? I diagram would be helpful as well.

Also OSFP only does ECMP which means it only installs routes in the routing table of multiple paths if their metrics match.

 

-David

 

Hi David,

How can I view the metrics? It's just what I don't know how to consult. A command that tells me which of the two routes is better and why.

MHM Cisco World
Advisor
Advisor
forward metric 1<<- 

Check the forward metric of second route if it same or not, forward metric can be tie breaker here.

How can I check the forward metric? Wich command?

paul driver
VIP Expert VIP Expert
VIP Expert

Hello


@ciscolover wrote:
I understand that if I don't have the route twice in the route table, is it because one has better costs than the other? Or maybe because you learn on different networks in the same area?

172.25.3.0 172.25.3.1 1368 0x80000001 0x00DE2F 0
172.25.3.0 172.25.3.2 1367 0x80000001 0x00D834 0


In this instance those two LSA's have the same seqeunce numbers however the preffered lsa has a lower checksum and age.

Can you post the output of the following:

sh ip ospf database external 172.25.3.0

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

Hi Paul, thanks for your help.

 

It is what you need, to see some field that tells me that one route is better than the other. Understanding that the one with the lowest checksum or age is worse. Attached the command you indicated.

 

 

MHM Cisco World
Advisor
Advisor

this below

show ip ospf db external 

Captura.JPG

you see two prefix but with different advertising router,
172.25.3.1
172.25.3.2

now to check the forward metric 
we do 

show ip ospf db router 


we must see both advertise router and check both metric is it equal or not.

 

Thats the result... But I dont know how I do check the metric...

 

MHM Cisco World
Advisor
Advisor

I make deep check again,
the external route via 172.25.3.1 not mark with routing bit set, this make external route never enter in SPF process of OSPF.
this neighbor is learn from 10.127.7.38 link
so do

show ip route ospf db router 


see if this link is also not mark as routing bit set.

the reason, 
1-one the since the large network is same then double check the subnet & mask you apply in interface and under OSPF
2-check the OSPF network type in both side of link 

I knew that it was not so easy to determine why one route was preferred over the other XD. Both networks are /24. Sorry but I don't understand if you need me to get some more command to see some missing data.

show ip route ospf database router

 

 Thanks ¡

MHM Cisco World
Advisor
Advisor

issue sile.png

The issue start when you 
redistribute connect subnet in R2 & R3 for subnet 100.0.0.0 
even so this subnet connect two ospf router neighbor
this make R2 and R3 advertise E2 of 100.0.0.0/24 to R1
R1 will advertise both E2 but
R4 will process one because this prefix is pass through same Neighbor so R4 will only process one E2 not both. 

Thank you very much for your help. We could say that when learning the same network, through the same neighbor and through the same network and priority, it only adds it once. And if one of those neighbors did not announce it, will learn it from the other.

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: