IPv4 static routing
Network and host static routes, next-hop versus exit-interface forms, and how to verify static routes in the table.
Static route forms
Static route forms
| Form | Syntax | Behavior |
|---|---|---|
| Next-hop IP | ip route <net> <mask> <next-hop-ip> | Recursive lookup to find exit interface — preferred on multiaccess links |
| Exit interface only | ip route <net> <mask> gi0/1 | No next-hop resolution; on Ethernet it ARPs for every destination — use on point-to-point links |
| Interface + next-hop | ip route <net> <mask> gi0/1 <next-hop-ip> | Binds exit AND next hop — most explicit |
| Host route | ip route <host> 255.255.255.255 <next-hop> | Matches exactly one address — /32 |
A host route (/32) pins traffic for exactly one address — used for specific-path or policy reasons and always wins by longest-prefix match. A network route is any normal prefix. The default route ip route 0.0.0.0 0.0.0.0 <next-hop> matches everything unmatched — see the Default and Floating Routes article.
Specifying only an exit interface on a multiaccess (Ethernet) link makes the router treat every destination as directly attached: it ARPs for each target IP, inflating the ARP table and relying on proxy ARP — fragile. On point-to-point serial/tunnel links the interface form is clean because there is exactly one possible peer.
Configure and verify
Reach 10.2.0.0/24 via next-hop 10.0.0.2 — Privileged EXEC → Global configuration
Cisco IOS / IOS XE
configure terminal ip route 10.2.0.0 255.255.255.0 10.0.0.2 end
show ip route static show ip route 10.2.0.0 ping 10.2.0.5
- S route in the table with AD/metric [1/0].
- The route exists only while the next hop is reachable through the exit interface.
- If the next hop becomes unreachable, IOS removes the route silently — no protocol advertises the failure.
Changes device configuration.
S 10.2.0.0/24 [1/0] via 10.0.0.2AD 1, metric 0 — a directly-specified next hop.S 172.16.5.5/32 [1/0] via 10.0.0.6Host route — /32 matches exactly one IP.- Link
- Ethernet to ISP at 203.0.113.2
- Goal
- Route customer subnet 198.51.100.0/24
- Multiaccess link → next-hop form:
ip route 198.51.100.0 255.255.255.0 203.0.113.2. - Verify with
show ip route 198.51.100.0— confirm it resolves via Gi0/1. - On a point-to-point WAN link, the exit-interface form would be equally valid and simpler.
Match the form to the link type; next-hop IP is the safe default on Ethernet.
Troubleshooting
Common mistakes
- Using exit-interface-only on Ethernet — causes one ARP entry per destination.
- Forgetting that the route vanishes when the next hop is unreachable — the table gives no warning.
- Creating routes whose next hop is inside the route's own destination — a recursive loop IOS may reject.
- Assuming static routes propagate — each router needs its own route or a routing protocol.
Observation: show ip route shows the S route, yet the destination times out.
- Return route missing on the far side
- The next-hop interface is down (route shown stale in output)
- ACL blocking the forwarded traffic
| Check | Indicates |
|---|---|
| Ping the next hop | If it fails, the route is being used for an unreachable neighbor. |
| Check the far side's routing back to the source | Static routes are one-directional by nature — both directions need routes. |
| ACLs on the path interfaces | Filtering can silently drop forwarded packets. |
Correction: Add the return route or restore the next-hop reachability.
End-to-end ping and traceroute complete in both directions.
Related resources
Sources
- Cisco CCNA 200-301 v1.1 Exam Topics (official PDF) — reviewed 2026-11-02
- Cisco — IP Addressing Services Command Reference — reviewed 2026-11-02
Targets CCNA 200-301 v1.1 objectives. Supplemental blocks are labeled beyond exam scope.