Floating static routes: cheap failover that actually fails over
Floating static routes are one of the simplest and most misunderstood failover mechanisms in networking. They cost nothing, require no protocol overhead, and can failover in milliseconds - but only if you understand administrative distance and configure them correctly. This guide covers the mechanics, the gotchas, and why they work.
What is a floating static route?
A floating static route is a backup route that sits in the routing table only when a primary route disappears. It uses a higher administrative distance (AD) than the primary route, so the router prefers the primary path. When the primary route is withdrawn - because the next-hop becomes unreachable or a dynamic routing protocol removes it - the floating route activates automatically.
Unlike dynamic routing protocols, floating static routes do not detect link or neighbor failures on their own. They rely on the primary route being removed from the routing table. This is both their strength and their limitation.
How administrative distance makes it work
Administrative distance is the trustworthiness score a router assigns to a routing source. Lower AD values are preferred. A directly connected interface has AD 0. A static route has AD 1 by default. OSPF is AD 110. RIP is AD 120.
To create a floating static route, you assign it an AD higher than the primary route. If the primary is a connected interface (AD 0) or a static route (AD 1), set the floating route to AD 2 or higher. If the primary comes from OSPF (AD 110), set the floating route to AD 111 or higher.
! Primary static route via ISP1 ip route 0.0.0.0 0.0.0.0 203.0.113.1 ! Floating static route via ISP2 (backup) ip route 0.0.0.0 0.0.0.0 198.51.100.1 2 ! Verify the routing table show ip route static
In this example, the primary route (AD 1) to ISP1 is installed. The floating route (AD 2) to ISP2 stays in the routing table but is not used. When 203.0.113.1 becomes unreachable, the primary route is removed, and the floating route activates immediately.
Why floating routes fail to fail over (and how to fix it)
The most common failure is when the primary next-hop remains reachable even though the link is down. A static route does not verify that traffic can actually reach the destination - only that the next-hop IP is reachable via some route.
- →Next-hop is on a directly connected subnet: the route stays in the table even if the physical link is down, unless you configure interface tracking.
- →Next-hop is learned via another routing protocol: if that protocol is slow to converge or flaps, failover may be delayed or unstable.
- →No tracking mechanism: static routes do not monitor link health, only next-hop reachability.
To make floating static routes reliable, use object tracking. Most enterprise routers support track objects that monitor interface state, IP reachability, or routing table entries.
! Track whether 203.0.113.1 is reachable track 1 ip route 203.0.113.0 255.255.255.0 reachability ! Primary static route with tracking ip route 0.0.0.0 0.0.0.0 203.0.113.1 track 1 ! Floating route (no tracking needed) ip route 0.0.0.0 0.0.0.0 198.51.100.1 2
When to use floating static routes
- →Small branch offices with two Internet links: simple, no licensing, minimal CPU.
- →Failover between two data centers connected by static routes: predictable, fast, no convergence timer.
- →Backup to a dynamic routing protocol: floating static route activates if OSPF or BGP fails.
- →Lab and certification study: understanding AD is essential for CCNA and NSE exams.
Floating static routes are not a replacement for dynamic routing in large networks. They scale poorly, offer no load balancing, and provide no visibility into network topology. But for simple, two-path failover scenarios, they are fast, free, and predictable.