Hands-On Lab: Configuring Static Routing via IP Addresses

This hands-on lab configures static routes using a next-hop IP address rather than an outgoing interface, the generally preferred syntax, and compares the resulting routing table entry against the interface-based approach from the previous lab.

Static Route Next-Hop SyntaxRecursive Route LookupRouting Table Comparison

~3 min read · Updated Sep 22, 2026

Lab Objective

Configure static routes on two routers using next-hop IP addresses rather than outgoing interfaces, verify connectivity, and compare the resulting routing table format against the interface-based method from the previous lab.

Lab Purpose

Next-hop-based static routes are the generally preferred syntax for most scenarios, since they avoid the excessive ARP overhead that interface-based routes can cause on multi-access networks, discussed in the previous lab. Understanding exactly how this method appears in the routing table is essential for correctly reading real-world configurations.

Lab Topology

R1 ---- Serial0/0/0 ------ Serial0/0/0 ---- R2

R1: 10.21.21.1/30, LAN 192.168.11.0/24 (Loopback1)
R2: 10.21.21.2/30, LAN 192.168.21.0/24 (Loopback1)

Task 1: Configure Basic Addressing

Configure the serial interfaces and a loopback on each router representing its local LAN.

Task 2: Configure a Static Route Using a Next-Hop Address on R1

On R1, configure a static route to R2's LAN using R2's serial interface IP address as the next hop.

Task 3: Configure the Equivalent Route on R2

On R2, configure a static route to R1's LAN using R1's serial interface IP address as the next hop.

Task 4: Verify Connectivity

Confirm R1 can reach R2's LAN and vice versa.

Task 5: Compare the Routing Table Entry Format

Examine how this route appears in the routing table, contrasting it with the "directly connected" format seen in the previous lab's interface-based route.

Solution and Verification

R1(config)# interface serial0/0/0
R1(config-if)# ip address 10.21.21.1 255.255.255.252
R1(config-if)# no shutdown
R1(config-if)# exit
R1(config)# interface loopback1
R1(config-if)# ip address 192.168.11.1 255.255.255.0

R2(config)# interface serial0/0/0
R2(config-if)# ip address 10.21.21.2 255.255.255.252
R2(config-if)# clock rate 64000
R2(config-if)# no shutdown
R2(config-if)# exit
R2(config)# interface loopback1
R2(config-if)# ip address 192.168.21.1 255.255.255.0

R1(config)# ip route 192.168.21.0 255.255.255.0 10.21.21.2

-- The next-hop IP address (10.21.21.2, R2's
-- serial interface) is specified instead of
-- R1's own outgoing interface name

R2(config)# ip route 192.168.11.0 255.255.255.0 10.21.21.1

R1# ping 192.168.21.1

!!!!!
Success rate is 100 percent (5/5)

R1# show ip route static

S    192.168.21.0/24 [1/0] via 10.21.21.2
-- Notice the route now explicitly shows
-- "via 10.21.21.2" along with the administrative
-- distance/metric pair [1/0] -- a clear contrast
-- with the "directly connected" phrasing the
-- interface-based route showed in the previous lab

Key Takeaway

A next-hop-based static route requires the router to perform a recursive lookup: it must first determine which local interface can actually reach that next-hop address before it can forward traffic, whereas an interface-based route skips this step entirely. This recursive lookup is a small amount of extra processing, but it is exactly what avoids the excessive per-destination ARP behavior that makes interface-based routes problematic on multi-access networks.

Written & researched by Dr. Shahin Siami

Related Articles

Hands-On Lab: Configuring Static Routing via Interfaces

This hands-on lab configures static routes using an outgoing interface rather than a next-hop IP address, demonstrating this approach's suitability for point-to-point links and its important limitation on multi-access networks.

Continue

Hands-On Lab: Installing a Wireless LAN Controller

This hands-on lab performs the initial setup of a Wireless LAN Controller, joins a lightweight access point to it, and creates a centrally managed WLAN, demonstrating the controller-based architecture that scales far beyond standalone access points.

Continue

Hands-On Lab: Installing a Wireless Access Point

This hands-on lab covers physically connecting and performing the initial configuration of a standalone wireless access point, including setting up an SSID, applying WPA3 security, and verifying wireless clients can associate and reach the wired network.

Continue

Hands-On Lab: Configuring and Allowing Inter-VLAN Routing — SVI

This hands-on lab configures inter-VLAN routing using Switch Virtual Interfaces on a Layer 3 switch, enabling IP routing directly on the switch itself and comparing this approach against the router-on-a-stick method from the previous lab.

Continue

Hands-On Lab: Configuring Inter-VLAN Routing (Router on a Stick)

This hands-on lab configures inter-VLAN routing using a single router interface divided into subinterfaces, connecting to a switch trunk to route traffic between two VLANs through one physical link.

Continue

Hands-On Lab: Configuring Errdisable Recovery

This hands-on lab triggers a port security violation that places a port into err-disabled state, then configures automatic errdisable recovery so the port re-enables itself after a timeout instead of requiring manual intervention.

Continue