Pcornel
Networking · Routing › Static Routing › IPv4

Default Route

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

Back to the Topic

Answer

The default route is a catch-all RIB entry. Longest-prefix match always prefers any more-specific route, so default routing does not override specific connected, static or dynamic prefixes.

Remember

Configured ip route 0.0.0.0 0.0.0.0 ... is intent; the RIB/FIB entry is operational state. Next-hop recursion, tracking and competing defaults can prevent or alter installation.

First checks

  • show ip route 0.0.0.0 — Gateway of last resort
  • show running-config | include ip route 0.0.0.0 — default route config

Commands

ip route 0.0.0.0 0.0.0.0 <next-hop>
Configure an IPv4 default static route.
show ip route
ip route 0.0.0.0 0.0.0.0 GigabitEthernet0/0/0
show ip route 0.0.0.0
show ip route <address>
show ip cef <address>

Verify in this order

no specific match → default route → next hop

Where it usually breaks

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

Default Route · operational reference

Default-route factInterpretation
0.0.0.0/0Least-specific IPv4 prefix
Gateway of last resortInstalled fallback next hop
More-specific route existsMore-specific route wins
Default installedDoes not prove upstream end-to-end reachability

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

Confirmation

Confirm action

Continue?