The Big Picture

OSPF needs to pick the best path to send your data. But what makes a path "best"?

Here's the thing: it's not about counting how many routers you pass through. It's about finding the fastest route overall.

Think of it Like GPS

"Your GPS doesn't just count streets. It knows the highway is faster than the back road, even if the back road has fewer turns. OSPF does the same thing with network links."

When you ask for directions, GPS considers how fast each road is, not just how many roads. A path with 5 highway segments beats a path with 2 dirt roads every time.

Cost = Speed Rating

Every network link gets a number called "cost". It's simple:

  • Lower number = Faster link = OSPF prefers it
  • Higher number = Slower link = OSPF avoids it if possible

That's really all there is to it. Fiber gets a low cost because it's fast. Old serial lines get a high cost because they're slow.

Quick Reference

Link Type Speed Cost Think of it as...
10G Fiber 10 Gbps 1 Highway - wide open, full speed
1G Fiber 1 Gbps 10 Main road - good traffic flow
FastEthernet 100 Mbps 100 Side street - gets the job done
T1/Serial 1.544 Mbps 64 Dirt road - slow but sometimes necessary

The One Rule to Remember

OSPF adds up the costs along a path. Lowest total wins.

Why Should I Care?

When you understand cost, you control where traffic flows. This is called traffic engineering.

  • Want backups to use the cheap slow link? Raise the cost on the fast link.
  • Want video calls to always use fiber? Make sure fiber has the lowest cost.
  • Need to take a link down for maintenance? Raise its cost sky-high first, traffic moves automatically.

Want More Detail?

Ready to see it in action? Try the interactive tabs above! →

Click any router to see its OSPF view of the network

Link Types

10G Fiber (Cost 1)
1G Fiber (Cost 10)
FastEthernet (Cost 100)
Serial/T1 (Cost 64)

Click a router to view its
SPF tree and routing table

Click a source router, then a destination router to explore paths

Link Types

10G Fiber (Cost 1)
1G Fiber (Cost 10)
FastEthernet (Cost 100)
Serial/T1 (Cost 64)

Select source and destination
to compare available paths

Click any link to fail it, or click a router to see routing changes

Simulation Controls

Link Types

10G Fiber (Cost 1)
1G Fiber (Cost 10)
FastEthernet (Cost 100)
Serial/T1 (Cost 64)

Fail links to see how OSPF
reconverges automatically