Week 3 · Lab

LAB: Static Routing

A router only knows the networks that are directly connected to its own interfaces. To reach anything else, it needs a route — and one of the simplest ways to give it that route is to type it in by hand. In this lab you configure two routers with static and default routes so that hosts on two isolated LANs can ping each other across the middle link.

CCNA 200-301 Domain 3.0 · IP Connectivity Verified 2026-10-11
Part 1

Objective and goal

Two small offices each have one LAN. Office A uses 192.168.1.0/24, office B uses 192.168.2.0/24. The two offices are joined by a small point-to-point link on 10.0.0.0/30. A /30 provides exactly two usable addresses — one for each router, and no wasted host space. The goal: PC-A and PC-B must be able to ping one another.

Definition — static route. A static route is a route an administrator enters by hand in the router. It is the opposite of a dynamic route (RIP, OSPF, EIGRP — all in later weeks). You give the router the destination network, its mask, and the next hop (where to send the packet). Static routes have an administrative distance of 1.

Configure

Interface IP addresses, bring interfaces up with no shutdown, and add static and default routes.

Verify

Use show ip route to read the table and ping to prove end-to-end connectivity.

Troubleshoot

Work symptom → cause → fix, hop by hop from the source.

This lab uses Cisco IOS commands that work in Packet Tracer, GNS3, EVE-NG, and on real Cisco hardware. Router prompts are shown as R1# and R1(config-if)# — the same prompts you will see on a real console.

Part 2

Topology and addressing plan

Build this in Packet Tracer (or your simulator) before you type a single route.

PC-A S1 R1 R2 S2 PC-B 192.168.1.10 /24 gw 192.168.1.1 192.168.2.10 /24 gw 192.168.2.1 g0/0: 192.168.1.1 g0/0: 192.168.2.1 WAN 10.0.0.0/30 R1 g0/1 .1 — R2 g0/1 .2
PC-A --- S1 --- R1 (g0/0: 192.168.1.1 / LAN A 192.168.1.0/24)
                   |
             (g0/1: 10.0.0.1) -- /30 link -- (g0/1: 10.0.0.2)
                   |
              R2 (g0/0: 192.168.2.1 / LAN B 192.168.2.0/24)
                   |
              S2 --- PC-B
DeviceInterfaceIP addressMaskDefault gateway
PC-ANIC192.168.1.10255.255.255.0192.168.1.1
R1GigabitEthernet 0/0192.168.1.1255.255.255.0—
R1GigabitEthernet 0/110.0.0.1255.255.255.252—
R2GigabitEthernet 0/110.0.0.2255.255.255.252—
R2GigabitEthernet 0/0192.168.2.1255.255.255.0—
PC-BNIC192.168.2.10255.255.255.0192.168.2.1
Exam tip. A /30 (255.255.255.252) is the classic point-to-point link mask: 4 addresses total, of which the network (…0) and broadcast (…3) are unusable — leaving exactly 2 usable hosts. Whenever you see a point-to-point link between two routers, expect to use /30 (or /31). Note that 255.255.255.252 is not 255.255.255.0 and not 255.255.252.0 — a slip here puts both routers in the wrong subnet.

Step 1 — Build the topology

  1. Add 2 PCs, 2 switches (2960 or similar), and 2 routers (4321 or 2911).
  2. PC-A → S1 and PC-B → S2: copper straight-through cable.
  3. S1 → R1 g0/0 and S2 → R2 g0/0: copper straight-through.
  4. R1 g0/1 → R2 g0/1: this is a router-to-router link. Use a copper cross-over cable, a fibre link, or (if your routers have them) a serial DCE/DTE cable.
Common mistake. Two routers joined with a copper straight-through cable will not bring the link up. Routers are end devices on that link, so they need a cross-over (or auto-MDIX / fibre / serial). If you use serial ports, the DCE side must be given a clock rate.
Part 3

Tasks: step by step

Work through the twelve steps in order. The stepper below gives you the purpose of each one; the full command listings follow it.

Task stepper · step through the lab

Step 2 — Check the defaults

Out of the box, all IOS interfaces are administratively down (they contain the command shutdown by default), every router has only its defaults, and the PCs have no IP configuration — unless a simulator preloaded one. Confirm that nothing works yet:

! from PC-A, before any configuration
C:\> ping 192.168.2.10
Request timed out.
Request timed out.
Request timed out.
Request timed out.
Ping statistics for 192.168.2.10:
    Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),

Expected. The two LANs are physically separate, the routers are unconfigured, and there is no path between them yet. This is the “before” picture you will compare against at the end.

Step 3 — Configure the host PCs

