Use it when unknown destinations fail, the gateway of last resort is absent, traffic unexpectedly follows a specific route instead of default, or a floating default must take over.
Default Route · IPv4
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.
1. The default route 0.0.0.0/0 matches everything not more specific.
2. Static or learned (OSPF default-information originate).
3. Gateway of last resort shows it.
4. Floating defaults for backup.
5. Verify outbound path.
no specific match → default route → next hop
Verify the configured next hop and its connected/recursive route, then re-check static RIB installation.
Continue only after interpreting the current observation.Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
ip route 0.0.0.0 0.0.0.0 <next-hop>Primary Commands
Configuration and operational commands for this Topic.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Operational verification and known-good state Verify boundary
Choose a destination with no intended more-specific route and perform an exact route lookup. Verify 0.0.0.0/0 is installed in the correct VRF, its next hop resolves to a connected path and CEF programs a usable adjacency. Then choose a destination that does have a more-specific prefix and confirm longest-prefix match bypasses default. If using a floating default, withdraw the primary in a controlled test and show the backup /0 installs and later relinquishes correctly. Validate NAT/firewall and reverse routing for the original application.
Step 2 Verification and output interpretation Verify boundary
Use show ip route 0.0.0.0 and the routing table header to verify the installed default and gateway of last resort. Confirm the next hop resolves through a connected or otherwise independent route. For a test destination, use show ip route <address> to show whether a more-specific route wins or the default is actually selected; show ip cef <address> confirms forwarding resolution. A successful ping to the next hop shows local adjacency only. Testing a remote address adds path evidence but can still fail or succeed based on return routing, NAT, ACLs and remote service behavior.
Step 3 Verification & troubleshooting Narrow the fault
1. Check the gateway of last resort and the 0.0.0.0/0 entry in show ip route.
2. Verify the configured next hop is reachable through a connected/installed route.
3. Test a destination that truly lacks a more-specific route.
4. Verify upstream routing and return path.
5. If only some destinations fail, inspect their more-specific routes before blaming the default route.
Step 4 Failure signatures and troubleshooting branches Narrow the fault
A default configured but absent from the RIB usually indicates unresolved next hop, tracking, interface or better same-prefix preference. A default installed but one destination follows another path is often correct because a more-specific route wins. If every external destination fails despite a resolved default, inspect upstream reachability, NAT/policy and return routing. If only some fail, search for specific blackhole routes or policy. Do not add additional defaults until the exact FIB decision for the failing destination is known.
Step 5 When the problem is really fixed Narrow the fault
Repeat the original unknown-destination flow and show the /0 route is selected only where appropriate, resolves through the intended next hop and returns successfully. Verify one more-specific prefix still uses its specific route. For floating defaults, test primary failure and restoration. Captured routing output can be saved as Evidence separately; the Topic records the expected default-route decision model, not a claim that the current gateway is healthy.
Evidence · 2 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
The expected 0.0.0.0/0 static route is absent and the routing table does not show the intended gateway of last resort.
command output · Evidence referenceDefault exists but destination uses a more-specific routeThe 0/0 route is installed, while the failing destination also matches a longer prefix in the RIB.
show ip route 0.0.0.0— Gateway of last resortshow running-config | include ip route 0.0.0.0— default route config
ReferenceWhat it is1 section · depth on demand
What it is
An IPv4 default static route uses prefix 0.0.0.0/0. It matches every IPv4 destination, but because it is the least-specific possible route it is selected only when no more-specific installed route matches the destination.
ReferenceWhy it matters1 section · depth on demand
Why it matters
Use a default route when a router should send otherwise-unknown IPv4 destinations toward an upstream next hop, common at stub edges and Internet/WAN boundaries.
ReferenceImportant terms & boundaries6 sections · depth on demand
Key points
- Syntax in the source taxonomy is
ip route 0.0.0.0 0.0.0.0 <next-hop> - 0/0 never overrides a more-specific installed route because Longest Prefix Match wins first
- When an installed default route is selected as the default, IOS output can identify a gateway of last resort
- Default-route presence does not show the upstream router has a route onward or a valid return path
- A missing default in the RIB can be caused by unresolved next-hop reachability or route preference/installation conditions.
In depth
IPv4 default route: where traffic goes when nothing else matches
The default route, 0.0.0.0/0, matches every destination with prefix length zero, so it's used only when no more specific route exists. Cisco's static next-hop technote uses it in its examples, and warns against pointing it only at an Ethernet interface.
R1(config)# ip route 0.0.0.0 0.0.0.0 GigabitEthernet0/0/0 203.0.113.1 name ISP-A
R1# show ip route | include Gateway|0.0.0.0
Gateway of last resort is 203.0.113.1 to network 0.0.0.0
S* 0.0.0.0/0 [1/0] via 203.0.113.1, GigabitEthernet0/0/0
S* marks the static candidate default, and Gateway of last resort confirms it's in use.
Why not ip route 0.0.0.0 0.0.0.0 GigabitEthernet0/0/0
The technote explains that a static route pointing only at an Ethernet interface makes the router ARP for every destination as if it were directly connected. With a default route that means every Internet address: a huge ARP table, high CPU, and dependence on proxy ARP from the ISP router. Always add the next hop on Ethernet.
Default routes in practice
| Situation | Approach |
|---|---|
| Single Internet link | One static default with interface and next hop |
| Two ISPs, primary and backup | Primary with AD 1, backup as a floating static (for example AD 10) plus tracking |
| Distributing the default inside | default-information originate in OSPF, or redistribute into the IGP |
| Layer 3 switch at a branch | Default towards the router or firewall |
The recursion trap
If the default route's next hop is reached through the default route itself, the route resolves recursively to itself and fails. Make sure the next hop is on a directly connected subnet.
Tracking upstream reachability
A static default stays up while the local interface and next hop are up, even if the ISP's network beyond is broken. IP SLA with track lets the router remove the route when a probe to an external address fails, so a backup can take over.
Documented example, not captured output.
Quick reference
An IPv4 default route (0.0.0.0/0) matches any destination not covered by a more specific route, typically pointing to the internet edge or a WAN router. It shows as the "gateway of last resort".
ip route 0.0.0.0 0.0.0.0 203.0.113.1
router ospf 1
default-information originate ! advertise it into OSPF
show ip route 0.0.0.0
Documented example, not captured output.
Without always, default-information originate only advertises the default if the router has one in its own table.
Mechanics and state ownership
The IPv4 default route has prefix length /0 and therefore matches every IPv4 destination, but with the lowest specificity possible. A router selects it only after determining that no longer matching prefix exists. A static default can point to a next hop or interface and must satisfy installation/recursion rules before becoming the gateway of last resort. Dynamic protocols can also originate or learn defaults, so multiple candidates may exist and administrative distance/metric determine which same-prefix /0 candidate wins. The default says nothing about return routing or stateful security beyond the first routing decision. This section is authored reference guidance for Default Route in the IPv4 Static Routing context.
State model and protocol mechanics
The IPv4 default route uses prefix 0.0.0.0/0 and therefore matches every destination, but with the shortest possible prefix length. Longest-prefix match ensures any installed /1 through /32 that also matches the destination is preferred over the default. Cisco routing output may identify the gateway of last resort when a usable default is installed. The route can be static or learned from a routing protocol; if multiple default candidates exist, the normal administrative-distance and metric rules choose among candidates for the same /0 prefix. A static next hop still requires valid recursion or interface state before the route is useful.
Limits and common misconceptions
Default does not mean preferred over every route; it is preferred only when nothing more specific matches. A default route can be installed and healthy while particular destinations fail upstream. Conversely, absence of a default may be perfectly correct on a router with a complete routing table. Gateway of last resort is routing-table state, not an Internet-health indicator. Multiple defaults are compared as routes to the same /0 prefix using AD/metric or protocol rules. Preserve the distinction between the local fallback decision, next-hop reachability and the upstream network’s knowledge of the final destination.
ReferenceConfiguration & state1 section · depth on demand
Design and configuration model
Point a static default toward a stable upstream next hop or exit interface appropriate to the link type. Use it where the local router should send otherwise-unknown destinations toward a provider, firewall or upstream core. Do not use a default to hide missing internal route design unless that behavior is intentional. On multi-homed devices, define which upstream should own default reachability and whether tracking or a floating secondary default is needed. If the upstream only provides partial reachability, document that scope instead of treating /0 as evidence of universal Internet access. Avoid recursive designs where the default is needed to resolve its own next hop.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Routing → Static Routing → IPv4 → Default Route. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://www.rfc-editor.org/rfc/rfc791.html · confidence 94%Quick lookup tables
Default Route · operational reference
Compact state and interpretation boundaries for fast lookup.
| Default-route fact | Interpretation |
|---|---|
| 0.0.0.0/0 | Least-specific IPv4 prefix |
| Gateway of last resort | Installed fallback next hop |
| More-specific route exists | More-specific route wins |
| Default installed | Does not prove upstream end-to-end reachability |
Default Route operational reference
Topic-specific bounded interpretation: known-good state, suspicious signatures and the next technical proof boundary.
| Check | Known-good | Failure signature | Next boundary |
|---|---|---|---|
| Config/source | Intended /0 candidate | Wrong/missing default | Route source |
| RIB | /0 installed | Configured but absent | Eligibility/preference |
| Specific route | Overrides /0 when present | Unexpected default use | LPM |
| Next hop | Resolved adjacency | Recursive/unresolved | FIB/ARP |
| End-to-end | Forward+return work | Upstream/policy failure | External path |
Deep reference
Additional depth
Why 0/0 is the fallback
0.0.0.0/0 has a prefix length of zero, so every IPv4 destination matches it, but every installed route with a longer matching prefix is preferred. The default route therefore handles only destinations without a more-specific installed match. IOS can report the selected default next hop as the gateway of last resort.