OSPF
ROUTING

OSPF Cost Calculator

Calculate OSPF interface cost from reference bandwidth and interface speed.

Engineering note: These utilities are intended to speed up planning and validation. Verify production changes against your organization’s standards, current vendor documentation and change-control process.

About this tool

OSPF chooses paths using interface cost. On many platforms the cost is derived from a reference bandwidth divided by interface bandwidth, though vendors allow manual cost configuration and may use different defaults.

The calculator helps you see what a given reference bandwidth produces on a link and why modern networks often raise the default reference value to distinguish 1G, 10G, 40G and 100G interfaces.

How to use it

  1. Enter the reference bandwidth used by your OSPF design.
  2. Enter the interface bandwidth.
  3. Calculate the resulting cost, then compare it with neighboring links and any manually configured costs.

Example: 100,000 Mbps reference with a 10,000 Mbps link

100,000 divided by 10,000 gives an OSPF cost of 10. A 100 Gbps link under the same reference would calculate to cost 1.

Engineering notes

  • Keep reference-bandwidth settings consistent across the OSPF domain unless you have a deliberate design reason not to.
  • Changing OSPF costs can move live traffic. Treat reference-bandwidth changes as routing changes and review their blast radius.

Frequently asked questions

Why is the old default reference bandwidth a problem?

A 100 Mbps reference can make Fast Ethernet and much faster interfaces all calculate to the minimum cost, eliminating useful path differentiation.

Can I set OSPF cost manually?

Yes on major routing platforms. A manual cost usually overrides the calculated interface cost.

Does lower OSPF cost win?

Yes. OSPF prefers the path with the lowest total accumulated cost to the destination.

Related tools