Give each PC a static address, mask, and default gateway. Use the PC’s Desktop → IP Configuration panel in Packet Tracer, or the command line:

! PC-A
C:\> ipconfig /ip 192.168.1.10 255.255.255.0 192.168.1.1

! PC-B
C:\> ipconfig /ip 192.168.2.10 255.255.255.0 192.168.2.1

Check PC-A’s settings and test that its default gateway is reachable on the same subnet (the switches forward it on MAC, no routing needed):

C:\> ipconfig

FastEthernet0 Connection:(default port)

   Connection-specific DNS Suffix..:
   IP Address......................: 192.168.1.10
   Subnet Mask.....................: 255.255.255.0
   Default Gateway.................: 192.168.1.1

C:\> ping 192.168.1.1
Pinging 192.168.1.1 with 32 bytes of data:
Reply from 192.168.1.1: bytes=32 time=1ms TTL=255
Reply from 192.168.1.1: bytes=32 time=1ms TTL=255
Reply from 192.168.1.1: bytes=32 time=1ms TTL=255
Reply from 192.168.1.1: bytes=32 time=1ms TTL=255

Ping statistics for 192.168.1.1:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),

That reply comes from R1 g0/0 — but R1 has no IP address yet, so this ping will not succeed until Step 4. If you test now, it fails: the gateway does not exist yet. Do the equivalent check on PC-B (against 192.168.2.1) after R2 is configured.

Step 4 — Configure R1

Enter privileged exec mode, then global configuration. Set the hostname, then configure both interfaces. Remember: an interface with an IP address is still down until you type no shutdown.

Router> enable
Router# configure terminal
Router(config)# hostname R1
R1(config)# interface gigabitEthernet 0/0
! R1 g0/0 faces LAN A (switch S1)
R1(config-if)# ip address 192.168.1.1 255.255.255.0
R1(config-if)# no shutdown
R1(config-if)# interface gigabitEthernet 0/1
! R1 g0/1 faces R2 on the /30 link
R1(config-if)# ip address 10.0.0.1 255.255.255.252
R1(config-if)# no shutdown
R1(config-if)# end
R1#

Notice the exact syntax of the interface address: ip address <ip> <mask>. The mask comes after the address, and it is the dotted-decimal subnet mask, not a prefix length. Omit the mask (or typo it to 255.255.255.0 on the /30) and your router will compute the wrong network.

Step 5 — Configure R2

Router> enable
Router# configure terminal
Router(config)# hostname R2
R2(config)# interface gigabitEthernet 0/0
! R2 g0/0 faces LAN B (switch S2)
R2(config-if)# ip address 192.168.2.1 255.255.255.0
R2(config-if)# no shutdown
R2(config-if)# interface gigabitEthernet 0/1
! R2 g0/1 faces R1 on the /30 link
R2(config-if)# ip address 10.0.0.2 255.255.255.252
R2(config-if)# no shutdown
R2(config-if)# end
R2#

Verify that both interfaces are up/up:

R2# show ip interface brief
Interface              IP-Address      OK? Method Status                Protocol
GigabitEthernet0/0     192.168.2.1     YES manual up                    up
GigabitEthernet0/1     10.0.0.2        YES manual up                    up
Exam tip. The first word is the line protocol status, the second is the data-link / operational status. You want up / up. administratively down means the interface still contains shutdown; up / down (protocol down) usually means a layer-2 problem such as the wrong cable, no DCE clock, or the far end being down.

Step 6 — Test the inter-router link

Each router now knows its directly connected networks: R1 knows 192.168.1.0/24 and 10.0.0.0/30; R2 knows 10.0.0.0/30 and 192.168.2.0/24. Since both directly connect to the 10.0.0.0/30 link, they can ping each other right now — no static routes needed for this hop:

R1# ping 10.0.0.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.0.0.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/5 ms

The five exclamation marks mean five successful replies. (A . is a timeout, a U is an ICMP port/host unreachable message.) But now try to reach the far LAN:

R1# ping 192.168.2.10
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.2.10, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
Why it fails. R1 has no route to 192.168.2.0/24. Its routing table contains only 192.168.1.0/24 and 10.0.0.0/30. When a router has no route for a destination, it drops the packet. This is the entire point of the lab: the link works, but the path does not yet exist.

Step 7 — Add a static route on R1

Teach R1 how to reach LAN B. In global configuration mode, the full command is:

R1(config)# ip route 192.168.2.0 255.255.255.0 10.0.0.2

Break the syntax down:

