PracticeLabs
Week 4Lesson 3Required44 min estimated0% progress

IPv4 Static Routes: Next-Hop and Exit-Interface

Configure IPv4 static routes three ways — next-hop, exit-interface, and fully specified — explain recursive lookup, and diagnose a route that installs but does not forward.

Lesson orientation

What you'll learn (4 objectives)~44 min: video → lesson → check → apply → lab prep

Learning objectives

  • Build an IPv4 static route with the ip route command using a next-hop IP, an exit interface, or both
  • Explain recursive lookup and why a next-hop route requires a second route to resolve the next hop
  • Justify next-hop on multi-access Ethernet and a fully specified route as the robust default
  • Verify with show ip route and show ip route <destination>, and diagnose a route that installs but does not forward

Terms you will see

Static routeip routeNext-hop formExit-interface formFully specified routeRecursive lookupProxy ARPReturn route

Time breakdown

  • Read the notes20 min
  • Static Routing Labs tool10 min
  • Prediction practice6 min
  • Lab — three-router static routing8 min

Assigned video

Opens on YouTube
Optional video

Static Routing (Day 11 part 2)

By Jeremy's IT Lab · Opens externally on YouTube

Assigned watch
~8 min

The link opens in a new browser tab. Return here when you finish watching.

Watch for these concepts

  • The ip route syntax choices and how each form appears in show ip route
  • When next-hop is chosen over exit-interface

Go beyond the video

The assigned video introduces the idea. CCNA Practice Labs completes the learning path: clarify core concepts, explore how each device behaves, visualize the communication path, check your understanding, and prepare for hands-on lab work.

Watch the concept → understand it → visualize it → practice it → apply it.

One command, three ways to say where

A static route is you telling the router, by hand, that to reach this prefix it should go this way. Connected routes cover subnets on the router's own interfaces; everything one or more hops away needs either a static route or a dynamic protocol. Static routes are precise, predictable, and generate no protocol traffic — ideal for stub sites, default routes to an ISP, and small topologies — but every one is hand-maintained, so they do not scale to large or changing networks.

The command shape
ip route <destination-prefix> <mask> { <next-hop-ip> | <exit-interface> | <exit-interface> <next-hop-ip> }
The three forms and when to use each
FormExampleUse it when
Next-hopip route 10.1.4.0 255.255.255.0 10.1.2.2The common, safe default on Ethernet. The router still has to work out which interface leads to 10.1.2.2, which it does with a second lookup.
Exit-interface onlyip route 10.1.4.0 255.255.255.0 Gi0/1Clean on a true point-to-point link such as a serial line, where there is only one possible receiver. Avoid on multi-access Ethernet.
Fully specifiedip route 10.1.4.0 255.255.255.0 Gi0/1 10.1.2.2The most robust on Ethernet: no recursion is needed to find the interface, and the router still ARPs for the correct next hop.
Why exit-interface-only misbehaves on Ethernet
On a point-to-point serial link there is exactly one possible receiver, so a frame sent out the interface can only reach that neighbour and no address resolution is needed. Ethernet is multi-access: frames are delivered by destination MAC. With no next-hop IP to ARP for, the router falls back to ARPing for the packet's final destination on the local segment — an address that is not on that segment. Resolution fails unless a neighbour happens to run proxy ARP. Naming a next-hop IP gives the router a real address on the wire to resolve.

Recursive lookup: the second search you did not type

When you write ip route 10.1.4.0 255.255.255.0 10.1.2.2, the router installs the route — but 10.1.2.2 is not an interface, it is another router's address. To actually forward, the router must answer a second question: how do I reach 10.1.2.2? It searches the table again, finds 10.1.2.2 inside the connected route for 10.1.2.0/30 off Gi0/1, and now knows to send the frame out Gi0/1 and ARP for 10.1.2.2. That two-step match-then-resolve is recursive lookup.

The dependency this creates
A next-hop static route is only usable while the route that resolves its next hop still exists. Shut the interface carrying 10.1.2.0/30 and the static route to 10.1.4.0/24 can no longer be resolved — it stops forwarding, and IOS removes it from the table, even though you never touched its configuration. Fully specified routes reduce this fragility by naming the exit interface directly, but they still ARP for the next hop.

Every router on the path needs a route — in both directions

This is where static routing bites people, and it bites twice. Routing decisions are made per-router and per-direction, so a packet only completes a round trip if every router along the way can forward it both out and back.

A middle router is not exempt
It is tempting to think a router sitting between two others already knows everything, because both its interfaces are up and it has connected routes. It does not. Its connected routes cover only the two transit links it is attached to — not the LANs hanging off the routers at either end. A middle router with no static routes will accept a packet from one neighbour and then drop it, because it has no entry for the destination. Trace the whole path, router by router, rather than assuming the middle is fine.

And even with every router able to forward outbound, the reply has to find its own way home. If the far router has no route back to the sender's subnet, the echo request arrives and the echo reply is dropped. The forward path was flawless; the missing return route killed it. That is why a single ip route command on one router is never enough for a two-way ping.

Configuring a three-router line, correctly

Topology: R1 — R2 — R3 in a line. R1's LAN is 10.1.1.0/24 off Gi0/0. The R1-to-R2 link is 10.1.2.0/30, with R1 at .1 and R2 at .2. The R2-to-R3 link is 10.1.3.0/30, with R2 at .1 and R3 at .2. R3's LAN is 10.1.4.0/24 off its Gi0/0. The goal is a working ping from a host on 10.1.1.0/24 to 10.1.4.7.

