Home > Blog > Cisco Certified Network Associate > OSPF Metric: Understanding Cost in CCNA

OSPF Metric: Understanding Cost in CCNA

Cisco CCNA Cert Sensei Team 2026-09-06 5 min read

OSPF uses 'cost' as its metric, calculated by dividing a reference bandwidth (default 100 Mbps) by the interface's actual bandwidth.

#OSPF Metric #OSPF Cost #CCNA #Routing #Networking

The OSPF Cost Formula

By default, OSPF cost is calculated as 10^8 (100 Mbps) / Interface Bandwidth in bps. Lower cost indicates a faster, preferred path.

The Reference Bandwidth Problem

Because the default reference bandwidth is 100 Mbps, OSPF treats FastEthernet, GigabitEthernet, and 10G links all with a cost of 1, unable to distinguish their speeds.

Adjusting the Cost

Use the 'auto-cost reference-bandwidth' command to change the reference bandwidth globally, or manually set an interface's cost using 'ip ospf cost'.

❓ Frequently Asked Questions

What happens if OSPF paths have equal cost?

OSPF will load balance across the paths automatically. This is known as Equal Cost Multi-Path (ECMP).


Do I need to change reference bandwidth on all routers?

Yes, it is best practice to configure the same reference bandwidth on all OSPF routers in the network to ensure consistent routing decisions.


What is the cost of a loopback interface?

By default, Cisco sets the OSPF cost of a loopback interface to 1.

More from Cisco Certified Network Associate

🧠

Test Your Knowledge

Ready to practice Certified Network Associate? Put what you've learned to the test.

Try 10 Free Questions

⭐ 1,000 expert-curated questions available with Premium

Upgrade Premium
📖 Browse the Glossary

Join thousands of certification students

Sign Up Free