CIRCUITO
CARIOCA TI · DOCUMENTATION
♙
Routing simulator

OSPF Cost Simulator

Calculate OSPF interface cost and cumulative path metric using a configurable reference bandwidth.

OSPFCostRFC 2328CiscoRouting

OSPF interface cost calculator

Uses the common Cisco auto-cost model: reference bandwidth divided by interface bandwidth, with minimum cost 1.

Cisco default: 100 Mbps. This simulator defaults to 100,000 Mbps to distinguish modern links.
Use the bandwidth value that the router uses for OSPF cost calculation, not necessarily the measured throughput.
Separate values with commas, semicolons or spaces. Every value must be greater than zero.
RFC 2328

OSPF itself does not mandate the bandwidth formula

RFC 2328 defines the interface output cost as a positive link-state metric advertised for the interface. The familiar reference-bandwidth divided by interface-bandwidth formula is an implementation convention, notably used by Cisco auto-cost, rather than a formula required by the OSPFv2 standard itself.

Cisco IOS / IOS XE

Cisco uses a 100 Mbps default reference

On Cisco IOS and IOS XE, OSPF auto-cost uses reference bandwidth divided by interface bandwidth. The default reference is 100 Mbps, which makes 100 Mbps, 1 Gbps, 10 Gbps and faster interfaces all collapse to cost 1 unless the reference bandwidth is increased.

Cisco also allows an explicit interface cost, which overrides the automatically calculated cost.

RouterOS

RouterOS does not require Cisco-style auto-cost behavior

MikroTik RouterOS exposes interface cost directly in the OSPF interface template. Its documentation shows the 100,000,000 divided by bandwidth-in-bps formula only as a way to obtain Cisco-like costs when similar behavior is desired.

SPF

Path metric is cumulative

For a path modeled as a sequence of OSPF links, the simulator adds the cost of each link. OSPF SPF then prefers the lower cumulative metric, subject to the route type and other OSPF rules involved in the route being compared.

FAQ

Frequently asked questions

Does RFC 2328 define cost as reference bandwidth divided by interface bandwidth?+

No. RFC 2328 requires a positive interface output cost. The bandwidth formula is an implementation convention used by platforms such as Cisco IOS and IOS XE.

What is the default Cisco OSPF reference bandwidth?+

100 Mbps. With that reference, interfaces at 100 Mbps or faster normally calculate to the minimum cost of 1.

Why does this simulator default to 100,000 Mbps?+

It is a practical lab and design default that distinguishes 1 Gbps, 10 Gbps and 100 Gbps interfaces instead of collapsing them all to cost 1.

Is OSPF cost based on real-time traffic?+

No. Standard OSPF cost is not dynamically recalculated from current utilization. It uses the configured or derived interface metric.

Does a manually configured interface cost override auto-cost?+

On Cisco IOS and IOS XE, yes. The explicit interface OSPF cost overrides the cost derived from reference bandwidth.

Does MikroTik RouterOS automatically behave exactly like Cisco?+

No. RouterOS exposes an explicit OSPF interface cost. MikroTik documents the Cisco-style formula as a way to reproduce similar costs when desired.

How is the path metric calculated in this simulator?+

It adds the calculated cost of every bandwidth value entered in the optional path list.