Pcornel
Networking · Routing › Routing Table

Gateway of Last Resort

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

Back to the Topic

Answer

"Gateway of last resort" in show ip route shows the default route the router is currently using for destinations with no more specific match — normally an installed 0.0.0.0/0 route. "Not set" means there is no default route.

Remember

The gateway of last resort is the next hop of the installed default route 0.0.0.0/0, marked * as candidate default. It is used only when no more specific route matches. not set means unmatched packets are dropped. The default can be static or learned from OSPF, EIGRP or BGP.

First checks

show ip route | include Gateway → the current gateway or not set. show ip route 0.0.0.0 0.0.0.0 → source, AD and next hop of the default. show ip cef 0.0.0.0/0 → outgoing interface.

Commands

show ip route
ip route 0.0.0.0 0.0.0.0
ip default-network
ip default-gateway
ip route 0.0.0.0 0.0.0.0 <next-hop>
ip route 0.0.0.0 0.0.0.0 203.0.113.1 track 10
ip route 0.0.0.0 0.0.0.0 <next hop>

Verify in this order

default route configured or learned → installed as 0.0.0.0/0 (lowest AD) → Gateway of last resort is … → next hop reachable → unmatched destinations forwarded there → return route exists upstream

Where it usually breaks

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

Gateway of Last Resort operational reference

BoundaryKnown-good for Gateway of Last ResortSuspicious signatureNext proof
IntentMatches IPv4 default-route selection designConfiguration differs from peer/designCompare effective config
Control stateStable expected role/route/member stateno gateway of last resort when fallback is expected, a stale/wrong default winning, recursive resolution failure, or successful next-hop ping while remote destinations still failInspect protocol/RIB detail
ForwardingExpected egress/Port-Channel/VLAN pathState exists but traffic path disagreesFIB/MAC/adjacency
ClosureOriginal test passes for explained reasonSymptom merely moved or was bypassedRegression test

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

Confirmation

Confirm action

Continue?