08-07-2024 12:28 AM
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?
Solved! Go to Solution.
08-07-2024 02:24 AM
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
08-07-2024 02:30 AM
Hello,
Here available command, which one should i select?
08-07-2024 02:46 AM - edited 08-07-2024 02:47 AM
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
08-07-2024 02:53 AM
Hello,
Here the result. 10.103.103.1 is Nexus RID
08-07-2024 03:27 AM
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.
08-07-2024 03:32 AM
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
08-07-2024 03:35 AM
Here the result. So cost 40 is not from R1 to R2?
08-07-2024 03:44 AM - edited 08-07-2024 06:15 PM
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
08-07-2024 07:56 AM - edited 08-07-2024 07:31 PM
MHM
08-07-2024 06:04 PM
Hello,
You say "Now R1 - R2 cost 40". Just to confirm in your opinion cost from R1 to R2 is 40?
08-07-2024 07:31 PM
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
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
08-07-2024 07:07 AM
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
08-07-2024 07:35 PM - edited 08-07-2024 07:39 PM
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
08-07-2024 07:46 PM
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)
08-07-2024 07:56 PM - edited 08-07-2024 07:57 PM
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
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide