Skip to content
CCNA 200-301 v1.1 reference — IP Connectivity

Default and floating static routes

Default routes and the gateway of last resort, host routes, and floating statics that appear only when the primary route fails.

Objective 3.3v1.1 exam target

Default routes and gateway of last resort

A default route 0.0.0.0/0 matches every destination that no more-specific route covers — the 'send it somewhere sensible' instruction. In the table it appears as the gateway of last resort (S* 0.0.0.0/0). IPv6 uses ::/0.

Default route

Send all unmatched traffic to the ISP at 203.0.113.1 — Privileged EXEC → Global configuration

Cisco IOS / IOS XE

configure terminal
ip route 0.0.0.0 0.0.0.0 203.0.113.1
ipv6 route ::/0 2001:db8:ffff::1
 end
Verify
show ip route
show ipv6 route
  • 'Gateway of last resort is 203.0.113.1 to network 0.0.0.0' appears.
  • S* route marks the default candidate.

Changes device configuration.

$ Gateway of last resort display
Gateway of last resort is 203.0.113.1 to network 0.0.0.0Router's chosen default.
S* 0.0.0.0/0 [1/0] via 203.0.113.1The static that provides it — the asterisk marks the default candidate.

Floating statics

A floating static is a normal static route given an AD higher than the dynamic protocol's so it stays out of the table while the primary route exists. ip route 10.0.0.0 255.0.0.0 10.9.9.2 150 installs only if the better source (say OSPF at 110, or another static at 1) withdraws its /8 — an elegant failover without protocols.

Choosing a floating AD

The floating route must match the SAME prefix as the primary — AD compares identical prefixes only.
Primary sourcePrimary ADFloating AD should beExample
Static1Any usable value 2–254 (255 marks unreachable)ip route ... <nh> 10
EIGRP internal9091+ip route ... <nh> 95
OSPF110111+ip route ... <nh> 130
RIP120121+ip route ... <nh> 150

The floating route must match the SAME prefix as the primary — AD compares identical prefixes only.

Verify failover actually works
Primary
OSPF-learned 10.0.0.0/8 via Gi0/1
Backup
Static 10.0.0.0/8 via Gi0/2, AD 150
  1. Normal state: show ip route 10.0.0.0 shows the OSPF route — AD 110 beats 150.
  2. Kill the OSPF path: the /8 disappears → the floating static installs.
  3. Restore OSPF: the dynamic route returns and re-wins.

Failover is automatic both directions — the higher-AD route never fights for the table.

Verification

Common mistakes

  • Using a different prefix length for the floating static — a /8 floating static does not back up a /24 primary.
  • Setting floating AD below the primary's AD — it then shadows the good route permanently.
  • Believing the floating route 'monitors' anything — it installs only when the identical prefix withdraws.
  • Expecting the default route to handle a specific destination that has a route — LPM always prefers the specific match.
Backup link never takes over

Observation: Primary OSPF path fails; traffic still doesn't use the backup static.

Hypotheses
  • Floating static's AD is lower than OSPF's — it would have always won instead
  • Backup next hop unreachable
  • Different prefix length between primary and backup
CheckIndicates
show running-config | include ip routeReveals both the floating AD and prefix — compare to the withdrawn route.
show ip route during the outageConfirms whether the floating route installed at all.
Ping the backup next hopAn unreachable backup can't install a route.

Correction: Correct the floating AD/prefix or restore backup path reachability.

During primary failure the static installs and traffic reroutes; on recovery it withdraws.

On this page

Related resources

Sources

Targets CCNA 200-301 v1.1 objectives. Supplemental blocks are labeled beyond exam scope.

Search guided lessons, transcript chapters, flashcards, CLI drills and cheat sheets

Default and floating static routes | CCNA Study