A link cost is the OSPF metric used to select the best, or shortest, path. A route’s cost is the cumulative cost of the outbound interfaces along that path. The two sides of a link should have matching costs; otherwise, the configuration is considered inconsistent. section 18.1.3
OSPF calculates default cost from reference bandwidth divided by link bandwidth, assigning a minimum cost of 1:
- 10 Mbps = 10; 100 Mbps = 1; 1 Gbps = 1; 10 Gbps = 1. section 18.1.3
- The default 100 Mbps reference bandwidth makes 100 Mbps and faster links appear equally preferable, potentially producing suboptimal routes. section 18.1.3
Calculating and changing cost
A route from R1 to 192.168.3.0/24 has cost 3 when three outbound interfaces each cost 1. On Cisco IOS, configure a larger reference bandwidth with `auto-cost reference-bandwidth 1000`; apply the same reference bandwidth consistently across routers.
