cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
349
Views
0
Helpful
6
Replies

OSPF Cost

hs08
Spotlight
Spotlight

Hello,

I have toloply like below pic, where lan-1 subnet is 10.100.0.0/16 and lan-2 subnet is 10.200.0.0/16. R1 and R2 connected via WAN and using OSPF protocol. 

Now my traffic from lan-1 to lan-2 always use WAN-1 and not pass thru WAN-2, maybe in R2 for WAN-2 there are bandwidth parameter and unfortunately i not have access to R2.

From R1 perspective can we know total cost from R1 to host 10.200.1.1 for example for both link?

hs08_0-1721808299967.png

 

6 Replies 6

M02@rt37
VIP
VIP

Hello @hs08 

You could examine the OSPF link-state database and routing table on R1. Start by using the show ip ospf database command to review LSAs, which detail the OSPF costs assigned to each interface and the topology information. Next, utilize the show ip route ospf command to observe the OSPF routing table, identifying the current best path to 10.200.1.1 and its associated cost. To gain more specific details about the routes to this destination, including alternative paths, use the show ip route 10.200.1.1 command. Finally, the show ip ospf border-routers command provides information on the cost to reach ASBRs and ABRs, which could impact the path selection.

By analyzing these outputs, you can determine the total OSPF cost for the paths from R1 to 10.200.1.1 via both WAN links, identifying which link is preferred and why the traffic might always use WAN-1 over WAN-2, potentially due to a lower total cost or a higher bandwidth parameter assigned to WAN-1.

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

Joseph W. Doherty
Hall of Fame
Hall of Fame

If your topology is as you've posted, only the OSPF interface costs on R1 usually matter.  What are they?

BTW, in my prior reply, I wrote "If your topology is as you've posted, only the OSPF interface costs on R1 usually matter.". The "usually" allowed for alternatives OSPF factors, as mentioned in other replies, like OSPF areas and VRFs.  Still, often to start with the simplest factor, which I think would be R1's OSPF interfaces costs.  Also BTW, on Cisco OSPF implementations their (non standard) auto cost interfaces, which can be overridden manually, is just amother variable which might set an interface cost different from expectation.  So, again worth insuring they are identical.

Same area is high on the list to confirm.  Also, perhaps unsaid, checking both interfaces have OSPF neighbors with correct adjacenty on both links.

Martin L
VIP
VIP

check interface costs and bandwidth method under router ospf;  what areas do u have ? are both routers in the same area? what about their interfaces, same area ? OSPF will calculate costs to reach x differently if u have multiple areas; 

Regards, ML
**Please Rate All Helpful Responses **

Giuseppe Larosa
Hall of Fame
Hall of Fame

Hello @hs08 ,

first of all

show ip route 10.200.0.0 can tell you if  your router R1 uses only one path for reaching the destination

then you can check the ospf database for router LSA

even more simple you can use

show ip ospf interface

to check OSPF cost from R1's point of view and the area ID each interface belongs to, because in OSPF it is important the cost of the outgoing interface to the destination so even if you cannot access R2 you can from R1 understand why only WAN1 link is used for traffic for destination 10.200.0.0/16

OSPF metric is cumulative and the cost of R1 interfaces is added to the cost advertised by R2 in R2 router LSA to reach remote subnet 10.200.0.0/16

Another possible explanation of why one link is preferred is the use of multiple OSPF areas. if wan1 provides an intra area path to remote destination it is preferred to WAN2 whatever cost is used on WAN2 if WAN2 is for example in area 0 and provides an inter area path to remote destination.

Another option  R2 WAN2 could be in a different VRF and it is not advertising the remote subnet on WAN2

Hope to help

Giuseppe

in R1 do 
show ip ospf database router
you can see the cost R2 use 
Screenshot (793).png

Review Cisco Networking for a $25 gift card