Overview:
Auto-cost Reference Bandwidth is the command used to modify the OSPF metric.
Study Notes:
- Auto-cost reference bandwidth is used to modify the OSPF metric
- The OSPF metric is cost
- Cost is calculated by dividing 100 by the bandwidth in Mbps
- Cost = 100/(bw in Mbps)
- Any result less than 0 will use a cost of 1
- Default OSPF costs using the default reference bandwidth
Interface Bandwidth | Cost |
10 Gigabit Ethernet 10Gbps | 1 |
Gigabit Ethernet 1Gbps | 1 |
FastEthernet 100Mbps | 1 |
Ethernet 10Mbps | 10 |
T1 1.544Mbps | 64 |
768Kbps | 130 |
364Kbps | 274 |
128Kbps | 781 |
64Kbps | 1562 |
56Kbps | 1785 |
- You can change these costs using the auto-cost reference-bandwidth Mbps
- Notice that anything above 100Mbps has a cost of 1 so we would like to modify the default cost on these links to tell OSPF to prefer the higher speed links over the lower speed links
- We set the new reference bandwidth to 10000
- This forces the cost calculation to be 10000/(bw in Mbps) and achieves the following results
Interface Bandwidth | Cost |
10 Gigabit Ethernet 10Gbps | 1 |
Gigabit Ethernet 1Gbps | 10 |
FastEthernet 100Mbps | 100 |
Ethernet 10Mbps | 1000 |
T1 1.544Mbps | 6493 |
768Kbps | 13021 |
364Kbps | 27472 |
128Kbps | 78125 (max is 65535) |
64Kbps | 156250 (max is 65535) |
56Kbps | 178571 (max is 65535) |
- The max cost for a Cisco router interface is 65535
- The command to apply auto-cost reference bandwidth is:
Router(config)#router ospf 1 Router(config-router)#auto-cost reference-bandwidth 10000
Dani Tene
April 24, 2019 at 8:33 amwhat is the command to apply auto-cost reference bandwidth?
Joe Barger (CCNP/CCDP) • Post Author •
April 24, 2019 at 10:04 pmRouter(config)#router ospf 1
Router(config-router)#auto-cost reference-bandwidth <value>
Good question!