A structured lesson workspace with readable content, hands-on examples, and a clean path to completion.
Notice `Cost: 1` on a Gigabit interface. Why 1? Because the default reference bandwidth in older IOS is 100 Mbps, so 100/1000 = 0.1 — rounded up to 1 (minimum cost is 1). This means on modern networks, all links 100 Mbps and above have the same cost. Bad for path selection.
| Interface speed | Cost with ref BW 100 Mbps | Cost with ref BW 10 Gbps | Cost with ref BW 100 Gbps |
|---|---|---|---|
| 10 Mbps | 10 | 1000 | 10000 |
| 100 Mbps | 1 | 100 | 1000 |
| 1 Gbps | 1 | 10 | 100 |
| 10 Gbps | 1 | 1 | 10 |
| 100 Gbps | 1 | 1 | 1 |
With the legacy reference bandwidth of 100 Mbps, everything 100 Mbps or faster has cost 1. OSPF can't tell a 1 Gbps link from a 100 Gbps link. This is why modern networks must change the reference bandwidth.
! Change reference bandwidth globally — required on every OSPF routerR1(config)# router ospf 1R1(config-router)# auto-cost reference-bandwidth 100000! This sets reference to 100 Gbps (units are Mbps in the command)! Verify interface costsR1# show ip ospf interface brief
The reference bandwidth MUST match on all routers in the OSPF domain. If one router uses 100 Mbps and another uses 100 Gbps, they'll disagree on costs and route selection becomes unpredictable. Configure it consistently, and do it during a maintenance window.
! Override cost on a specific interfaceR1(config)# interface gigabitEthernet0/1R1(config-if)# ip ospf cost 5! VerifyR1# show ip ospf interface gigabitEthernet0/1 | include Cost
Manual cost override is useful when you want OSPF to prefer a specific path for a reason other than bandwidth — for example, a router with better CPU, a lower-latency WAN link, or a link that isn't carrying other traffic. It's the same concept as the STP cost manipulation from Section 7.
OSPF installs up to 4 equal-cost paths by default (16 with `maximum-paths 16`). Load balancing is per-flow (like EtherChannel), based on a hash of source and destination. Unlike EtherChannel, this works at Layer 3 — you don't need physical link bundling.
Cost manipulation in OSPF is a design decision, not a fix. If OSPF picks a path you don't like, first ask whether the reference bandwidth is correct. Nine times out of ten, fixing the reference bandwidth is the real solution — cost overrides are a band-aid over a misconfigured default.
Finish the lesson once you have worked through the material. This awards ★ 30 XP.