What each router already knows, and what it still needs
RouterConnected subnetsMissingStatic routes required
R110.1.1.0/24, 10.1.2.0/3010.1.3.0/30, 10.1.4.0/24One toward R3's LAN
R210.1.2.0/30, 10.1.3.0/3010.1.1.0/24, 10.1.4.0/24Two — one in each direction
R310.1.3.0/30, 10.1.4.0/2410.1.1.0/24, 10.1.2.0/30One back toward R1's LAN
All four routes — note that R2 needs two of them
! R1 — reach R3's LAN via R2
R1(config)# ip route 10.1.4.0 255.255.255.0 10.1.2.2

! R2 — the middle router needs BOTH directions
R2(config)# ip route 10.1.4.0 255.255.255.0 10.1.3.2
R2(config)# ip route 10.1.1.0 255.255.255.0 10.1.2.1

! R3 — the return route back to R1's LAN
R3(config)# ip route 10.1.1.0 255.255.255.0 10.1.3.1
Verify on R1
R1# show ip route static
      10.0.0.0/8 is variably subnetted, 6 subnets, 3 masks
S        10.1.4.0/24 [1/0] via 10.1.2.2

R1# show ip route 10.1.4.7
Routing entry for 10.1.4.0/24
  Known via "static", distance 1, metric 0
  Routing Descriptor Blocks:
  * 10.1.2.2
      Route metric is 0, traffic share count is 1

Read the installed route: S marks it static, [1/0] is administrative distance 1 and metric 0 — static routes carry AD 1 by default and no meaningful metric — and via 10.1.2.2 names the next hop. show ip route static filters to only the routes you configured, which is the fastest way to audit your own work. show ip route 10.1.4.7 proves the forwarding decision for one specific host.

Four routes for one ping
Count them: one on R1, two on R2, one on R3. Two carry traffic outbound and two carry the replies home. If you configure only R1's route and test, the ping fails — and it fails silently, with no error to tell you which of the three routers dropped it. Working outward from the source, checking show ip route <destination> on each router in turn, is how you find the gap.

When a configured route never appears

Troubleshooting — the static route is configured but the packet never leaves
Symptom: you configured ip route 10.1.4.0 255.255.255.0 10.1.2.2 on R1, but show ip route 10.1.4.7 returns % Network not in table and show ip route static shows nothing. Diagnosis: a static route only installs if its next hop is resolvable. Check with show ip route 10.1.2.2 — if that returns % Subnet not in table, look at show ip interface brief. An administratively down Gi0/1 means the connected route for 10.1.2.0/30 is gone, and without it 10.1.2.2 cannot be resolved, so IOS refuses to install the dependent static route. Fix: no shutdown on the transit interface. The connected route returns, the next hop becomes resolvable, and IOS reinstalls the static route automatically. Root cause: a next-hop static route is only as alive as the route that resolves its next hop.

What you should retain

  • ip route <prefix> <mask> then a next hop, an exit interface, or both — three forms of one command.
  • Next-hop is the safe default on Ethernet; exit-interface-only suits point-to-point serial; fully specified is most robust when you want to pin the interface.
  • Recursive lookup: a next-hop route triggers a second search to resolve the next hop, usually against a connected route.
  • Every router on the path needs a route to the destination — including the middle ones, which are not exempt.
  • Every forward route needs a matching return route, or the ping fails in one direction only.
  • Static routes carry AD 1 and appear as S <prefix> [1/0] via <next-hop>.
  • Verify with show ip route static, and show ip route <destination> for the exact winning entry.
Pause and predictNot scored — nothing is recorded

Before you read on

Same R1 — R2 — R3 line. Predict each outcome. (1) Only R1 has ip route 10.1.4.0 255.255.255.0 10.1.2.2, and you ping from R1's LAN to 10.1.4.7. (2) R2 and R3 then get their routes too. (3) R1's route is rewritten as exit-interface-only — ip route 10.1.4.0 255.255.255.0 GigabitEthernet0/1 — on the Ethernet link to R2.

Interactive tool
Required~10 min

Static Routing Labs

Use the command builder to assemble next-hop, exit-interface, and fully specified routes, and compare how each appears in the table. The builder flags a malformed ip route before you commit it, which is a faster feedback loop than mistyping one into a live router.

Lab preparation

Prepare for the lab

Available nowWeek 4

Week 4 Lab — Static Routing

Build the R1 — R2 — R3 topology from this lesson with point-to-point /30 transit links, then add static routes until every LAN can reach every other LAN and verify with show ip route and end-to-end ping.

This lesson prepares you to:

  • Configuring a next-hop static route to a remote subnet
  • Adding the return route so a ping succeeds in both directions
  • Giving the middle router its two routes rather than assuming it is already covered
  • Replacing an exit-interface-only route with a fully specified one on Ethernet

Take the Static Routing & Failover quiz first — it checks exactly the material this lab assumes.

Open the lab

Study deeper

Topic guides extend this lesson — they do not replace the first-party walkthrough above.

Routing Protocols

For the full static-routing syntax reference and the next-hop-on-Ethernet guidance in more depth