Static RoutingCCNA 200-301

Static Route and Dynamic Route Conflict — Wrong AD

Presenting Symptom

Users in the branch office cannot reach the remote server at 10.10.10.0/24, although both a static route and an OSPF-learned route exist for that network.

Network Context

A small branch office with one Cisco 4321 router (R1) connects to the HQ via a serial link (S0/1/0) and to a local ISP via GigabitEthernet0/1. R1 runs OSPF with the HQ router (R2) over the serial link, learning the route to 10.10.10.0/24 via OSPF with an administrative distance (AD) of 110. A static route to 10.10.10.0/24 pointing to the ISP (next-hop 192.168.1.2) is also configured with an AD of 115. The static route was intended as a backup, but due to a misconfiguration, its AD is set to 105, making it preferred over the OSPF route.

Diagnostic Steps

1

Check the routing table for the destination network

show ip route 10.10.10.0
Routing entry for 10.10.10.0/24
  Known via "static", distance 105, metric 0
  Last update from 192.168.1.2 on GigabitEthernet0/1
  * 192.168.1.2, via GigabitEthernet0/1

The routing table shows the static route is installed (distance 105) instead of the OSPF route (distance 110). This indicates the static route has a lower AD than expected, causing it to be preferred.

2

Verify the configured static route and its AD

show running-config | include ip route 10.10.10.0
ip route 10.10.10.0 255.255.255.0 192.168.1.2 105

The static route is configured with AD 105. Normally, a static route defaults to AD 1, but here it's explicitly set to 105, which is lower than OSPF's 110. This confirms the misconfiguration.

3

Check OSPF-learned route details

show ip route ospf | include 10.10.10.0
O    10.10.10.0/24 [110/2] via 10.0.0.2, 00:10:23, Serial0/1/0

The OSPF route exists with AD 110 but is not installed because the static route has a lower AD. The route is present but not active.

4

Trace the path to the destination to confirm traffic takes the wrong path

traceroute 10.10.10.1
Type escape sequence to abort.
Tracing the route to 10.10.10.1
  1 192.168.1.2 4 msec 4 msec 4 msec
  2 * * *

Traffic is going to the ISP (192.168.1.2) instead of the HQ router (10.0.0.2). This confirms the static route is being used, likely causing connectivity failure if the ISP does not route the traffic correctly.

Root Cause

The static route to 10.10.10.0/24 is configured with an administrative distance of 105, which is lower than OSPF's default AD of 110. This causes the static route to be preferred over the OSPF-learned route, even though the static route points to an ISP that does not have a path to the destination network, resulting in connectivity loss.

Resolution

Remove the incorrect static route and reconfigure it with a higher AD (e.g., 115) to ensure OSPF is preferred. Commands: R1(config)# no ip route 10.10.10.0 255.255.255.0 192.168.1.2 105 R1(config)# ip route 10.10.10.0 255.255.255.0 192.168.1.2 115 Explanation: The 'no' command removes the misconfigured static route. The new command adds a static route with AD 115, which is higher than OSPF's 110, so OSPF will be preferred when available.

Verification

Run 'show ip route 10.10.10.0' to confirm the OSPF route is now installed. Expected output: Routing entry for 10.10.10.0/24 Known via "ospf 1", distance 110, metric 2 Last update from 10.0.0.2 on Serial0/1/0 * 10.0.0.2, via Serial0/1/0 Also run 'traceroute 10.10.10.1' to verify traffic goes through the HQ router. Expected output: 1 10.0.0.2 4 msec 4 msec 4 msec 2 ...

Prevention

1. Always use a higher AD for backup static routes (e.g., 125 or 150) to ensure dynamic protocols are preferred. 2. Document and standardize AD values for static routes in the network design. 3. Verify routing table entries after configuration changes to ensure the expected route is active.

CCNA Exam Relevance

On the CCNA 200-301 exam, this scenario tests understanding of administrative distance and route selection. Questions may present a troubleshooting scenario where a static route overrides a dynamic route due to AD misconfiguration. Candidates must know default AD values (static=1, OSPF=110, EIGRP=90/170) and how to modify static route AD. The exam may ask to identify the root cause or select the correct fix.

Exam Tips

1.

Memorize default administrative distances: connected (0), static (1), EIGRP (90), OSPF (110), RIP (120).

2.

In troubleshooting, always check the routing table first to see which route is installed and its AD.

3.

Remember that a static route with an explicit AD lower than the dynamic route's AD will be preferred, even if the dynamic route is more specific or has a better metric.

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