routeprotocol.com

OSPF Link Costs

Interface costs are part of the the shortest path first calculation that OSPF performs – the metric that helps OSPF decide what route to take is based on how much it will cost to reach the destination. OSPF can assign a dynamic interface cost based on a formula with a reference bandwidth of 100Mbps.

Cost = Reference Bandwidth / Interface Bandwidth

Interface TypeOSPF Cost
T164
Ethernet10
FastEthernet1
GigabitEthernet1
10 GigabitEthernet1
Example costs using the default reference bandwidth of 100Mbps

As the reference bandwidth is quite low at 100Mbps, speeds above 100Mbps are not distinguishable to OSPF as faster routes. The reference bandwidth can be modified to a higher value using the command auto-cost reference-bandwidth in the router process configuration mode. It is best practice that a consistent reference bandwidth is configured on all OSPF routers. The LSA metric field has a 16-bit limitation, a meaning a maximum cost of 65,535, setting the reference-bandwidth too high may result in low bandwidth interfaces being indistinguishable due to it hitting the metric max value.

If a manual cost is preferred to be set, it can be done with the command ip ospf cost in the interface configuration mode.


Posted

in

, ,

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.