Courses3 levels
Level 1 · Foundations11 courses
Level 2 · Core5 courses
Level 3 · Advanced5 courses
Labs8 topics
Library Practice exams AI Range Pricing Start free

Practice library / Networking hands-on

Lab · Easy · 45 minutes

Static Routing Lab

Static route configuration, floating routes, and troubleshooting.

  • static-routing
  • floating-static-route
  • cisco-ios
  • packet-tracer
  • ccna
On this page 8 sections
  1. 1How Routing Works
  2. 2Lab Topology
  3. 3Next-Hop Static Route
  4. 4Exit-Interface Static Route
  5. 5Default Route
  6. 6Floating Static Route
  7. 7Verify & Troubleshoot
  8. ·Static Routing Cheat Sheet

Before you start

A router forwards each packet by finding the most specific match in its routing table. A static route is a line that an engineer types by hand — destination network, mask, and next-hop address or exit interface — and it stays fixed until someone removes it. In this lab, you configure next-hop routes, a default route and a floating backup on a two-router topology.

Lab Objectives

  • Understand how a router makes forwarding decisions
  • Configure static routes using next-hop IP and exit interface
  • Configure a default route (0.0.0.0/0) for internet traffic
  • Use floating static routes as a backup path
  • Verify and troubleshoot routing with show commands and ping

Static routes are manually configured routes. They tell the router exactly where to send packets. Unlike dynamic routing protocols (OSPF, EIGRP), static routes do not update automatically when the network changes. However, they are simple and fast, and they use no routing-protocol bandwidth.

Step 1: How Routing Works

# A router looks at the destination IP and finds the BEST match in its routing table
# "Best match" = most specific (longest prefix)

# Routing table example:
C  192.168.1.0/24 is directly connected, Gi0/0
S  10.0.0.0/8    [1/0] via 192.168.2.1
S* 0.0.0.0/0     [1/0] via 203.0.113.1    ← default route (matches everything)

# Packet to 10.5.6.7:
# Match 10.0.0.0/8 → send to 192.168.2.1

# Packet to 8.8.8.8 (Google DNS):
# No specific match → use default route → send to 203.0.113.1

# Administrative Distance (AD) — lower = more trusted:
# Connected  = 0   (most trusted)
# Static     = 1
# EIGRP      = 90
# OSPF       = 110
# RIP        = 120

Step 2: Lab Topology

PC1 (192.168.1.10)
  |
[Gi0/0] R1 [Gi0/1] ---10.0.12.0/30--- [Gi0/0] R2 [Gi0/1]
192.168.1.1                                         192.168.2.1
                                                        |
                                                    PC2 (192.168.2.10)

# Goal: PC1 should reach PC2 and vice versa
# R1 needs a route to 192.168.2.0/24
# R2 needs a route to 192.168.1.0/24

Step 3: Next-Hop Static Route

# Configure interfaces first
! R1
interface GigabitEthernet0/0
 ip address 192.168.1.1 255.255.255.0
 no shutdown
interface GigabitEthernet0/1
 ip address 10.0.12.1 255.255.255.252
 no shutdown

! R2
interface GigabitEthernet0/0
 ip address 10.0.12.2 255.255.255.252
 no shutdown
interface GigabitEthernet0/1
 ip address 192.168.2.1 255.255.255.0
 no shutdown

# Add static routes (next-hop method)
! R1: to reach 192.168.2.0/24, send to R2's IP
ip route 192.168.2.0 255.255.255.0 10.0.12.2

! R2: to reach 192.168.1.0/24, send to R1's IP
ip route 192.168.1.0 255.255.255.0 10.0.12.1

# Syntax: ip route NETWORK MASK NEXT-HOP

Step 4: Exit-Interface Static Route

# Alternative: specify outgoing interface instead of next-hop IP
ip route 192.168.2.0 255.255.255.0 GigabitEthernet0/1

# Or combine both (recommended on point-to-point links):
ip route 192.168.2.0 255.255.255.0 GigabitEthernet0/1 10.0.12.2

# Next-hop only = best practice on Ethernet (router must ARP)
# Exit-interface only = best practice on point-to-point (Serial links)

Step 5: Default Route

# Default route = "send all unknown traffic here"
# Used to reach the internet or upstream router
ip route 0.0.0.0 0.0.0.0 203.0.113.1   # ISP gateway

# Show in routing table as S*:
S*  0.0.0.0/0 [1/0] via 203.0.113.1

# Propagate default route to OSPF/EIGRP neighbours
router ospf 1
 default-information originate   # sends default route to OSPF peers

Step 6: Floating Static Route

# A backup static route that only activates when the primary goes down
# Give it a HIGHER AD than the primary

# Primary route via OSPF (AD 110) — auto-installed
# Backup static route — AD 200 (higher than OSPF, so not used unless OSPF fails)
ip route 192.168.2.0 255.255.255.0 10.0.99.1 200

# The "200" at the end is the Administrative Distance
# When OSPF route disappears, this static route (AD 200) takes over

# Common AD values for floating statics:
# Backup to OSPF (110)  → use 200
# Backup to EIGRP (90)  → use 100
# Backup to RIP (120)   → use 130

Step 7: Verify & Troubleshoot

# Show routing table
show ip route
show ip route static    # only static routes

# S = static, S* = default route
S    192.168.2.0/24 [1/0] via 10.0.12.2

# Test connectivity
ping 192.168.2.10
ping 192.168.2.10 source 192.168.1.1   # ping FROM a specific interface

# Trace the path
traceroute 192.168.2.10

# Common issues:
# No route → missing ip route command
# One-way ping → return route missing on other router
# Correct route present but ping fails → check interface is "up/up"
show ip interface brief   # verify all interfaces are up

Static Routing Cheat Sheet

CommandPurpose
ip route NET MASK NEXT-HOPNext-hop static route
ip route NET MASK EXIT-INTExit-interface static route
ip route 0.0.0.0 0.0.0.0 GATEWAYDefault route
ip route NET MASK NEXT-HOP ADFloating static (backup)
show ip routeFull routing table
show ip route staticOnly static routes
no ip route NET MASK NEXT-HOPRemove a route

Lab complete. Static routing is the starting point for learning network routing. Many CCNA exam scenarios depend on understanding what the routing table contains and why.

Sign in to track progress and send feedback.

Related

This lab is extra practice for the course Networking hands-on. Do the lessons first.Open the course