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
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 | |
| 1G Fiber | 1 Gbps | 10 | |
| FastEthernet | 100 Mbps | 100 | |
| T1/Serial | 1.544 Mbps | 64 |
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! →
Link Types
Click a router to view its
SPF tree and routing table
Link Types
Select source and destination
to compare available paths
Simulation Controls
Link Types
Fail links to see how OSPF
reconverges automatically