Floating Static Routes – Backup Routes, AD & Failover
1. What Is a Floating Static Route?
A floating static route is a static route configured with a deliberately higher Administrative Distance (AD) than the primary route to the same destination. Because the router always installs the route with the lowest AD into the routing table, the floating static route remains invisible — it "floats" in the configuration but is not used for forwarding. Only when the primary route disappears from the routing table does the floating static route surface and take over traffic.
Normal operation (primary OSPF route active): ┌─────────────────────────────────────────────────────┐ │ Routing Table │ │ O 192.168.10.0/24 [110/2] via 10.1.1.2, Gi0/0 │ ← OSPF installed (AD 110) │ │ │ (Floating static NOT in table — AD 200 loses) │ └─────────────────────────────────────────────────────┘ Primary link fails (OSPF route removed): ┌─────────────────────────────────────────────────────┐ │ Routing Table │ │ S 192.168.10.0/24 [200/0] via 10.2.2.2, Gi0/1 │ ← Floating static activates └─────────────────────────────────────────────────────┘
Related pages: Default Routes | Administrative Distance | OSPF Configuration | EIGRP Configuration | show ip route | ping Command | traceroute Command | Static Routing Lab | Floating Static Routes Lab
2. Administrative Distance — The Mechanism Behind Floating Routes
Administrative Distance (AD) is a trustworthiness rating assigned to every route source on a Cisco router. When multiple routing sources offer a path to the same destination prefix, the router installs only the route from the source with the lowest AD. A higher AD means the route is less preferred.
| Route Source | Default AD | Notes |
|---|---|---|
| Directly Connected | 0 | Always preferred — the router is directly attached |
| Static Route | 1 | Default for all static routes; beats every dynamic protocol |
| eBGP | 20 | External BGP routes |
| EIGRP Internal | 90 | Routes learned natively within the EIGRP AS |
| OSPF | 110 | All internal OSPF routes regardless of area |
| RIP | 120 | Based on hop count; widely considered obsolete |
| EIGRP External | 170 | Routes redistributed into EIGRP from another protocol |
| iBGP | 200 | Internal BGP routes |
| Unknown / Unreachable | 255 | AD 255 means the route is never installed in the routing table |
3. Regular Static Route vs Floating Static Route
| Feature | Regular Static Route | Floating Static Route |
|---|---|---|
| Default AD | 1 | Manually set higher than primary (e.g., 10, 100, 200) |
| Route priority | Primary — always preferred over any dynamic protocol | Backup — only installed when all lower-AD routes to same prefix are gone |
| Routing table presence | Always present (as long as next-hop is reachable) | Present only when primary route has failed |
| Typical use | Default routes, stub networks, simple point-to-point links | Redundancy, failover, backup to dynamic routing protocols |
| Interaction with dynamic protocols | Beats dynamic protocols — can accidentally override OSPF/EIGRP routes if misconfigured | Deliberately loses to dynamic protocols; activates when dynamic protocol route is removed |
| Configuration syntax | ip route 10.0.0.0 255.0.0.0 192.168.1.1 |
ip route 10.0.0.0 255.0.0.0 192.168.1.1 200
(AD appended at end) |
4. Configuration Syntax and Examples
Command Syntax
ip route <destination-network> <subnet-mask> <next-hop-IP | exit-interface> [AD] ! The AD is the optional final parameter — if omitted, defaults to 1 ! Valid AD range: 1–255 (255 = never install; use for poisoning)
Example 1 — Floating Static Backing Up a Regular Static Route
! Primary route — AD 1 (default static) ip route 192.168.10.0 255.255.255.0 10.1.1.2 ! Floating backup — AD 10 (higher, so loses to primary static AD 1) ip route 192.168.10.0 255.255.255.0 10.2.2.2 10 ! Routing table when primary is up: S 192.168.10.0/24 [1/0] via 10.1.1.2 ! Routing table when primary next-hop 10.1.1.2 is unreachable: S 192.168.10.0/24 [10/0] via 10.2.2.2
Example 2 — Floating Static Backing Up OSPF
! OSPF learns 192.168.20.0/24 via 10.1.1.2 (AD 110) ! Floating static uses secondary path via 10.2.2.2 (AD 200 > 110) ip route 192.168.20.0 255.255.255.0 10.2.2.2 200 ! Routing table (OSPF active): O 192.168.20.0/24 [110/5] via 10.1.1.2, GigabitEthernet0/0 ! Routing table (OSPF neighbour down, route removed): S 192.168.20.0/24 [200/0] via 10.2.2.2, GigabitEthernet0/1
Example 3 — Floating Default Route (Dual ISP)
! Primary default route via ISP1 — standard static AD 1 ip route 0.0.0.0 0.0.0.0 203.0.113.1 ! Floating backup default via ISP2 — AD 10 (activates only if ISP1 link fails) ip route 0.0.0.0 0.0.0.0 198.51.100.1 10 ! When ISP1 is up: S* 0.0.0.0/0 [1/0] via 203.0.113.1 ! When ISP1 interface goes down: S* 0.0.0.0/0 [10/0] via 198.51.100.1
- AD 2–89: Floating backup for a regular static route (AD 1)
- AD 91–109: Floating backup for EIGRP internal (AD 90)
- AD 111–119: Floating backup for OSPF (AD 110)
- AD 121–169: Floating backup for RIP (AD 120)
- AD 200–254: "Last resort" backup — loses to almost everything
5. The Recursive Lookup Problem — A Critical Caveat
A floating static route configured with a next-hop IP address (rather than an exit interface) may not activate correctly when the primary route fails — if the next-hop IP of the floating static is only reachable through the failed primary route. This is the recursive lookup problem and is one of the most common floating static route failure modes.
Problematic scenario: Router A — Gi0/0 (10.1.1.1) — Primary link to ISP1 (10.1.1.2) Router A — Gi0/1 (10.2.2.1) — Backup link to ISP2 (10.2.2.2) Configuration: ip route 0.0.0.0 0.0.0.0 10.1.1.2 ! Primary default, AD 1 ip route 0.0.0.0 0.0.0.0 10.2.2.2 10 ! Floating backup, AD 10 Problem: When Gi0/0 (primary) goes DOWN: - Router tries to install floating static via 10.2.2.2 - Router does a recursive lookup: "How do I reach 10.2.2.2?" - 10.2.2.2 is directly connected on Gi0/1 → OK, this works fine BUT consider this misconfiguration: ip route 0.0.0.0 0.0.0.0 10.1.1.2 ! Primary, AD 1 ip route 0.0.0.0 0.0.0.0 172.16.0.1 10 ! Floating — 172.16.0.1 only reachable via primary! When primary fails: - Floating static tries to install via 172.16.0.1 - Recursive lookup: "How do I reach 172.16.0.1?" - Only route to 172.16.0.1 was via 10.1.1.2 — which is also down! - Floating static FAILS to install → traffic blackholed
Using Exit Interface Instead of Next-Hop IP
! Safer: specify exit interface to avoid recursive lookup dependency ip route 0.0.0.0 0.0.0.0 GigabitEthernet0/1 10 ! This works regardless of what happens to other routes — ! the router simply forwards out Gi0/1 when the floating static activates
6. Failover Behaviour — Step by Step
Understanding exactly what triggers a floating static to activate and deactivate is critical for both exam questions and real deployments.
Step 1: Normal operation ───────────────────────────────────────────────────────────────── Primary route: OSPF via Gi0/0 → 192.168.10.0/24 [110/5] Floating static: 192.168.10.0/24 via Gi0/1 AD 200 → NOT in table Traffic path: → Gi0/0 Step 2: Primary link failure ───────────────────────────────────────────────────────────────── Gi0/0 goes DOWN (line protocol down) ↓ OSPF detects neighbour loss (Dead timer expires — default 40 seconds) ↓ OSPF removes 192.168.10.0/24 from routing table ↓ Router scans for next-best route to 192.168.10.0/24 ↓ Floating static (AD 200) is now the only route — INSTALLED Traffic path: → Gi0/1 (backup) Step 3: Primary link restored ───────────────────────────────────────────────────────────────── Gi0/0 comes back UP ↓ OSPF re-establishes neighbour (Hello + Dead timers) ↓ OSPF re-learns 192.168.10.0/24 [110/5] ↓ OSPF route (AD 110) beats floating static (AD 200) ↓ Floating static removed from routing table Traffic path: → Gi0/0 (primary restored)
- Interface goes down (link failure, cable disconnected) — immediate
- OSPF neighbour timeout (Dead timer — default 40s for broadcast, 120s for NBMA) — depends on timers
- EIGRP hold timer expires (default 15s LAN, 180s WAN)
- Static route next-hop becomes unreachable (recursive lookup fails)
- BFD (Bidirectional Forwarding Detection) link failure detection — sub-second
7. IP SLA Tracking — Solving the "Link Up but Unreachable" Problem
The single biggest limitation of floating static routes is that they only activate when the interface goes DOWN or the next-hop becomes unreachable via a recursive lookup. If the link stays physically up but the upstream provider has an outage — for example, the ISP router is alive but has no internet connectivity — the floating static never activates.
IP SLA (Service Level Agreement) solves this by continuously sending probe traffic (ICMP pings, UDP jitter tests, HTTP requests) to a target. If the probe fails, an object track changes state and can bring down the static route, forcing the floating backup to activate.
! Step 1: Configure IP SLA probe — ICMP echo to ISP1's upstream target (e.g., 8.8.8.8) ip sla 1 icmp-echo 8.8.8.8 source-interface GigabitEthernet0/0 frequency 10 ! Probe every 10 seconds ip sla schedule 1 life forever start-time now ! Step 2: Create a track object that monitors the SLA probe track 1 ip sla 1 reachability ! ↑ object number ↑ references SLA 1 ! Step 3: Attach the track object to the primary static route ! When track 1 goes DOWN (probe fails), the route is removed from table ip route 0.0.0.0 0.0.0.0 203.0.113.1 track 1 ! Primary — removed if SLA fails ip route 0.0.0.0 0.0.0.0 198.51.100.1 10 ! Floating backup — activates when above removed ! Verify SLA and track status show ip sla statistics show track 1
ISP1 link is UP (physically) but ISP1 has a BGP outage → internet unreachable
Without IP SLA: Primary static via ISP1 still in table → traffic blackholed
With IP SLA: Probe to 8.8.8.8 via ISP1 fails after timeout
→ Track 1 goes DOWN
→ Primary static removed from routing table
→ Floating backup via ISP2 activates
→ Traffic routes through ISP2 to internet
8. Common Use Cases
| Scenario | Primary Route | Floating Static | Trigger for Failover |
|---|---|---|---|
| Dual ISP internet | Default route via ISP1 (AD 1) | Default route via ISP2 (AD 10) | ISP1 link down or IP SLA probe to internet fails |
| OSPF backup | OSPF learned route (AD 110) | Static via backup link (AD 200) | OSPF neighbour goes down, route removed from table |
| EIGRP backup | EIGRP internal route (AD 90) | Static via backup WAN (AD 100) | EIGRP hold timer expires, route removed |
| Branch office redundancy | MPLS primary WAN (static or dynamic, low AD) | Internet VPN backup (higher AD) | MPLS circuit down, SLA probe detects unreachable HQ |
| Management OOB access | Normal in-band routing | Static via OOB management network (AD 200+) | Primary network unreachable — last-resort path for SSH/SNMP |
| Static-to-static redundancy | Static via primary next-hop (AD 1) | Static via secondary next-hop (AD 10) | Primary next-hop device fails — recursive lookup fails, route removed |
9. Verifying Floating Static Routes
! View routing table — floating static only appears when active Router# show ip route Codes: C - connected, S - static, O - OSPF, D - EIGRP ... Gateway of last resort is not set O 192.168.10.0/24 [110/5] via 10.1.1.2, 00:15:32, GigabitEthernet0/0 ! ↑ OSPF route is active; floating static NOT shown (hidden by lower AD) ! After simulating failure (shut Gi0/0): Router# show ip route 192.168.10.0 S 192.168.10.0/24 [200/0] via 10.2.2.2, GigabitEthernet0/1 ! ↑ "S" = Static ↑ AD=200 ↑ floating static now active ! Show ONLY static routes (including floating ones when active) Router# show ip route static ! Show running config to confirm the floating static exists even when not in table Router# show running-config | include ip route ip route 192.168.10.0 255.255.255.0 10.1.1.2 ip route 192.168.10.0 255.255.255.0 10.2.2.2 200 ← always in config, not always in table ! Detailed route information showing AD and metric Router# show ip route 192.168.10.0 255.255.255.0 longer-prefixes
running-config (configuration). It only appears in the routing
table (show ip route) when it is the best available route for that
prefix. This is why troubleshooting starts with show running-config
to confirm the route is configured, then show ip route to check
whether it is active.
10. Floating Static as a Backup to Dynamic Routing Protocols
The most powerful application of floating static routes is as an insurance policy behind dynamic routing protocols. The dynamic protocol handles normal routing, but if it fails completely (neighbour goes down, process crashes, misconfiguration), the floating static provides a guaranteed path — without any protocol overhead.
Network design — OSPF with floating static backup: ┌─────────┐ OSPF (primary) ┌─────────┐ │ Router │ ──────────────────▶ │ Router │ │ A │ │ B │ │ │ ──────────────────▶ │ │ └─────────┘ backup WAN link └─────────┘ Router A config: ! OSPF will advertise 10.10.0.0/16 and learn it via Router B router ospf 1 network 10.1.1.0 0.0.0.255 area 0 ! Floating static backup — AD 200 loses to OSPF AD 110 ip route 10.10.0.0 255.255.0.0 10.3.3.2 200 Normal operation: O 10.10.0.0/16 [110/3] via 10.1.1.2 ← OSPF preferred OSPF fails (peer router down, protocol crash): S 10.10.0.0/16 [200/0] via 10.3.3.2 ← Floating static activates
Choosing the Right Floating AD for Each Protocol
| Primary Protocol | Primary AD | Recommended Floating AD | Reasoning |
|---|---|---|---|
| Regular static route | 1 | 5–10 | Higher than 1 but well below any dynamic protocol |
| EIGRP internal | 90 | 95–100 | Activates only if EIGRP completely loses the route |
| OSPF | 110 | 115–200 | Must be above 110; 200 is a common "last resort" choice |
| RIP | 120 | 125–200 | Must be above 120 |
| EIGRP external | 170 | 175–200 | Above 170; used when backing up redistributed routes |
11. Troubleshooting Floating Static Routes
| Symptom | Likely Cause | Diagnostic & Fix |
|---|---|---|
| Floating static never activates when primary fails | AD set too low (still lower than primary); recursive lookup failure; next-hop not reachable via backup path | show running-config | include ip route — verify AD value.
show ip route <prefix> — confirm primary is gone when
failure simulated. Ping backup next-hop to confirm reachability. |
| Floating static stays active after primary recovers | Primary route not reinstalled (dynamic protocol not re-converged; interface still showing down; OSPF/EIGRP adjacency not reformed) | show ip ospf neighbor / show ip eigrp neighbors
— confirm adjacency re-established. Check interface status with
show interfaces. |
| Both primary and floating static in routing table simultaneously | AD values are identical (both same AD = ECMP load balancing, not backup relationship) | Verify: show ip route <prefix> — both routes showing
the same AD. Fix by changing floating static AD to be higher than primary. |
| Floating static not in running-config after reload | Configuration not saved before reload | copy running-config startup-config after configuration
changes. Floating statics must be in startup-config to survive reload. |
| Primary link stays up but internet unreachable — no failover | No IP SLA configured — floating static only activates on interface down, not on path quality degradation | Configure IP SLA probe with ICMP echo to upstream target; attach track object to primary static route so it is removed when probe fails. |
| Routing loop when floating static activates | Floating static next-hop points back toward the failed path; both ends have symmetrical floating statics forming a loop | Trace the path with traceroute. Review next-hop
destinations — ensure each router's floating static points toward
a genuinely different path, not back through the failed network. |
Verification Command Reference
show ip route ! Full routing table — check if floating static is active show ip route static ! Show only static routes (active ones) show ip route 192.168.10.0 ! Specific prefix — shows AD in brackets [AD/metric] show running-config | include ip route ! All configured static routes (active or floating) show ip sla statistics ! IP SLA probe results (reachability, RTT) show track ! Track object states (Up/Down) debug ip routing ! Real-time routing table changes — use in lab only ! See also: show ip route | show running-config | traceroute
12. Common Misconceptions
-
"A floating static route is always in the routing table."
False. The floating static exists in the running-configuration permanently, but it only appears in the routing table when the primary route is gone. Seeing it absent fromshow ip routewhen the primary is active is correct behaviour — it is not a misconfiguration. -
"Floating static routes provide instant failover."
Not necessarily. The failover speed depends on how quickly the primary route is removed from the routing table. For a dynamic protocol like OSPF, this depends on the Dead timer (default 40 seconds). For a physical link-down event, it is nearly instant. For an upstream provider failure with the link still up, it never happens without IP SLA. -
"The same AD on both routes creates a floating relationship."
False. If both routes have the same AD and the same prefix, the router installs both and load-balances (ECMP) — not a primary/backup relationship. The floating static must have a strictly higher AD than the primary. -
"Floating static routes work the same with next-hop IP or exit interface."
Not exactly. Using a next-hop IP requires a recursive lookup — if that next-hop is only reachable via the failed path, the floating static also fails to install. Using an exit interface directly avoids this problem.
13. Best Practices
- Choose AD carefully: Set the floating static's AD to be clearly above the primary route's AD, but below AD 255. Common choices: AD 200 as a "last resort" behind any dynamic protocol; AD 91–109 to back up EIGRP while still losing to OSPF.
- Use IP SLA for end-to-end path monitoring: Physical link state alone is insufficient in environments with upstream failures. IP SLA probes to a well-known address (8.8.8.8, a DNS server) provide true reachability verification.
-
Test failover in a maintenance window: Simulate the failure (shut the
primary interface, disconnect the cable) and verify with
show ip routeandping/traceroutethat the backup path activates and traffic flows correctly. - Test recovery too: Restore the primary path and confirm that traffic returns to the primary route automatically, and the floating static is removed from the routing table.
-
Document all floating statics: Include the AD value, the purpose of
the backup, the primary route it is designed to back up, and the last test
date. Configuration comments (
!lines) and a change log are both essential. - Avoid symmetric floating statics that create loops: If Router A has a floating static pointing to Router B and Router B has one pointing back to Router A for the same prefix, a loop forms when both primary routes fail simultaneously. Use a hub-and-spoke or clear directional design.
14. Key Points & Exam Tips
- A floating static route = a static route with a manually set higher AD than the primary route. It is always in config but only in the routing table when primary is gone.
- AD selection: lower = more preferred. Connected=0, Static=1, EIGRP=90, OSPF=110, RIP=120. Choose floating AD above the primary's AD.
- Syntax:
ip route <network> <mask> <next-hop> <AD>— the AD is the final optional parameter. - Floating static is NOT in
show ip routewhen primary is active — this is correct. It IS always inshow running-config. - Failover triggers: interface down (immediate), dynamic protocol timer expires (seconds to minutes), or recursive next-hop unreachable.
- IP SLA + track enables failover even when the physical link stays up but the upstream path fails — essential for real dual-ISP redundancy.
- Recursive lookup problem: next-hop IP of floating static must be reachable independently of the failed primary link. Use exit interface if in doubt.
- Equal AD on two routes = ECMP load balancing, NOT a backup relationship. Floating static must have strictly higher AD.
- Floating statics backing up OSPF typically use AD 200; backing up EIGRP internal typically use AD 91–109.
- Failover is automatic — no manual intervention required once configured correctly.
Related pages: Default Routes | Administrative Distance | OSPF Configuration | EIGRP Configuration | show ip route | show running-config | ping Command | traceroute Command | show interfaces | Static Routing Lab | Floating Static Routes Lab