OSPF Cost Calculator
Cost is reference bandwidth divided by interface bandwidth, rounded down, never below 1. The interesting part is what that does to modern link speeds.
Local toolYour network plan stays in your browser. Nothing you enter is uploaded, logged, or sent to any server.
Common speeds at this reference
Why the default reference bandwidth is a problem
OSPF cost is reference ÷ bandwidth, rounded down to an integer, with a floor of
1. The reference has defaulted to 100 Mbit/s since OSPF was specified, and on most platforms it
still does.
Everything at or above the reference gets cost 1. A 100 Mbit/s link, a gigabit link and a 100-gigabit link are all cost 1, so OSPF cannot tell them apart. A path over three 100 Mbit/s links costs 3; a single 100-gigabit link costs 1 — but so does a single 100 Mbit/s link, and traffic will happily take it over a faster alternative with one more hop.
Raise the reference everywhere or nowhere. The setting is per-router. If one router uses 100 Mbit/s and its neighbour uses 100 Gbit/s, they compute different costs for the same links and choose different paths in each direction. Asymmetric routing follows, and so do the problems that come with it. Changing it is a coordinated change across the whole OSPF domain, which is exactly why so many networks never did.
Cost can also be set directly on an interface, which overrides the calculation entirely and is often the more predictable choice for links you care about.
The reference has to be the same everywhere
Cost is calculated locally by each router from its own reference bandwidth. Nothing in OSPF checks that neighbours agree on what that reference is, and nothing complains when they do not. A router with the reference raised to 100 Gbit/s and its neighbour still on the default will each compute a different cost for the same physical link, so the two are describing different topologies while believing they agree.
The result is not a clean failure. Routing still works, adjacencies still form, and traffic simply takes paths nobody intended — sometimes asymmetrically, arriving one way and leaving another. That is a genuinely unpleasant thing to diagnose, because every individual router is behaving correctly according to its own configuration.
Changing it is a maintenance event
Raising the reference bandwidth is the standard fix for a modern network, and it changes the cost of every interface at once. That means a full recalculation across the area, and during the window in which some routers have been changed and others have not, the inconsistency above is exactly what you have. Plan it as a single co-ordinated change rather than as something to work through a device at a time.
The alternative is to stop deriving cost from bandwidth and set it explicitly per interface. That removes the reference from the picture entirely and gives you exact control, at the price of a number that no longer updates itself when a link is upgraded. Neither approach is wrong. What causes trouble is a network where half the interfaces are calculated and half are hard-set, and nobody has written down which is which.
Related tools
OSPF Area Designer checks a whole topology. BGP Best-Path Simulator covers the other protocol.