Hands-On Lab: Configuring Default Static Routes

This hands-on lab configures a default static route on an edge router to reach the internet through an ISP connection, demonstrating how a single route can represent every otherwise-unknown destination rather than requiring individual routes for each one.

Default Static RouteGateway of Last Resort0.0.0.0/0

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

Lab Objective

Configure a default static route on an edge router pointing toward an ISP, verify it appears correctly as the gateway of last resort, and confirm it successfully routes traffic to a destination with no more specific matching route.

Lab Purpose

Maintaining an individual static route for every possible internet destination would be completely impractical. A default route, matching any destination not covered by a more specific entry, is the standard solution for edge routers connecting to an ISP or any upstream network.

Lab Topology

R1 (edge router) ---- Serial0/0/1 ---- ISP Router
R1's internal LAN: 192.168.50.0/24

R1's serial address: 203.0.113.1/30
ISP's serial address: 203.0.113.2/30
(ISP simulated as directly reachable for
 this lab, representing the path to the
 wider internet)

Task 1: Configure Basic Addressing

Configure R1's serial interface toward the ISP and its internal LAN interface.

Task 2: Configure the Default Static Route

Configure a default route on R1 pointing to the ISP's serial address.

Task 3: Verify the Gateway of Last Resort

Confirm the routing table identifies this route as the gateway of last resort.

Task 4: Test the Default Route

Ping an address with no specific matching route in R1's table (simulating an internet destination) and confirm the default route is used.

Solution and Verification

R1(config)# interface serial0/0/1
R1(config-if)# ip address 203.0.113.1 255.255.255.252
R1(config-if)# no shutdown
R1(config-if)# exit
R1(config)# interface gigabitethernet0/0
R1(config-if)# ip address 192.168.50.1 255.255.255.0
R1(config-if)# no shutdown

R1(config)# ip route 0.0.0.0 0.0.0.0 203.0.113.2

-- 0.0.0.0 0.0.0.0 matches every possible
-- destination, since a mask of all zeros
-- means "any value in every octet is
-- acceptable" -- this is the standard
-- notation for a default route

R1# show ip route

Gateway of last resort is 203.0.113.2 to network 0.0.0.0

S*   0.0.0.0/0 [1/0] via 203.0.113.2
C    192.168.50.0/24 is directly connected, GigabitEthernet0/0
C    203.0.113.0/30 is directly connected, Serial0/0/1

R1# ping 8.8.8.8

-- (simulated destination beyond the ISP)

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

R1# show ip route 8.8.8.8

% Network not in table
-- Confirms 8.8.8.8 has no specific matching
-- entry, yet the ping succeeded because the
-- default route caught it instead

Key Takeaway

The asterisk (S*) next to a static route in the routing table specifically marks it as the candidate default route, and the Gateway of last resort line at the top of show ip route output is the fastest way to confirm whether a default route is actually configured and active — a router with no gateway of last resort shown will drop any packet with no more specific matching route rather than forwarding it anywhere.

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

مقالات مرتبط

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.

ادامه