Pcornel
Networking · Routing › Routing Table

Static

Cheat sheet · https://pcornel.dk/topic.php?topic=1058

Back to the Topic

Answer

A static route (code S) is a route configured by hand: a prefix, and a next hop address and/or an outgoing interface. It stays until removed, and is installed only while its next hop can be resolved.

Remember

A static route with a next hop is installed only if that next hop is reachable through another route. Its distance is 1, so it beats every protocol unless configured higher. On Ethernet, give a next hop address, not just the interface.

First checks

  • show ip route static — the static routes installed.
  • show running-config | include ip route — those configured.
  • show ip route <next hop> — whether the next hop is reachable.
  • show ip cef <prefix> — forwarding for the prefix.
  • show track — if the route is tied to a track object.

Verify in this order

static route configured → next hop resolvable through another route → track up (if used) → no better route for the same prefix → installed with distance 1 (or configured) → CEF forwards

Where it usually breaks

underlay/interface reachability → protocol adjacency/session → received/originated state → policy → best path/RIB → FIB/adjacency → traffic path

Static operational reference

Static-route stateKnown-goodFailure signatureNext boundary
ConfigCorrect prefix/VRF/next hopWrong mask/tableIntent/config
RIBInstalled when intendedConfigured but absentRecursion/preference
RecursionNext hop resolvesRecursive dependency missingSupporting route
FIB/adjacencyUsable egressUnresolved/dropARP/ND/interface
Floating behaviorActivates only on primary lossNever/always activeAD/track/primary state

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=1058

Confirmation

Confirm action

Continue?