What is a floating static route, how do you configure it, and how does it provide automatic failover?
A floating static route has a manually increased Administrative Distance so it "hides" behind a preferred route. When the preferred route disappears (link failure), the floating static automatically activates as a backup.
* Floating static route failover by AD (Administrative Distance). *
The concept:
- Normal static route AD = 1 (very trusted — beats almost everything)
- OSPF (Open Shortest Path First) AD = 110, EIGRP (Enhanced Interior Gateway Routing Protocol) AD = 90, RIP (Routing Information Protocol) AD = 120
- A floating static route is configured with AD higher than the primary route
Configuration example — backup default route:
! Primary default via R2 (via OSPF or normal static, AD=1)
R1(config)# ip route 0.0.0.0 0.0.0.0 172.16.2.2
! Backup default via R3 (floating static, AD=5)
R1(config)# ip route 0.0.0.0 0.0.0.0 10.10.10.2 5
! IPv6 equivalents:
R1(config)# ipv6 route ::/0 2001:db8:acad:2::2
R1(config)# ipv6 route ::/0 2001:db8:feed:10::2 5
What happens:
- Normal operation: Primary route (AD=1) is in the routing table. Floating static (AD=5) is hidden — not installed because AD 5 > AD 1
- Primary link fails: Primary route is withdrawn from the table
- Failover: Floating static (AD=5) is now the only route → automatically installed
- Primary recovers: Primary route returns (AD=1) → floating static hides again
Verification — floating route is hidden:
R1# show ip route static | begin Gateway
Gateway of last resort is 172.16.2.2 to network 0.0.0.0
S* 0.0.0.0/0 [1/0] via 172.16.2.2 ← Only primary shown!
The floating static (via 10.10.10.2 with AD=5) does NOT appear — it's in the config but not the routing table.
Tip: Check show running-config | include ip route to see ALL configured routes, including hidden floating statics. The routing table only shows installed (active) routes.
Go deeper:
Administrative distance (Wikipedia) — the AD ranking that keeps a higher-AD route hidden until the primary drops.
Failover (Wikipedia) — the automatic-backup-on-failure concept the floating route implements at L3.