Use it at the edge towards a provider, for small sites and as backup paths — and when a configured static route is missing from the routing table or stays after its link has failed.
Static & Default Routing Reference
A static route is a route entered by hand: to reach this network, send to that next hop. A default route is the static route for 0.0.0.0/0, which matches whatever no more specific route covers.
Static and default route checks
Cisco IOS / IOS XE IPv4. Longest prefix match decides first; administrative distance only chooses between routes to the same prefix.
| Observed state | Possible cause | Command | Observation and next check |
|---|---|---|---|
| Static route not in the table | Next hop not resolvable, or exit interface down | show ip route static | The route is present with code S. Next: show ip route <next-hop> and show ip interface brief for the exit interface. |
| Traffic follows another path | A longer prefix or a lower administrative distance route wins | show ip route <destination> | Which prefix matched and how it was learned (Known via). Next: Compare prefix lengths first, then administrative distance for the same prefix. |
| Floating static not used after a failure | Primary route still installed because its next hop stays reachable | show ip route <prefix> | The primary route remains while the path is actually broken. Next: Track the primary path (IP SLA + track) or use an exit interface that goes down with the path. |
| No default route | Gateway of last resort not set | show ip route | include Gateway | Gateway of last resort points to the intended next hop. Next: Add ip route 0.0.0.0 0.0.0.0 <next-hop> or check the routing protocol that should supply it. |
| Forward path works, replies do not return | Remote side has no route back to the source | traceroute <destination> source <interface> | Where the trace stops. Next: Check the return routing on the device after the last reply. |
Example output and interpretation
Illustrative output · not captured Evidence
Router# show ip route 203.0.113.10
Routing entry for 203.0.113.0/24
Known via "static", distance 1, metric 0
Routing Descriptor Blocks:
* 198.51.100.1
Route metric is 0, traffic share count is 1Illustrative output: the destination matches a static /24 via 198.51.100.1. This proves the route choice on this router only; reachability still depends on the next hop and the return path.
Technical sources
Detailed reference and supporting material
Additional explanation, verification and reference tables.
Operational reference
Fast context before you go deeper.
1. show running-config | include ^ip route versus show ip route static — configured but not installed?
2. Not installed → show ip route <next hop>: unreachable, or the interface is down.
3. Installed but failing → does the next hop have a route onwards, and is there a route back?
4. Stays after a link failure → the next hop resolves another way; add the interface or tracking.
5. Backup never used → compare administrative distances.
route configured with correct prefix and mask → next hop resolvable or interface up → installed → next hop forwards onwards → return route exists → backup with higher distance waits
Context & applicabilityCommon mistakes · platform/version boundaries
Additional verification procedures
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 Typical faults & boundaries Narrow the fault
- The route is configured but not in the routing table. The next hop is not reachable, or the interface is down.
- The route is in the table but traffic fails. The next hop does not know the way onwards, or there is no route back; static routing has to be configured in both directions.
- A static route stays after its link failed. The next hop still resolves through another route; add the interface to the route.
- The backup route never takes over. The primary's interface stays up while the path beyond is dead; use tracking.
- The backup is used all the time. Its administrative distance is lower than the primary's.
- Only some destinations work over an interface-only Ethernet route. The router depends on proxy ARP; add the next-hop address.
- A more specific route overrides the static. Longest prefix match is applied before administrative distance.
- Wrong mask. The route covers a different range than intended.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
A static route is installed only while its next hop is reachable or its interface is up — but "reachable" through any route, including a default. On Ethernet, name the next-hop address, ideally with the interface. A backup needs a higher administrative distance; a path that fails beyond the interface needs tracking.
show ip route static— static routes actually installed.show running-config | include ^ip route— those configured.show ip route <next hop>— how the next hop resolves.show ip cef <prefix>— the interface in use.show track— tracked objects tied to routes.
ReferenceWhat it is1 section · depth on demand
Mechanics & mental model
A static route is a route entered by hand: "to reach this network, send to that next hop". A default route is the static route for 0.0.0.0/0, which matches every destination not covered by a more specific route.
ReferenceWhy it matters1 section · depth on demand
Why it matters operationally
Static routes are the simplest way to route and are used everywhere: at the edge towards a provider, for small sites, for management networks, and as backup paths. They do not adapt, though. A static route says what was true when it was typed, and the conditions under which the router installs it — or keeps it when it should not — account for most of the faults.
ReferenceHow it works1 section · depth on demand
How it works
ip route 10.20.0.0 255.255.255.0 10.0.12.2
ip route 0.0.0.0 0.0.0.0 192.0.2.1
Forms.
| Form | Example | Behaviour |
|---|---|---|
| Next hop | ip route 10.20.0.0 255.255.255.0 10.0.12.2 | The router looks up 10.0.12.2 to find the outgoing interface |
| Interface | ip route 10.20.0.0 255.255.255.0 Serial0/0 | Fine on point-to-point links; on Ethernet the router has to ARP for every destination |
| Both | ip route 10.20.0.0 255.255.255.0 GigabitEthernet0/0 10.0.12.2 | Tied to that interface; preferred on Ethernet |
When it is installed. A static route enters the routing table only while it can be used: the next hop must be reachable through some other route, or the named interface must be up. Otherwise it stays in the configuration but not in the table.
The weakness: a next-hop route remains installed as long as the next-hop address resolves through anything — including a default route. If the direct link fails but a default route exists, the static route stays and may point traffic the wrong way. Naming the interface as well avoids that.
Administrative distance is 1 by default, so a static route beats every routing protocol for the same prefix. A number at the end of the command changes it.
Floating static route. A backup with a higher distance than the primary source:
ip route 0.0.0.0 0.0.0.0 192.0.2.1
ip route 0.0.0.0 0.0.0.0 198.51.100.1 250
The second is installed only when the first disappears.
Tracking. An interface that stays up while the path beyond it fails keeps a static route installed. ip route … track <n> ties the route to a tracked object, typically an IP SLA probe of something beyond the next hop, and removes the route when the probe fails.
A static route to Null0 discards traffic; it is used to anchor a summary.
ReferenceImportant terms & boundaries1 section · depth on demand
In depth
Default routes and static routing design
A default route (0.0.0.0/0) catches everything that no more specific route matches. RFC 1812 defines the default route as the route with prefix length zero, so it always loses to any more specific match. It also lets routers rank routing sources by administrative preference, from 0 to 254, with 255 meaning "never use". That ranking is what lets a static route float behind a dynamic one, or the other way round.
Ways to get a default route
| Method | Command or source | Notes |
|---|---|---|
| Static | ip route 0.0.0.0 0.0.0.0 <next-hop> | Simple edge sites |
| From DHCP on the WAN interface | ip address dhcp | Installs a default route with distance 254 |
| OSPF | default-information originate [always] | Advertised to the area |
| BGP | neighbor ... default-originate, or received from the provider | Internet edge |
| EIGRP | Summary to 0.0.0.0/0, or redistributed static | Hub to spokes |
Design patterns
| Pattern | Configuration |
|---|---|
| Dual ISP, active/standby | Tracked primary default + floating backup with a higher distance |
| Branch backup over LTE | Floating static with distance 250 via the cellular interface |
| Summary with discard | Null0 route for the summary, so unused space isn't sent elsewhere |
| Stub site | A single static default; no dynamic routing |
Pitfalls
| Pitfall | Effect |
|---|---|
| A default without tracking towards an ISP | Traffic blackholes when the ISP fails beyond the link |
A default plus ip routing disabled | Hosts use ip default-gateway instead |
| Two defaults with equal distance | ECMP across both ISPs, with asymmetric paths and NAT problems |
default-information originate always | The default is advertised even when the edge has no Internet path |
R1(config)# ip sla 10
R1(config-ip-sla)# icmp-echo 192.0.2.1 source-interface GigabitEthernet0/0/0
R1(config)# ip sla schedule 10 life forever start-time now
R1(config)# track 10 ip sla 10 reachability
R1(config)# ip route 0.0.0.0 0.0.0.0 203.0.113.1 track 10
R1(config)# ip route 0.0.0.0 0.0.0.0 198.51.100.1 250
R1(config)# router ospf 1
R1(config-router)# default-information originate
R1# show ip route 0.0.0.0
R1# show track 10 | include state|changes
Without always, OSPF advertises the default only while R1 itself has one. If both ISP paths fail, the rest of the network stops sending traffic to R1.
Documented example, not captured output.
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 Network & Protocols → Static & Default Routing Reference. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://www.cisco.com/c/en/us/support/ios-nx-os-software/ios-xe-17/series.html · confidence 94%What changed and what may be affected
Recent technical edits are separated from ordinary page timestamps. Relationship impact is advisory: it identifies nearby canonical references to review, not automatic breakage.
Terms & aliases
Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.
Operational notes
Former standalone Cheat Sheet content now lives directly inside the Topic where it belongs.