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.

Static Route Interface SyntaxPoint-to-Point RoutingRecursive Lookup

~3 دقیقه مطالعه · آخرین به‌روزرسانی ۳۱ شهریور ۱۴۰۵

Lab Objective

Configure static routes on two routers using the outgoing interface syntax rather than specifying a next-hop IP address, and verify traffic routes correctly across a point-to-point serial link.

Lab Purpose

Static routes, discussed earlier in this series, can be configured pointing to either a next-hop IP address or an outgoing interface. The interface-based syntax works cleanly on point-to-point links but should generally be avoided on multi-access networks, a distinction this lab makes concrete.

Lab Topology

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

R1: 10.20.20.1/30, LAN 192.168.10.0/24 (Loopback1)
R2: 10.20.20.2/30, LAN 192.168.20.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 the Outgoing Interface on R1

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

Task 3: Configure the Equivalent Route on R2

On R2, configure a static route to R1's LAN using the same interface-based syntax.

Task 4: Verify Connectivity

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

Task 5: Examine the Routing Table Entry

Note how the route appears differently in the routing table compared to a next-hop-based static route.

Solution and Verification

R1(config)# interface serial0/0/0
R1(config-if)# ip address 10.20.20.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.10.1 255.255.255.0

R2(config)# interface serial0/0/0
R2(config-if)# ip address 10.20.20.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.20.1 255.255.255.0

R1(config)# ip route 192.168.20.0 255.255.255.0 serial0/0/0

-- The outgoing interface (serial0/0/0) is
-- specified instead of R2's serial IP address

R2(config)# ip route 192.168.10.0 255.255.255.0 serial0/0/0

R1# ping 192.168.20.1

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

R1# show ip route static

S    192.168.20.0/24 is directly connected, Serial0/0/0
-- Notice the route is listed as "directly
-- connected" rather than "via" a next-hop
-- address -- this is a distinguishing
-- characteristic of interface-based static
-- routes, since the router treats the entire
-- destination network as reachable directly
-- out that interface

Key Takeaway

Interface-based static routes work well on true point-to-point links like this serial connection, since there is only one possible destination for anything sent out that interface. On a multi-access network like Ethernet, however, this same syntax forces the router to ARP for every destination address individually rather than just the next hop, creating unnecessary overhead — next-hop-based static routes are generally preferred except on genuinely point-to-point media.

نوشته و پژوهش‌شده توسط دکتر شاهین صیامی

مقالات مرتبط

Hands-On Lab: Final Comprehensive CCNP Troubleshooting Challenge (BGP, DMVPN, and QoS Integration)

This hands-on lab presents a complex multi-layer failure across an integrated BGP-over-DMVPN topology combined with QoS marking, requiring systematic diagnosis of a route reflector misconfiguration, an NHRP registration failure, and an incorrectly applied QoS policy simultaneously affecting the same network.

ادامه

Hands-On Lab: Configuring BGP over DMVPN

This hands-on lab runs iBGP as the routing protocol across the same DMVPN hub-and-spoke topology used in the two previous labs, configuring the hub as a route reflector so spokes learn each other's routes without a full iBGP mesh, combining two previously separate concepts into one integrated design.

ادامه

Hands-On Lab: Configuring OSPF over DMVPN

This hands-on lab runs OSPF as the dynamic routing protocol across the same DMVPN hub-and-spoke topology, configuring the tunnel interface as an OSPF point-to-multipoint network type to correctly handle the hub-and-spoke adjacency pattern without requiring the broadcast network type's DR/BDR election.

ادامه

Hands-On Lab: Configuring EIGRP over DMVPN

This hands-on lab runs EIGRP as the dynamic routing protocol across the DMVPN hub-and-spoke topology built in earlier labs, verifying neighbor relationships form correctly across the multipoint tunnel and routes propagate without requiring per-spoke static configuration on the hub.

ادامه

Hands-On Lab: Configuring HSRP MD5 Authentication

This hands-on lab configures MD5 authentication on an HSRP group, verifying two routers with matching authentication strings form a normal active/standby relationship while a router with a mismatched string is excluded from the group entirely.

ادامه

Hands-On Lab: Configuring Cisco Umbrella-Style DNS Security via DNS Forwarding Redirection

This hands-on lab configures a router to redirect all client DNS queries toward a security-focused DNS resolver using DNS forwarding interception, approximating cloud-delivered DNS security enforcement without requiring per-client configuration changes.

ادامه