liveBook · Manning

Auto-cost reference-bandwidth

As explained in Acing the CCNA Exam: Volume 1 Fundamentals and Protocols

auto-cost reference-bandwidth is a Cisco IOS OSPF router-configuration command that sets the reference bandwidth used for automatic cost calculation.

auto-cost reference-bandwidth sets the OSPF reference bandwidth used to calculate interface costs automatically. OSPF calculates cost by dividing the reference bandwidth by link bandwidth; the default reference bandwidth is 100 Mbps, so faster links can receive the same cost and cause undesirable ECMP. section 18.1.3 section 18.5

Use the command in OSPF router configuration mode to:

  • Set a value such as 1000 Mbps, giving GigabitEthernet links a cost of 1 and FastEthernet links a cost of 10. section 18.1.3
  • Apply the same reference bandwidth on every OSPF router; inconsistent values can produce inconsistent route selection and routing loops. section 18.1.3
  • Choose a value matching the fastest link, or choose a higher value to accommodate faster future links. section 18.1.3

Cisco IOS configuration

R1(config)# router ospf 1 R1(config-router)# auto-cost reference-bandwidth 1000 % OSPF: Reference bandwidth is changed. Please ensure reference bandwidth is consistent across all routers. Verify results with: show ip ospf interface brief section 18.1.3

R1# show ip ospf interface brief
Interface    PID   Area   IP Address/Mask    Cost  State Nbrs F/C
Gi0/0        1     0      10.0.0.1/30        1     DR    1/1       #1
Fa1/0        1     0      10.0.0.5/30        1     DR    1/1       #1
R1# configure terminal
R1(config)# router ospf 1                                          #2
R1(config-router)# auto-cost reference-bandwidth 1000              #3
% OSPF: Reference bandwidth is changed.                            #4
        Please ensure reference bandwidth is consistent
 across all routers.                                             #4
R1(config-router)# do show ip ospf interface brief
Interface    PID   Area   IP Address/Mask    Cost  State Nbrs F/C
Gi0/0        1     0      10.0.0.1/30        1     DR    1/1       #5
Fa1/0        1     0      10.0.0.5/30        10    DR    1/1       #5
#1 G0/0 and F1/0 have identical costs: 1.
#2 Enters OSPF router config mode
#3 Sets the reference bandwidth to 1000 Mbps (1 Gbps)
#4 IOS gives a warning message.
#5 G0/0’s cost remains at 1, but F1/0’s cost is now 10.

Inspect the command sequence and compare interface costs before and after changing the reference bandwidth. section 18.1.3

How Acing the CCNA Exam: Volume 1 Fundamentals and Protocols covers it

How deep it goes
Explains the cost formula, demonstrates CLI configuration, and highlights consistency risks across routers.
Examples
Uses 1000 Mbps, GigabitEthernet, FastEthernet, and show ip ospf interface brief output.
What it assumes
Assumes basic OSPF and interface-bandwidth concepts while defining cost calculation and configuration context.
What you can do after
Configure automatic OSPF costs with auto-cost reference-bandwidth and verify them with show ip ospf interface brief.
How it connects
Connects OSPF cost with ECMP, interface bandwidth, route selection, and routing loops.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Acing the CCNA Exam: Volume 1 Fundamentals and Protocols. The section links point to the parts of the book it draws on.