Lab Topology and Initial Interface Configuration
Three-Router Linear Topology
The topology connects R1, R2 and R3 in a line. R1 has a LAN on GigabitEthernet0/0 (10.1.1.0/24) and connects to R2 via Serial0/0/0 (10.12.12.0/30). R2 sits in the middle with Serial0/0/0 facing R1 and Serial0/0/1 facing R3 (10.23.23.0/30). R3 has Serial0/0/1 toward R2 and a LAN on GigabitEthernet0/0 (10.3.3.0/24). R2 also has a LAN on GigabitEthernet0/0 (10.2.2.0/24).
| Router | Interface | IP Address | Subnet |
|---|---|---|---|
| R1 | GigabitEthernet0/0 | 10.1.1.1 | 10.1.1.0/24 |
| R1 | Serial0/0/0 (DCE) | 10.12.12.1 | 10.12.12.0/30 |
| R2 | Serial0/0/0 | 10.12.12.2 | 10.12.12.0/30 |
| R2 | GigabitEthernet0/0 | 10.2.2.1 | 10.2.2.0/24 |
| R2 | Serial0/0/1 (DCE) | 10.23.23.1 | 10.23.23.0/30 |
| R3 | Serial0/0/1 | 10.23.23.2 | 10.23.23.0/30 |
| R3 | GigabitEthernet0/0 | 10.3.3.1 | 10.3.3.0/24 |
Interface Addressing and no shutdown
Configure R1's interfaces first. The DCE side of a serial link must set clock rate to bring the physical layer up in a lab environment.
R1#configure terminal
R1(config)#interface GigabitEthernet0/0
R1(config-if)#ip address 10.1.1.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#interface Serial0/0/0
R1(config-if)#ip address 10.12.12.1 255.255.255.252
R1(config-if)#clock rate 128000
R1(config-if)#no shutdown
R1(config-if)#end
Repeat for R2 and R3, adjusting interface names and addresses to match the table. Verify interfaces are up with show ip interface brief:
R1#show ip interface brief
Interface IP-Address OK? Method Status Protocol
GigabitEthernet0/0 10.1.1.1 YES manual up up
Serial0/0/0 10.12.12.1 YES manual up up
Both Status and Protocol must show "up" before the router will forward traffic or install static routes that reference those interfaces. If Protocol is down on a serial link, check cabling and the clock rate on the DCE side. If Status is administratively down, you forgot no shutdown. Directly connected subnets appear in the routing table automatically once interfaces are up; remote networks require static routes.
Configuring Standard Static Routes with Next-Hop Address
ip route Command Syntax and Administrative Distance
The ip route command installs a static route in the routing table. Full syntax is ip route destination_network mask next-hop-ip [administrative-distance]. The next-hop IP must be reachable on a directly connected subnet, which is usually the far-end router's interface address on the link between you and the destination.
Administrative distance (AD) determines which route wins when multiple sources advertise the same prefix. Static routes default to AD 1, which beats OSPF (110) and EIGRP (90) but loses to directly connected routes (AD 0). You rarely specify AD for a standard static route; the default of 1 is correct. You will set a higher AD for floating static routes later. Cisco's documentation on configuring static routes covers the full command reference.
A common mistake is using your own interface IP as the next-hop. The next-hop must be the neighbor router's IP on the shared link. If you configure ip route 10.3.3.0 255.255.255.0 10.12.12.1 on R1, the route points to R1 itself and creates a loop. The correct next-hop is 10.12.12.2 (R2's address).
Configuring Routes on R1 and R3
R1 needs routes to reach R2's LAN (10.2.2.0/24) and R3's LAN (10.3.3.0/24). Both destinations lie beyond R2, so the next-hop for both routes is 10.12.12.2.
R1(config)#ip route 10.2.2.0 255.255.255.0 10.12.12.2
R1(config)#ip route 10.3.3.0 255.255.255.0 10.12.12.2
R3 needs routes to R1's LAN (10.1.1.0/24) and R2's LAN (10.2.2.0/24). The next-hop is 10.23.23.1 (R2's Serial0/0/1 address).
R3(config)#ip route 10.1.1.0 255.255.255.0 10.23.23.1
R3(config)#ip route 10.2.2.0 255.255.255.0 10.23.23.1
R2 needs routes to the two edge LANs:
R2(config)#ip route 10.1.1.0 255.255.255.0 10.12.12.1
R2(config)#ip route 10.3.3.0 255.255.255.0 10.23.23.2
Verify the routes appear with show ip route static:
R1#show ip route static
S 10.2.2.0/24 [1/0] via 10.12.12.2
S 10.3.3.0/24 [1/0] via 10.12.12.2
The [1/0] shows administrative distance 1 and metric 0. The "S" code indicates a static route. If routes do not appear, check that the next-hop IP is reachable; show ip route will only install a static route if the next-hop address exists in the routing table as a connected or learned route.
Configuring Static Routes with Exit Interface
Exit-Interface Syntax and When to Use It
Instead of specifying the next-hop IP, you can name the local exit interface: ip route destination_network mask exit-interface. On R1, the command ip route 10.3.3.0 255.255.255.0 Serial0/0/0 tells the router to forward packets for 10.3.3.0/24 out Serial0/0/0.
R1(config)#ip route 10.3.3.0 255.255.255.0 Serial0/0/0
When you check show ip route, older IOS versions display the route as "directly connected" via the specified interface; newer versions show it as static with the exit interface. Either way, the route is installed and forwarding works.
R1#show ip route
...
S 10.3.3.0/24 is directly connected, Serial0/0/0
Exit-interface syntax works reliably on point-to-point links (serial, point-to-point subinterfaces) because there is only one neighbor. The router does not need to resolve a next-hop MAC address. For more background on static route behavior with different interface types, see the CCNA 200-301 Router Lab Guide.
Point-to-Point vs Multi-Access Interfaces
Do not use exit-interface syntax on multi-access segments like Ethernet without also specifying the next-hop IP. If you configure ip route 10.3.3.0 255.255.255.0 GigabitEthernet0/0 on a LAN with multiple routers, the router does not know which neighbor should receive the packet. It performs a recursive lookup or proxy ARP, which adds CPU overhead and can fail. The correct syntax for Ethernet is ip route 10.3.3.0 255.255.255.0 GigabitEthernet0/0 next-hop-ip, combining both the exit interface and the neighbor's IP.
On serial point-to-point links, exit-interface and next-hop-ip syntax both work. Many engineers prefer next-hop IP because it is explicit and consistent across all link types. In the CCNA 200-301 exam and production networks, next-hop IP is the safer default unless you have a specific reason to use exit-interface syntax.
| Syntax | Example | Best Use |
|---|---|---|
| Next-hop IP | ip route 10.3.3.0 255.255.255.0 10.12.12.2 |
All scenarios |
| Exit interface | ip route 10.3.3.0 255.255.255.0 Serial0/0/0 |
Point-to-point only |
| Both | ip route 10.3.3.0 255.255.255.0 GigabitEthernet0/0 10.1.1.254 |
Multi-access with known next-hop |
Default Routes and Gateway of Last Resort
Configuring a Default Static Route
A default route matches any destination not covered by a more specific route. The syntax is ip route 0.0.0.0 0.0.0.0 next-hop-ip or ip route 0.0.0.0 0.0.0.0 exit-interface. The 0.0.0.0 destination and 0.0.0.0 mask represent all addresses. Default routes reduce configuration on edge routers and stub networks, any location where all unknown traffic should go to a single upstream router.
In the three-router topology, R1 and R3 are edge routers. Instead of configuring separate static routes for 10.2.2.0/24 and 10.3.3.0/24 on R1, you can configure a single default route pointing to R2. Remove the two specific routes from R1 first:
R1(config)#no ip route 10.2.2.0 255.255.255.0 10.12.12.2
R1(config)#no ip route 10.3.3.0 255.255.255.0 10.12.12.2
R1(config)#ip route 0.0.0.0 0.0.0.0 10.12.12.2
R3 can do the same, pointing its default route to R2:
R3(config)#no ip route 10.1.1.0 255.255.255.0 10.23.23.1
R3(config)#no ip route 10.2.2.0 255.255.255.0 10.23.23.1
R3(config)#ip route 0.0.0.0 0.0.0.0 10.23.23.1
R2 in the middle cannot use a default route because it needs to know which direction to send traffic. R2 keeps its two specific static routes to 10.1.1.0/24 and 10.3.3.0/24. Default routes work for edge routers that send all non-local traffic in one direction. If R1 had two upstream links to different ISPs, you would not use a default route unless you wanted all traffic to prefer one ISP over the other.
Verification with show ip route and Gateway Display
The default route appears in show ip route with the code S*. The asterisk marks it as a candidate default route. The routing table also displays "Gateway of last resort" at the top, showing which next-hop handles traffic with no more-specific match.
R1#show ip route
Codes: L - local, C - connected, S - static, ...
Gateway of last resort is 10.12.12.2 to network 0.0.0.0
S* 0.0.0.0/0 [1/0] via 10.12.12.2
10.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
C 10.1.1.0/24 is directly connected, GigabitEthernet0/0
L 10.1.1.1/32 is directly connected, GigabitEthernet0/0
C 10.12.12.0/30 is directly connected, Serial0/0/0
L 10.12.12.1/32 is directly connected, Serial0/0/0
The S* 0.0.0.0/0 [1/0] via 10.12.12.2 line is your default route. Ping from R1 to 10.3.3.1 now works even though R1 has no specific route for 10.3.3.0/24; the default route forwards the packet to R2, and R2's specific route sends it to R3. If you remove the default route with no ip route 0.0.0.0 0.0.0.0 10.12.12.2, the gateway of last resort disappears and pings to remote networks fail with "Destination host unreachable."
Floating Static Routes for Redundancy
Administrative Distance Manipulation
A floating static route is a backup route with a higher administrative distance than the primary route. The router installs the primary route by default. If the primary path fails, the router removes it from the table and installs the floating route. To configure a floating static route, append the desired AD to the ip route command: ip route destination mask next-hop AD.
Add a redundant link between R1 and R3 on a new subnet, 10.13.13.0/30. Configure R1 Serial0/0/1 with 10.13.13.1 and R3 Serial0/0/0 with 10.13.13.2. On R1, install two routes to 10.3.3.0/24: the primary via R2 (default AD 1) and a backup via the direct R1-R3 link (AD 5).
R1(config)#ip route 10.3.3.0 255.255.255.0 10.12.12.2
R1(config)#ip route 10.3.3.0 255.255.255.0 10.13.13.2 5
Check show ip route. Only the primary route appears because AD 1 beats AD 5.
R1#show ip route static
S 10.3.3.0/24 [1/0] via 10.12.12.2
The floating route exists in the configuration but not in the routing table. To see it, use show running-config | include ip route:
R1#show running-config | include ip route
ip route 10.3.3.0 255.255.255.0 10.12.12.2
ip route 10.3.3.0 255.255.255.0 10.13.13.2 5
Dynamic routing protocols have their own ADs: EIGRP internal is 90, OSPF is 110, RIP is 120. If you run OSPF and want a static route to act as backup, set the static route's AD to 111 or higher. If you want the static route to override OSPF, leave it at AD 1. A floating static route with AD 91 will back up an EIGRP route but override an OSPF route.
Failover Scenario and Verification
Simulate primary path failure by shutting down R1's Serial0/0/0 interface:
R1(config)#interface Serial0/0/0
R1(config-if)#shutdown
Wait a few seconds, then check the routing table:
R1#show ip route static
S 10.3.3.0/24 [5/0] via 10.13.13.2
The floating route is now active with AD 5. Ping 10.3.3.1 from R1; it succeeds via the backup path. Bring the primary interface back up:
R1(config)#interface Serial0/0/0
R1(config-if)#no shutdown
After the interface comes up, show ip route shows the primary route again. The router prefers AD 1 over AD 5, so it switches back automatically. The floating route remains in running-config but leaves the routing table. This behavior is instant; you do not need to clear any cache or wait for a timer. Floating static routes are common in small networks that cannot justify the overhead of a dynamic routing protocol but need basic redundancy.
Verification Commands and Reading show ip route Output
Understanding Routing Table Codes and Metrics
The full output of show ip route begins with a legend of route codes. Each route line starts with a letter indicating the source: C for directly connected, L for local (the router's own interface address as a /32), S for static, O for OSPF, D for EIGRP, R for RIP. The asterisk in S* marks a candidate default route.
R2#show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
...
Gateway of last resort is not set
10.0.0.0/8 is variably subnetted, 8 subnets, 2 masks
S 10.1.1.0/24 [1/0] via 10.12.12.1
C 10.2.2.0/24 is directly connected, GigabitEthernet0/0
L 10.2.2.1/32 is directly connected, GigabitEthernet0/0
S 10.3.3.0/24 [1/0] via 10.23.23.2
C 10.12.12.0/30 is directly connected, Serial0/0/0
L 10.12.12.2/32 is directly connected, Serial0/0/0
C 10.23.23.0/30 is directly connected, Serial0/0/1
L 10.23.23.1/32 is directly connected, Serial0/0/1
Each static route line shows the destination network and mask (10.1.1.0/24), the administrative distance and metric in brackets ([1/0]), the word "via" followed by the next-hop IP (10.12.12.1), and sometimes the outgoing interface. The metric for static routes is always 0 unless you manually set it. Directly connected routes (code C) have AD 0 and appear whenever an interface is up with an IP address. Local routes (code L) are /32 host routes for the router's own interface IPs; they are not static routes and you cannot remove them without removing the IP address.
show ip route specific vs show ip route static
To check how the router will forward traffic to a specific destination, use show ip route ip-address. This performs a route lookup and shows which entry matches.
R2#show ip route 10.1.1.50
Routing entry for 10.1.1.0/24
Known via "static", distance 1, metric 0
Routing Descriptor Blocks:
* 10.12.12.1
Route metric is 0, traffic share count is 1
This output confirms that packets to 10.1.1.50 will use the static route via 10.12.12.1. If you see "% Network not in table," the router has no route and will drop the packet. Use show ip route static to filter the routing table to only static routes, which is faster than scrolling through a full table on a router with hundreds of routes.
R2#show ip route static
S 10.1.1.0/24 [1/0] via 10.12.12.1
S 10.3.3.0/24 [1/0] via 10.23.23.2
To audit all static route commands in the configuration quickly, use show running-config | include ip route. This shows every ip route line, including floating routes that are not currently in the routing table. The combination of show ip route static (what is active) and show running-config | include ip route (what is configured) gives you a complete picture of static routing on the device.
Troubleshooting Failed Reachability and Common Mistakes
Debugging with ping and traceroute
You configure static routes on R1 and R3, but ping from R1 to 10.3.3.1 fails. Start with show ip route on R1 to verify the route exists. If show ip route 10.3.3.0 returns "% Network not in table," the route is missing or the next-hop is unreachable. Check the next-hop address is correct and that R1 has a route (connected or static) to reach it.
R1#ping 10.3.3.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.3.3.1, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
If the route is present, ping the next-hop directly to verify the link works. From R1, ping 10.12.12.2 should succeed if the R1-R2 link is up. If this ping fails, check interface status with show ip interface brief and show interfaces Serial0/0/0. Look for "line protocol is down" which indicates a layer-2 issue: missing clock rate on the DCE side, wrong encapsulation or a cable fault.
Once the next-hop ping succeeds, use traceroute 10.3.3.1 from R1 to see where packets stop. Traceroute sends packets with increasing TTL values and reports each hop. If it shows R2 (10.12.12.2) but then times out, R2 has no route forward to 10.3.3.0/24 or R3 is dropping the packets. If traceroute reaches R3 (10.23.23.2) but 10.3.3.1 does not respond, R3's GigabitEthernet0/0 may be down or 10.3.3.1 does not exist.
R1#traceroute 10.3.3.1
Type escape sequence to abort.
Tracing the route to 10.3.3.1
VRF info: (vrf in name/id, vrf out name/id)
1 10.12.12.2 12 msec 8 msec 8 msec
2 * * *
3 * * *
This output shows packets reach R2 but go no further. Check R2's routing table for a route to 10.3.3.0/24. If missing, configure it. Also verify R2's Serial0/0/1 toward R3 is up. Use show protocols to see interface status for all interfaces at once; it is faster than checking each with show ip interface brief.
Asymmetric Routing and Missing Return Routes
The most common static routing mistake is configuring routes in only one direction. R1 has a route to 10.3.3.0/24, so packets from R1 to R3 reach R3. R3 receives the packet, generates a reply, but has no route back to 10.1.1.0/24. The reply is dropped and the ping times out. Check show ip route on R3:
R3#show ip route
...
10.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
C 10.3.3.0/24 is directly connected, GigabitEthernet0/0
L 10.3.3.1/32 is directly connected, GigabitEthernet0/0
C 10.23.23.0/30 is directly connected, Serial0/0/1
L 10.23.23.2/32 is directly connected, Serial0/0/1
No route to 10.1.1.0/24 appears. Configure the return route on R3:
R3(config)#ip route 10.1.1.0 255.255.255.0 10.23.23.1
Ping from R1 to 10.3.3.1 now succeeds. Every static routing lab requires bidirectional routes. If R1 needs to reach R3, R3 must have a route back to R1. Intermediate routers like R2 need routes in both directions as well. Default routes simplify this: if R1 and R3 both use default routes pointing to R2, and R2 has specific routes to the edge LANs, reachability works without configuring a route for every remote network on every router.
Other mistakes include wrong subnet mask (typing 255.255.255.255 instead of 255.255.255.0 installs a /32 host route, not the /24 network you intended), wrong next-hop IP (pointing to your own interface or a non-existent address), and interface shutdown. Always verify interface status before troubleshooting routes. If show ip interface brief shows an interface as administratively down, run no shutdown in interface configuration mode. If it shows down/down, check physical cabling and the clock rate on serial DCE interfaces.
Pre-Lab Checklist and Verification Workflow
Use this workflow for every CCNA static routing lab to catch configuration errors before you waste time troubleshooting phantom problems. Step 1: run show ip interface brief on every router. Confirm all interfaces you plan to use show "up" for both Status and Protocol. If any interface is down, fix it before configuring routes. On serial links, verify the DCE side has clock rate set. Step 2: verify IP addressing with show running-config interface interface-name or show ip interface interface-name. Confirm each address matches your topology diagram and the subnet mask is correct.
Step 3: test reachability to directly connected neighbors. From R1, ping 10.12.12.2 should succeed if R1 and R2 are properly connected. If this ping fails, you have a layer-1 or layer-2 issue; do not configure static routes until you fix it. Step 4: configure static routes or default routes as required by the lab. Step 5: verify routes appear in the routing table with show ip route static or show ip route. If a route is missing, check that the next-hop address is reachable (it must exist in the routing table as a connected or learned route).
Step 6: test end-to-end reachability with ping from each edge router to every remote LAN. If ping fails, use traceroute to identify where packets stop. Step 7: verify the return path exists. Log into the destination router and confirm it has a route back to the source network. Step 8: document the configuration with show running-config or show running-config | include ip route. Save the configuration to NVRAM with write memory or copy running-config startup-config so your routes survive a reboot.
In the CCNA 200-301 lab exam, you have limited time. Following this checklist prevents common mistakes and ensures you do not move to the next task until the current one works. The CCNA 200-301 Lab Workbook Guide includes additional lab topologies and verification workflows for routing, switching and troubleshooting scenarios.
Frequently Asked Questions
What is the difference between next-hop and exit-interface in a static route?
Next-hop syntax specifies the neighbor router's IP address; the router performs a recursive lookup to find the exit interface. Exit-interface syntax names the local interface to send packets out of. Next-hop works on all link types and is the safer default. Exit-interface syntax works reliably only on point-to-point links; on multi-access segments like Ethernet, use both exit-interface and next-hop IP to avoid ARP issues.
Why does my static route not appear in the routing table?
The router only installs a static route if the next-hop IP address is reachable via a route already in the table (connected, static or learned). If the next-hop is not reachable, the route stays in running-config but does not appear in show ip route. Check that the interface toward the next-hop is up and the next-hop address is correct. Also verify you did not configure a higher AD than an existing route to the same destination.
What is a floating static route and when should I use one?
A floating static route is a backup route with a higher administrative distance than the primary route. Configure it by adding an AD value to the ip route command, for example ip route 10.3.3.0 255.255.255.0 10.13.13.2 5. The router installs the primary route by default; if the primary fails, the floating route becomes active. Use floating static routes for redundancy in small networks that do not run dynamic routing protocols.
How do I configure a default route on a Cisco router?
Use ip route 0.0.0.0 0.0.0.0 next-hop-ip or ip route 0.0.0.0 0.0.0.0 exit-interface. The 0.0.0.0/0 prefix matches any destination not covered by a more specific route. Default routes are common on edge routers and stub networks where all unknown traffic should go to a single upstream router. Verify with show ip route; the default route appears as S* 0.0.0.0/0 and the gateway of last resort is set.
Why can I ping in one direction but not the other after configuring static routes?
You configured a route on the source router but forgot the return route on the destination router. The destination receives the packet and generates a reply, but has no route back to the source network, so it drops the reply. Check show ip route on the destination router and configure a static route or default route pointing back to the source. Every static routing lab requires bidirectional routes for successful reachability.