Exam tip. The exam pattern to memorise: “PC-A in 192.168.1.0/24 must reach PC-B in 192.168.2.0/24 through R1; which static route must R1 have?” Answer: ip route 192.168.2.0 255.255.255.0 10.0.0.2. The first two arguments are the far network + far mask, and the next hop is the directly connected neighbour on the path to it. You never write the far host’s address as the network argument — that gives you a route to a single host, not to its subnet.

Step 8 — Add a static route on R2

Routing is bidirectional and hop-by-hop. Even with R1’s route installed, replies from PC-B back to PC-A would be dropped at R2, because R2 has no route back to 192.168.1.0/24. Mirror the configuration on R2:

R2(config)# ip route 192.168.1.0 255.255.255.0 10.0.0.1
R2(config)# end

Two rules to remember:

Step 9 — Verify the routing tables

On each router, examine the table. R1:

R1# show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP

Gateway of last resort is not set

     10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C       10.0.0.0/30 is directly connected, GigabitEthernet0/1
L       10.0.0.1/32 is directly connected, GigabitEthernet0/1
     192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks
C       192.168.1.0/24 is directly connected, GigabitEthernet0/0
L       192.168.1.1/32 is directly connected, GigabitEthernet0/0
S       192.168.2.0/24 [1/0] via 10.0.0.2

And R2:

R2# show ip route
Gateway of last resort is not set

     10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C       10.0.0.0/30 is directly connected, GigabitEthernet0/1
L       10.0.0.2/32 is directly connected, GigabitEthernet0/1
     192.168.2.0/24 is variably subnetted, 2 subnets, 2 masks
C       192.168.2.0/24 is directly connected, GigabitEthernet0/0
L       192.168.2.1/32 is directly connected, GigabitEthernet0/0
S       192.168.1.0/24 [1/0] via 10.0.0.1
Read the static route line — S 192.168.2.0/24 [1/0] via 10.0.0.2: S = static. [1/0] = administrative distance 1, metric 0 (static routes win over every dynamic protocol, whose default AD is higher). via 10.0.0.2 = the next hop. Conversely a directly connected route is C with AD 0, and L marks the router’s own interface address (a local host route).

Step 10 — Ping across the network

Re-test from R1 first, then from the PC that really matters — PC-A:

R1# ping 192.168.2.10
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.2.10, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/5 ms

! now from the PC (the real end-to-end test)
C:\> ping 192.168.2.10
Pinging 192.168.2.10 with 32 bytes of data:
Reply from 192.168.2.10: bytes=32 time=1ms TTL=126
Reply from 192.168.2.10: bytes=32 time=1ms TTL=126
Reply from 192.168.2.10: bytes=32 time=1ms TTL=126
Reply from 192.168.2.10: bytes=32 time=2ms TTL=126
Ping statistics for 192.168.2.10:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Trace the path. PC-A frames go to S1, which forwards to R1. R1 encapsulates them, looks up 192.168.2.0/24, finds it via 10.0.0.2, and forwards on the /30 link. R2 receives, looks up 192.168.1.0/24 via 10.0.0.1 for the reply, and S2 delivers to PC-B. The TTL 126 is the PC’s initial TTL of 128 minus two router hops — a handy way to confirm how many L3 devices the packet crossed.

Step 11 — Add a default route on R1

Sometimes you do not know (or do not want to list) every destination beyond your neighbour. A default route — written as network 0.0.0.0 mask 0.0.0.0 — is the catch-all: any packet whose destination matches no other route is sent to the next hop you specify. In this topology the echo of “everything else” is R2, so on R1:

R1(config)# ip route 0.0.0.0 0.0.0.0 10.0.0.2
R1(config)# end

Now the top of R1’s routing table changes. The asterisk in S* marks the candidate default route:

R1# show ip route
... (codes table omitted) ...

Gateway of last resort is 10.0.0.2 to network 0.0.0.0

S*   0.0.0.0/0 [1/0] via 10.0.0.2
     10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C       10.0.0.0/30 is directly connected, GigabitEthernet0/1
L       10.0.0.1/32 is directly connected, GigabitEthernet0/1
     192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks
C       192.168.1.0/24 is directly connected, GigabitEthernet0/0
L       192.168.1.1/32 is directly connected, GigabitEthernet0/0
S       192.168.2.0/24 [1/0] via 10.0.0.2
How the default route coexists. Look closely — the default route does not break the specific route. The router always picks the longest prefix match: 192.168.2.0/24 is more specific than 0.0.0.0/0, so traffic to LAN B still uses the /24 route while traffic to anything else falls to the default. This is why a default route is the classic trick for numbering one last upstream link toward an ISP or a head office. To remove a static or default route, prefix the command with no (e.g. no ip route 0.0.0.0 0.0.0.0 10.0.0.2).
Part 4

