Troubleshooting notes · Routing
Floating static route always used: the administrative distance is too low
A backup static route is used all the time instead of the route it should back up. How to spot it in the routing table and choose the right administrative distance. Real output from Cisco IOS XE 17.18.
The symptom
A static default route was added as a backup, but it's used all the time. Internet traffic goes the long way, and the default route from the ISP shows as r> (RIB failure) in show ip bgp.
R1# show ip route 0.0.0.0
Routing entry for 0.0.0.0/0, supernet
Known via "static", distance 10, metric 0, candidate default path
R1# traceroute 203.0.113.1 source loopback1
1 10.0.12.2 [AS 64500] 2 msec
2 198.51.100.6 [AS 64500] 2 msec
Why it happens
When two sources offer the same prefix, the router installs the one with the lowest administrative distance (AD). The "backup" static was configured with AD 10, but the primary default comes from eBGP, which has AD 20. 10 is lower than 20, so the backup always wins.
Default ADs: connected 0, static 1, eBGP 20, EIGRP 90, OSPF 110, EIGRP external 170, iBGP 200.
The fix
A floating static must have a higher AD than the route it backs up. Anything above 20 works here; 250 is a common choice, above every routing protocol. Entering the same prefix and next hop with a new distance replaces the old entry:
R1(config)# ip route 0.0.0.0 0.0.0.0 10.0.12.2 250
R1# show running-config | include ip route
ip route 0.0.0.0 0.0.0.0 10.0.12.2 250
Check it
show ip route 0.0.0.0 should now show the BGP route. Shut the ISP link, and the static route (AD 250) should take over.
Always check which protocol you're backing up. An AD of 111 "to be above OSPF" happens to work here too, but if the primary route came over iBGP (AD 200), the 111 static would win and carry all the traffic.
Practise this fault
This fault is in ENARSI Lab 01, one of the free labs: a ready-made GNS3 project where you find and fix it yourself, with the tested solution. Get it with 14 more free labs, by email:
We’ll email you the download links and occasional lab tips. Unsubscribe with one click, any time. Your address is never shared.