OSPFCCNA 200-301

OSPF Reference Bandwidth Inconsistent Causing Wrong Path Selection

Presenting Symptom

Traffic from Branch A to Branch B takes a suboptimal path via a slower link instead of the direct high-speed link, causing higher latency and lower throughput.

Network Context

The network consists of three routers (R1, R2, R3) in a triangle topology at an enterprise campus. R1 and R2 are connected via a 1 Gbps link, R2 and R3 via 1 Gbps, and R1 and R3 via a 100 Mbps link. All routers run OSPF in area 0. R1 and R2 have the default reference bandwidth of 100 Mbps, while R3 has been configured with auto-cost reference-bandwidth 1000. This inconsistency causes OSPF to calculate incorrect metrics, leading to suboptimal path selection.

Diagnostic Steps

1

Check OSPF routes on R1

show ip route ospf
O    10.2.0.0/16 [110/2] via 192.168.13.3, 00:00:05, GigabitEthernet0/2
O    10.3.0.0/16 [110/3] via 192.168.12.2, 00:00:05, GigabitEthernet0/1

The route to 10.2.0.0/16 (Branch B) is learned via R3 (192.168.13.3) with cost 2, instead of via R2 (192.168.12.2) which should have a lower cost. This indicates suboptimal path selection.

2

Examine OSPF interface costs on all routers

show ip ospf interface brief
On R1:
Interface    PID   Area    Cost  State Nbrs F/C
Gi0/1       1     0       1     DR    1/1
Gi0/2       1     0       10    BDR   1/1

On R3:
Interface    PID   Area    Cost  State Nbrs F/C
Gi0/1       1     0       10    DROTH 1/1
Gi0/2       1     0       1     BDR   1/1

R1's Gi0/1 (to R2) has cost 1, Gi0/2 (to R3) has cost 10. R3's Gi0/1 (to R1) has cost 10, Gi0/2 (to R2) has cost 1. This is inconsistent: both 1 Gbps links should have the same cost. The cost mismatch indicates a reference bandwidth inconsistency.

3

Check OSPF reference bandwidth on each router

show running-config | include auto-cost
On R1: (no output)
On R2: (no output)
On R3: auto-cost reference-bandwidth 1000

R1 and R2 use default reference bandwidth (100 Mbps), while R3 uses 1000 Mbps. This causes R3 to calculate costs differently: 1 Gbps link cost = 1000/1000 = 1, but R1 calculates 100/1000 = 0.1, which is rounded to 1. However, the 100 Mbps link cost on R1 is 100/100 = 1, but on R3 it is 1000/100 = 10. This mismatch leads to asymmetric cost values and suboptimal routing.

4

Verify OSPF neighbor relationships and LSDB

show ip ospf neighbor
On R1:
Neighbor ID     Pri   State           Dead Time   Address         Interface
192.168.12.2      1   FULL/DR         00:00:35    192.168.12.2    GigabitEthernet0/1
192.168.13.3      1   FULL/BDR        00:00:32    192.168.13.3    GigabitEthernet0/2

All OSPF neighbors are FULL, so the issue is not adjacency. The problem is purely metric calculation due to reference bandwidth mismatch.

Root Cause

The OSPF reference bandwidth is inconsistent across the network: R1 and R2 use the default of 100 Mbps, while R3 is configured with auto-cost reference-bandwidth 1000. This causes OSPF to calculate different costs for the same link speeds, leading to incorrect metric values and suboptimal path selection. Specifically, the 100 Mbps link between R1 and R3 appears cheaper to R1 (cost 1) than to R3 (cost 10), and the 1 Gbps link between R1 and R2 appears cost 1 on both, but the overall path cost calculation becomes asymmetric, causing R1 to prefer the slower 100 Mbps path to reach networks behind R3.

Resolution

Standardize the OSPF reference bandwidth on all routers to the same value. Typically, set it to 10000 (10 Gbps) or 1000 (1 Gbps) to accommodate higher-speed links. On each router, enter global configuration mode and apply: R1(config)# router ospf 1 R1(config-router)# auto-cost reference-bandwidth 1000 R2(config)# router ospf 1 R2(config-router)# auto-cost reference-bandwidth 1000 R3(config)# router ospf 1 R3(config-router)# auto-cost reference-bandwidth 1000 This ensures all routers calculate costs consistently: cost = reference-bandwidth / interface bandwidth (in bps). After configuration, OSPF will recalculate metrics and select the optimal path.

Verification

Run 'show ip route ospf' on R1 to confirm the route to Branch B now uses the direct high-speed link via R2: R1# show ip route ospf O 10.2.0.0/16 [110/2] via 192.168.12.2, 00:00:05, GigabitEthernet0/1 Also verify consistent interface costs with 'show ip ospf interface brief' on all routers: R1# show ip ospf interface brief Interface PID Area Cost State Nbrs F/C Gi0/1 1 0 1 DR 1/1 Gi0/2 1 0 10 BDR 1/1 R3# show ip ospf interface brief Interface PID Area Cost State Nbrs F/C Gi0/1 1 0 10 DROTH 1/1 Gi0/2 1 0 1 BDR 1/1 Now both routers agree on costs: 1 Gbps links cost 1, 100 Mbps links cost 10.

Prevention

1. Standardize OSPF reference bandwidth across all routers in the OSPF domain during initial deployment. 2. Use a reference bandwidth that is at least as high as the fastest link in the network (e.g., 10000 for 10 Gbps) to avoid fractional costs. 3. Document and enforce a consistent OSPF configuration template for all routers.

CCNA Exam Relevance

On the CCNA 200-301 exam, this scenario may appear as a troubleshooting question where you must identify why OSPF is not choosing the best path. The exam tests understanding of OSPF metric calculation (cost = reference bandwidth / interface bandwidth) and the impact of inconsistent reference bandwidth. You may be asked to select the correct command to fix the issue or interpret show command output to identify the mismatch.

Exam Tips

1.

Remember that OSPF cost is inversely proportional to bandwidth; higher bandwidth = lower cost.

2.

The default reference bandwidth is 100 Mbps; if your network has links faster than 100 Mbps, you must adjust the reference bandwidth to avoid equal-cost paths.

3.

Know the command 'auto-cost reference-bandwidth' and that it must be consistent across all routers in the OSPF domain.

Commands Used in This Scenario

Test Your CCNA Knowledge

Practice with scenario-based questions to prepare for the CCNA 200-301 exam.

Practice CCNA Questions