Interface Bandwidth Misconfigured Causing Wrong Routing Metric
Presenting Symptom
Traffic from Branch A to Branch B is taking a suboptimal path through the main campus instead of the direct link, causing increased latency and packet loss.
Network Context
The network consists of two branch offices (Branch A and Branch B) connected via a direct point-to-point link (10.0.0.0/30) and also through a main campus router (10.0.1.0/30 and 10.0.2.0/30). All routers are Cisco 4321 running IOS XE 16.9. OSPF is used as the routing protocol with default metrics. The direct link has a bandwidth of 100 Mbps, but was misconfigured as 10 Mbps on Branch A's interface, causing OSPF to prefer the higher-bandwidth campus path.
Diagnostic Steps
Check the routing table on Branch A
show ip route 10.0.3.0Routing entry for 10.0.3.0/24 Known via "ospf 1", distance 110, metric 20 Last update from 10.0.1.1 on GigabitEthernet0/1 * 10.0.1.1, via GigabitEthernet0/1
The route to Branch B's LAN (10.0.3.0/24) is learned via the campus router (10.0.1.1) with metric 20, instead of the direct link (10.0.0.2) which should have a lower metric. This indicates OSPF is preferring the campus path.
Examine OSPF interface parameters on Branch A
show ip ospf interface GigabitEthernet0/0GigabitEthernet0/0 is up, line protocol is up
Internet Address 10.0.0.1/30, Area 0
Process ID 1, Router ID 1.1.1.1, Network Type POINT-TO-POINT, Cost: 10
Transmit Delay is 1 sec, State POINT-TO-POINT
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:03
Index 1/1, flood queue length 0
Next 0x0(0)/0x0(0)
Last flood scan length is 1, maximum is 1
Last flood scan time is 0 msec, maximum is 0 msec
Neighbor Count is 1, Adjacent neighbor count is 1
Adjacent with neighbor 2.2.2.2
Suppress hello for 0 neighbor(s)The OSPF cost is 10, which corresponds to a bandwidth of 10 Mbps (reference bandwidth 100 Mbps / 10 Mbps = 10). This is incorrect; the actual bandwidth is 100 Mbps, so the cost should be 1. The misconfigured bandwidth is causing the higher cost.
Check the interface bandwidth configuration on Branch A
show interfaces GigabitEthernet0/0GigabitEthernet0/0 is up, line protocol is up
Hardware is ISR4321-2x1GE, address is aaaa.bbbb.cccc (bia aaaa.bbbb.cccc)
Description: Direct link to Branch B
Internet address is 10.0.0.1/30
MTU 1500 bytes, BW 10000 Kbit/sec, DLY 100 usec,
reliability 255/255, txload 1/255, rxload 1/255The bandwidth (BW) is shown as 10000 Kbit/sec (10 Mbps), confirming the misconfiguration. The actual link speed is 100 Mbps, but the interface bandwidth was manually set to 10 Mbps.
Verify OSPF neighbor status on Branch A
show ip ospf neighborNeighbor ID Pri State Dead Time Address Interface 2.2.2.2 0 FULL/ - 00:00:35 10.0.0.2 GigabitEthernet0/0 3.3.3.3 1 FULL/DR 00:00:32 10.0.1.1 GigabitEthernet0/1
Both neighbors are FULL, so OSPF adjacencies are established. The issue is not a neighbor problem but a metric calculation problem.
Root Cause
The interface GigabitEthernet0/0 on Branch A has its bandwidth manually configured to 10 Mbps using the 'bandwidth 10000' command, while the actual link speed is 100 Mbps. OSPF uses the bandwidth value to calculate the metric (cost = reference bandwidth / interface bandwidth). With a reference bandwidth of 100 Mbps, the cost becomes 10 instead of 1, making the direct link appear less desirable than the campus path (which has a cost of 2 per hop).
Resolution
Verification
Run the following commands to confirm the fix: 1. `show interfaces GigabitEthernet0/0` - Verify bandwidth is now 100000 Kbit/sec. 2. `show ip ospf interface GigabitEthernet0/0` - Confirm OSPF cost is now 1. 3. `show ip route 10.0.3.0` - Verify the route now points to 10.0.0.2 via GigabitEthernet0/0 with metric 1.
Prevention
1. Avoid manually setting bandwidth on interfaces unless the actual speed differs from the default (e.g., for subinterfaces or tunnel interfaces). 2. Use the 'auto cost reference-bandwidth' command to set a consistent reference bandwidth across all routers (e.g., 10000 for 10 Gbps). 3. Regularly audit OSPF costs and routing tables to detect metric anomalies.
CCNA Exam Relevance
On the CCNA 200-301 exam, this scenario tests understanding of OSPF metric calculation and the impact of interface bandwidth on routing decisions. Questions may present a troubleshooting scenario where traffic takes a suboptimal path, and you must identify that the bandwidth misconfiguration causes an incorrect OSPF cost. Expect multiple-choice or drag-and-drop questions asking to identify the root cause or the corrective command.
Exam Tips
Remember that OSPF cost is calculated as reference bandwidth / interface bandwidth. The default reference bandwidth is 100 Mbps.
The 'bandwidth' command does not affect the actual speed of the interface; it only influences routing protocol metrics.
Use 'show ip ospf interface' to quickly see the OSPF cost of an interface.
Commands Used in This Scenario
show interfaces
Displays detailed status and statistics for all interfaces or a specific interface, used to verify interface operational state, errors, and performance.
show ip ospf interface
Displays OSPF interface parameters and status, used to verify OSPF configuration and troubleshoot neighbor relationships.
show ip route
Displays the current IP routing table on a Cisco router, used to verify routes, check next-hop addresses, and troubleshoot connectivity issues.
Test Your CCNA Knowledge
Practice with scenario-based questions to prepare for the CCNA 200-301 exam.
Practice CCNA Questions