cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
489
Views
2
Helpful
32
Replies

Nexus OSPF

hs08
Spotlight
Spotlight

Hello,

I have cisco ISR and Nexus 7707 with ospf enabled. Nexus use 40Gbps for reference bandwidth and ISR use 100Mbps.

From R1 perspective cost to reach 10.103.248.1 is 41, and i have though that 40 is cost from R1 to R2 (40 div 1), and 1 is cost from R2 to the host. 

My question is, why the cost is not 80 (R1-R2 is 40 and R2-host=40)? Since from R1 to R2 and R2 to the host same using 40Gbps for the bandwidth reference?

hs08_0-1723015329433.png

 

32 Replies 32

Hello @hs08 ,

I'm sorry I mistyped the command I was referring to OSPF database

the command should be

show ip ospf  database router <Nexus-OSPF-RID>

Hope to help

Giuseppe

 

Hello,

Here available command, which one should i select?

hs08_0-1723022980125.png

 

Hello @hs08 ,

on the Nexus use

show ip ospf

take not of the OSPF RID address

on the router use

show ip ospf database <Nexus-Router-ID>

where <Nexus-Router-ID> is the IP address you have taken from previous show command

or use on the nexus

show ip ospf database router self-originated

Hope to help

Giuseppe

 

Hello,

Here the result. 10.103.103.1 is Nexus RID

hs08_0-1723024371033.png

 

@hs08 

This what I ask to you...because as @Giuseppe Larosa the cost of 40 is reported inside the Router LSA originated by the Nexus node.

Note that maintaining the same reference bandwidth across all OSPF nodes is crucial for consistent and predictable routing decisions. This practice avoids discrepancies in cost calculation that can lead to suboptimal routing paths.

 

Best regards
.ı|ı.ı|ı. If This Helps, Please Rate .ı|ı.ı|ı.

Do this step

In R1 use show ip route' you will see your prefix with next hop

Then 

Show ip ospf database router 

Search in link ID next hop appear in show ip route 

MHM

Here the result. So cost 40 is not from R1 to R2?

hs08_0-1723026895413.png

 

Friend cost is 

(R1 to R2) + (R2 to device) 

Same as what you write in your original post.

Now (R1 - R2) cost 40 

Still keep 1 

In R2 if you use redistrubte connect subnet then R2 will use defualt cost 1

I not try but if you config ospf under R2 to device link the R2 will then will use 40 

And hence you get 40+40=80

MHM

MHM

Hello,

You say "Now R1 - R2 cost 40". Just to confirm in your opinion cost from R1 to R2 is 40?

Hi 
this lab for more detail
the 10.0.0.0 appear in R1 as O (intra area) i.e. all LSA use in this path is LSA1 
so we use show ip ospf database router 

we look for router advertise the route 100.0.0.2 (next hop of 10.0.0.0/24 prefix) 
we found it we check the two LSA1 cost for this path 
R1-R2 = 40 
R2-SW =1 
so total cost is 41 as show in show ip route 

Screenshot (819).pngScreenshot (820).png

we modify the cost in R2 for prefix 10.0.0.0 to be 10 instead of 1 
Now R1 have prefix 10.0.0.0/24 with cost 50 
R1-R2 = 40

R2-SW=10

 

 

Screenshot (821).pngScreenshot (822).png

Hello @hs08 ,

as you can see by yourself the cost associated to the link and subnet of interest is 40.

Being a Link state protocol the Router LSA data structure is propagated by  the Nexus to the other router.

The other router use the info in the Router LSA to calculate the SPF to each destination listed in the Nexus router LSA.

In short by adding its own cost of interface to the Nexus to the cost seen in the Router LSA.

This is why the cost is 41 from IOS router point of view.

The Router LSA travels unchanged in all the area  and only the originator router has the right to update it with a new version when needed ( topology change on a link or LSA refresh every 1800 seconds in Cisco implementation)

Hope to help

Giuseppe

let apply what I explain in your topolgy 

10.103.248.55/32 <<- this LSA1 is not appear show ip ospf database router you share ?? are this all output ??
if Yes then 
when you do show ip route 10.103.248.55/32 <<- this prefix is "O" or "O I" or "E1/E2" ??

MHM

Hi..

Here result show ip ospf database router on R1 (I remove unnecessary result)

OSPF Router with ID (10.103.103.5) (Process ID 100)

Router Link States (Area 0.0.0.0)

LS age: 693
Options: (No TOS-capability, No DC)
LS Type: Router Links
Link State ID: 10.103.103.1                                 --> This is R2 Router ID
Advertising Router: 10.103.103.1
LS Seq Number: 8000DE33
Checksum: 0x4552
Length: 240
AS Boundary Router
Number of Links: 18

Link connected to: a Stub Network
(Link ID) Network/subnet number: 10.103.248.0        --> This host subnet
(Link Data) Network Mask: 255.255.255.0
Number of MTID metrics: 0
TOS 0 Metrics: 40

Here result for show ip route from R1

O 10.103.248.0/24 [110/41] via 10.103.245.9, 7w0d, GigabitEthernet0/0/0

So in my mind cost from R1 to r2 is 40, then R2 to the host is 1 (CMIIW)

There is lsa1 for this IP 10.103.245.9

What  cost of it?

"" Friends path use next hop of prefix not use router-ID of advertise router""

MHM

Review Cisco Networking for a $25 gift card