Verify: what good looks like

When the lab is complete you should see all of the following. Use the checkboxes as your own pass sheet.

Lab checklist · tick each item as you confirm it

CheckCommandWhat you should see
Interfaces are upshow ip interface briefup in both the Status and Protocol columns for every configured interface.
Connected routes existshow ip routeA C line for 10.0.0.0/30 and for each LAN, plus an L line for each interface address.
Static routes existshow ip routeS 192.168.2.0/24 [1/0] via 10.0.0.2 on R1, and the mirror image on R2.
Inter-router hop worksping 10.0.0.2Five exclamation marks and a 100% success rate.
End-to-end worksping 192.168.2.10 from PC-AReplies from 192.168.2.10 with TTL 126 (128 minus two router hops).
Default route installedshow ip route“Gateway of last resort is 10.0.0.2” and an S* line for 0.0.0.0/0.
Part 5

Troubleshooting guide

When end-to-end connectivity fails, isolate the failure — work hop by hop from the source, always asking “where is the last place that worked?” Start with the PC’s ping to its own default gateway, then to the far router’s interface, then to the far PC.

Symptom → likely cause · select the symptom

SymptomProbable causeFix
PC-A cannot ping its default gateway 192.168.1.1Wrong IP/mask/gateway on the PC, bad cable, or R1 g0/0 is down (not configured / still shutdown).Run ipconfig and check the settings; ping 192.168.1.10 from R1; on R1 run show ip interface brief and add no shutdown.
R1 cannot ping R2 (10.0.0.2)Interface down, wrong mask on the /30, wrong cable type, or missing DCE clock on a serial link.show ip interface brief — want up/up; verify both masks are 255.255.255.252; use cross-over/fibre/serial and set clock rate on the DCE.
R1 can ping R2, but not PC-B (192.168.2.10)No route to 192.168.2.0/24 in R1’s table.show ip route; add ip route 192.168.2.0 255.255.255.0 10.0.0.2 on R1.
PC-A can ping R1 but not PC-BMissing static route on R1, missing return route on R2, or a host firewall blocking ICMP on PC-B.Verify both routes with show ip route on R1 and R2; check the reply path; temporarily disable the firewall and re-test.
“Destination host unreachable” from R1R1 has no route at all for the destination network — the packet is dropped locally.show ip route; add the specific static route or a default route pointing to 10.0.0.2.
Interface stuck administratively downThe interface still contains the default shutdown.Enter the interface and type no shutdown.
Link up / down (protocol down)Layer-2 problem: wrong cable between routers, far end shut, or no clock rate on serial DCE.Fix the cable (cross-over / fibre / serial), check the far end, add clock rate 128000 on the DCE side.
PC-Firewall silence: pings from the router work, pings from the PC time outPC-B’s firewall drops ICMP echo requests from other subnets.Verify the PC’s default gateway is correct; allow ICMP or disable the firewall for the test; re-enable it afterwards.
Safety note. If you disable a host firewall to test, remember to re-enable it. Disabling security features to “make the lab pass” and leaving them off is a real-world security failure — and the kind of thing a security-focused exam wants you to notice.

Key terms

TermMeaning
Static routeA route entered by hand with ip route <network> <mask> <next-hop>; administrative distance 1.
Default routeThe catch-all route 0.0.0.0 0.0.0.0 <next-hop> used when no more specific route matches; the gateway of last resort.
Next hopThe directly connected neighbour to which a router forwards packets for a given destination.
Administrative distance (AD)The trust value of a route source; lower wins. Connected = 0, static = 1.
Longest prefix matchThe lookup rule: the most specific matching route (longest mask) is used.
no shutdownThe IOS command that brings an interface administratively up and clears “administratively down”.
Clock rateThe clocking command placed on the DCE end of a serial link to drive the line.
Part 6 · Your turn

Review

Check what you have learned with these review questions.

Review · 6 questions

Sources

Sources & references

  1. Cisco. CCNA (200-301) Exam Topics, Domain 3.0 IP Connectivity (static and default routes). cisco.com.
  2. Cisco. IP Routing Configuration Guide / IP Routing Command Reference, including the ip route command. cisco.com guides.
  3. Socolofsky, T. & Kale, C. RFC 1180: A TCP/IP Tutorial (1991), routing sections. rfc-editor.org/rfc/rfc1180.
  4. Rekhter, Y. et al. RFC 1918: Address Allocation for Private Internets (1996). rfc-editor.org/rfc/rfc1918.

Target exams: CCNA 200-301 v1.1 · CyberOps Associate 200-201. Last content verification: 2026-10-11.