Study FAQ
When does a floating static route take over from the primary route?
Also asked as 2
- Why is a configured floating static route missing while the primary path works?
- How can I verify that a floating static route becomes active when the preferred route is withdrawn?
Answer
A floating static route can take over when the preferred route for the same prefix leaves the routing table and the backup's next hop remains usable. Give the backup a numerically higher administrative distance than the primary. While the primary is present, the backup can remain in the configuration without appearing as the active route.
Compare the entire prefix, including its length. If the two paths specify different prefixes, each can remain installed and the more specific one can carry matching traffic even when it has a higher distance. If an upstream failure leaves the primary next hop resolvable, the primary may stay installed. An upstream outage and a route withdrawal are separate observations.
In an isolated Cisco IOS XE 17.15.x lab, suppose the primary static route for 198.51.100.0/24 has distance 1. With a separate reachable backup next hop, enter ip route 198.51.100.0 255.255.255.0 192.0.2.9 200 in global configuration mode. The final number is the backup's administrative distance. An IPv6 ipv6 route command also accepts the distance after the next hop or exit interface specification.
Compare the installed prefix and next hop before failure, during a controlled withdrawal, and after restoration. Verify the backup can carry traffic with a return path while the primary is absent. Once the primary is eligible again, confirm that the preferred next hop returns.
References
Full explanation
Routing Tables, Forwarding Decisions, and Static Routes
Study guide · 200-301
Read the full explanation