cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1224
Views
10
Helpful
3
Replies

OSPF cost calculation

ashvanth kumar
Level 1
Level 1

Untitled.png

In the above set up if i give sh ip route for 10.242.0.0 in router A, I get the below output where the metric is 5. Any clue how its 5?

COGINCHNTCOCORE#sh ip route 10.242.0.0

Routing entry for 10.242.0.0/16

  Known via "ospf 10", distance 110, metric 5, type inter area

        Route metric is 5, traffic share count is 1

1 Accepted Solution

Accepted Solutions

Giuseppe Larosa
Hall of Fame
Hall of Fame

Hello Ashvanth,

OSPF costs are calculated in the outbound direction to the IP prefix, in your scenario you have different costs in different directions. This is generally not used in real world.

OSPF uses the Router LSAs of neighbors to calculate a cost to the ABR router that generated the LSA type 3 summary route.

So RA uses its  own Router LSA and cost of 3 to reach RB, then uses RB's router LSA to calculate a cost of 1 between RB and Rc (the ABR).

So, from the point of view of router A in your network diagram the cost to the ABR is 3+1 = 4 and I guess the cost of the summary route as advertised by router C in your network diagram is 1.

This ends up with a total cost of 5 to the inter area prefix from RA.

Hope to help

Giuseppe

View solution in original post

3 Replies 3

Giuseppe Larosa
Hall of Fame
Hall of Fame

Hello Ashvanth,

OSPF costs are calculated in the outbound direction to the IP prefix, in your scenario you have different costs in different directions. This is generally not used in real world.

OSPF uses the Router LSAs of neighbors to calculate a cost to the ABR router that generated the LSA type 3 summary route.

So RA uses its  own Router LSA and cost of 3 to reach RB, then uses RB's router LSA to calculate a cost of 1 between RB and Rc (the ABR).

So, from the point of view of router A in your network diagram the cost to the ABR is 3+1 = 4 and I guess the cost of the summary route as advertised by router C in your network diagram is 1.

This ends up with a total cost of 5 to the inter area prefix from RA.

Hope to help

Giuseppe

Disclaimer

The Author of this posting offers the information contained within this posting without consideration and with the reader's understanding that there's no implied or expressed suitability or fitness for any purpose. Information provided is for informational purposes only and should not be construed as rendering professional advice of any kind. Usage of this posting's information is solely at reader's own risk.

Liability Disclaimer

In no event shall Author be liable for any damages whatsoever (including, without limitation, damages for loss of use, data or profit) arising out of the use or inability to use the posting's information even if Author has been advised of the possibility of such damage.

Posting

Ditto.

Thx Giuseppe Larosa !!!!!!!!!

Review Cisco Networking products for a $25 gift card