Pcornel
Browse topics
Options
Recent
Favorites
Networking · Technical reference

IPv4

Direct answer

IPv4 static routing configures routes by hand with ip route <prefix> <mask> <next hop | interface> [distance]. It suits small networks, default routes towards a provider and backup paths.

When to use this

Use it to add or check a static route, a default route or a backup route.

First 30 seconds

1. Configured (show running-config | include ip route) but not in show ip route static?

2. → show ip route <next hop>: the next hop is not reachable.

3. Tracked route → show track <n>: down?

4. Installed but not used → a longer prefix wins, or a lower distance.

5. Interface-only route on Ethernet → add the next hop address.

Operational verification

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

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
Protocol standard + deployed implementation
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformProtocol standard · Cisco IOS / IOS XE · Cisco IOS XE
Scope / prerequisiteUse it to add or check a static route, a default route or a backup route.
What next?2 suggested next steps
Child topics (this level)5
Evidence0
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

2 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Native known-good discriminator and proof boundary — IPv4 Verify boundary

Known-good IPv4 static routing means show ip route <prefix> identifies the intended selected route, show ip cef <prefix> detail resolves to the expected adjacency/egress, and the original sourced traffic succeeds through the same VRF and return path. Broken evidence includes an absent route, a less-preferred static, unresolved next hop, unexpected recursive exit or CEF adjacency mismatch. RIB/CEF output shows route-selection and forwarding-programming state only, but it does not show ACL/NAT/policy acceptance, remote service health or symmetric return. Repeat the original flow and check the reverse lookup or peer response before declaring closure.

Step 2 Native observation-driven troubleshooting branch — IPv4 Narrow the fault

If an IPv4 static route is absent from show ip route static, inspect the configured statement, VRF/context, next-hop reachability and recursive resolution before changing distance. If the route is present but not selected, compare prefix length and administrative distance against competing connected, dynamic or static candidates. If the RIB is correct yet forwarding fails, inspect show ip cef <prefix> detail, adjacency/ARP state and policy features on the actual ingress/egress path. If only one destination or return direction fails, compare longest-prefix matches in both directions instead of broadening the route or default route.

Command lookup Jump straight to Cisco syntax
Drill down

Subtopics

Go one level deeper into this subject.

Key points

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.

Key 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.
ReferenceHow it works1 section · depth on demand

Native protocol/state mechanics and ownership — IPv4

IPv4 static routing separates configured intent from installed RIB state and from the FIB/CEF forwarding entry. An ip route statement is eligible only when its next hop or exit interface can be resolved in the active routing context; administrative distance then competes with other route sources, and CEF recursively resolves the selected route to an adjacency. show ip route and show ip route static therefore describe routing-table selection, not whether every packet will survive ACL, PBR, NAT, tunnel, MTU or return-path policy. Host routes, defaults and floating statics use the same staged ownership but have different match scope and preference behavior.

ReferenceImportant terms & boundaries2 sections · depth on demand

In depth

IPv4 static routes: the ip route forms and how they resolve

Cisco's static next-hop technote compares the forms of ip route and recommends specifying both the outgoing interface and the next hop.

Exit interface only

R1(config)# ip route 0.0.0.0 0.0.0.0 GigabitEthernet0/0/0

The technote explains that the router then treats every destination as directly connected and ARPs for each one. On Ethernet this can mean high CPU, a very large ARP cache and memory failures, and it depends on the next router answering with proxy ARP.

Next hop only (recursive)

R1(config)# ip route 10.30.0.0 255.255.0.0 10.255.0.2

The router looks up 10.255.0.2 in the routing table to find the interface. It's valid as long as any route to the next hop exists.

Fully specified (recommended)

R1(config)# ip route 10.30.0.0 255.255.0.0 GigabitEthernet0/0/1 10.255.0.2
R1# show ip route 10.30.0.0
Routing entry for 10.30.0.0/16
  Known via "static", distance 1, metric 0
  Routing Descriptor Blocks:
  * 10.255.0.2, via GigabitEthernet0/0/1
      Route metric is 0, traffic share count is 1

Comparison

FormARP forRemoved when
Interface onlyEvery destinationInterface down
Next hop onlyNext hopNo route to the next hop
Fully specifiedNext hopInterface down, or next hop unreachable on it

Optional parameters

ParameterEffect
Distance (1–255)Lower is preferred; the technote notes 255 is treated as unreachable and never installed
name <text>A label shown in the configuration
permanentKeeps the route even if the interface goes down
track <object>Removes the route when an IP SLA or tracked object fails

On point-to-point serial links the technote considers the interface alone enough. On Ethernet, always include the next hop.

Documented example, not captured output.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

Quick reference

IPv4 static routes are manually configured routes to a destination prefix through a next-hop address or exit interface. They are simple, predictable and use no CPU, but do not adapt to topology changes on their own.

ip route 10.50.0.0 255.255.0.0 10.0.0.2
ip route 0.0.0.0 0.0.0.0 203.0.113.1
ip route 10.60.0.0 255.255.0.0 10.0.0.6 200     ! floating backup
ip route 10.70.0.0 255.255.0.0 Gi0/1 10.0.0.10   ! interface + next hop

Documented example, not captured output.

On Ethernet, specify the next hop (with or without the interface); an interface-only static route makes the router ARP for every destination.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
ReferenceConfiguration & state1 section · depth on demand

Next-hop versus exit-interface static routes

A next-hop static route points at a reachable router address and requires recursive resolution. An exit-interface static route points directly at the interface. Exit-interface-only routes are most natural on point-to-point links; on multiaccess networks, the router may need Layer-2 resolution behavior for many destinations, so use a next hop or fully specified design where appropriate for the platform and topology.

Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docProtocol standard + deployed implementation RFC 791

Authoritative/upstream documentation reviewed for bounded claims in Routing → Static Routing → IPv4. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://www.rfc-editor.org/rfc/rfc791.html · confidence 94%
Embedded reference data

Quick lookup tables

IPv4 static route forms

Fast mapping from intent to the source-taxonomy command form

IntentSource commandKey point
Remote network via next hopip route <network> <mask> <next-hop>Requires recursive next-hop resolution
Remote network via interfaceip route <network> <mask> <interface>Exit-interface behavior; best fit depends on link/media
One hostip route <host> 255.255.255.255 <next-hop>/32 exact match
Default/fallback for unknown prefixesip route 0.0.0.0 0.0.0.0 <next-hop>Least-specific 0/0
Backup pathip route <network> <mask> <next-hop> <administrative-distance>Higher AD than primary

Static route selection order

Keep prefix specificity separate from route-source preference

OrderQuestionExample
1What is the destination IP?10.20.30.40
2Which installed route has the longest matching prefix?/32 beats /24 beats /16 beats /0
3If the same prefix is offered by multiple sources, which has preferred AD?Static default AD normally 1
4Can the selected next hop/interface resolve?Recursive route / interface state
5Is forwarding programmed and reachable?CEF/adjacency/ARP + return path
Depth when you need it

Deep reference

Additional depth

IPv4 route-selection order

For a specific destination, find the longest matching prefix first. If multiple route sources offer the same prefix, administrative distance determines which source is preferred; a protocol-specific metric is then relevant within the appropriate route-source selection process. After the route is chosen, its next hop must resolve into forwarding state.

Confirmation

Confirm action

Continue?