ROUTING

OSPF Cost: What the Number Really Changes

A field-focused explanation of OSPF interface cost, reference bandwidth and safe path-engineering practices.

Routing path illustration

OSPF compares total path cost

OSPF builds a link-state view of the area and calculates shortest paths based on cost. Each interface contributes a cost, and the router prefers the path with the lowest accumulated total.

That makes cost an important engineering control. A seemingly small interface-cost change can move traffic across the network, change ECMP behavior or expose a backup path to load it was not designed to carry.

Reference bandwidth needs to match modern speeds

Many platforms derive cost by dividing a configured reference bandwidth by the interface bandwidth. Older defaults were created when 100 Mbps was considered fast. In a network with 1G, 10G, 40G and 100G interfaces, that default can collapse several speeds to the same minimum cost.

Raising the reference bandwidth restores useful differentiation. Whatever value you choose should be applied consistently across the OSPF domain unless the design intentionally says otherwise.

Manual cost is sometimes clearer

For engineered topologies, manually assigning interface cost can make intent explicit. A primary path can have lower cost and a backup higher cost regardless of physical interface speed.

The tradeoff is operational discipline. Manual values need documentation, and future circuit upgrades will not automatically change the cost. Engineers reviewing a path must understand whether cost is derived or explicitly set.

Cost changes are production routing changes

Before changing cost, identify every prefix that could prefer the affected adjacency, the capacity of alternate links and whether stateful services or asymmetric paths are involved. Verify how quickly the IGP will reconverge and what monitoring will prove the expected path after the change.

In maintenance planning, define both the desired state and the rollback trigger. If traffic shifts somewhere unexpected, operators should know what command restores the prior cost and how to confirm recovery.

Troubleshooting an unexpected OSPF path

Check the local interface cost, remote topology, area boundaries, equal-cost alternatives, route type and any redistribution. Do not stop at the first router; OSPF decisions are based on the full topology known to the calculating router.

A cost calculator is useful for verifying arithmetic, but the route table and link-state database are the source of truth for what the router actually learned and selected.

← Back to all guidesBrowse network tools →
Use these guides as engineering references, not as a substitute for your network design standards, current vendor documentation or production change review.