CCNA 200-301Chapter 172 of 260Objective 3.2

Lab: Configure Static Routes

Static routes are the foundation of IP routing — you define them manually, telling the router exactly where to send packets for specific destination networks. On the CCNA 200-301 exam (objective 3.2), you must be able to configure, verify, and troubleshoot static routes, including default routes and floating static routes. In real networks, static routes are essential for small networks, stub networks, and as backup paths when dynamic routing is not desirable or possible.

25 min read
Beginner
Updated May 31, 2026

The Mailroom Sorting Table

Imagine you run the mailroom for a large office building. You have a giant sorting table with bins labeled for each floor (subnet). When a letter arrives (a packet), you look at the destination floor number (destination IP address). You have a list (routing table) that tells you which bin to put each letter into. Most of the time, you use a dynamic system: employees from each floor come by and update the list based on where they've seen letters go before (dynamic routing). But for some floors — like the basement IT server room — you know the path is fixed. So you write a permanent note: 'All letters for Floor B2 go into Bin 7.' That's a static route. You also have a special rule: if a letter's floor isn't on your list at all, you put it into a 'General Delivery' bin (default route) that goes to the central post office (next-hop router). Static routes are simple, predictable, and don't change unless you change them. But if the bin for Floor B2 is moved to a different shelf (link failure), your static note is wrong — letters get lost. That's why you might add a backup note with a higher preference number (administrative distance) that only kicks in if the first bin is unreachable (floating static route).

How It Actually Works

What Is a Static Route?

A static route is a manually configured entry in a router's routing table that tells the router how to reach a specific destination network. Unlike dynamic routes learned via routing protocols (OSPF, EIGRP), static routes do not change unless an administrator modifies them. They are defined by the destination network address, subnet mask, and either a next-hop IP address or an exit interface.

Why Use Static Routes?

Static routes are used for several reasons: - Simplicity: In small networks with few paths, static routes are easy to configure and troubleshoot. - Security: No routing protocol advertisements mean less exposure to routing attacks. - Stub Networks: Networks with only one path to the outside world (e.g., a branch office connected to HQ) are ideal for a default static route. - Backup Paths: A floating static route with a higher administrative distance provides a backup when the primary dynamic route fails. - Control: Network engineers have precise control over traffic paths.

How Static Routes Work at the Packet Level

When a router receives an IP packet, it performs the following steps: 1. Examine Destination IP: The router looks at the destination IP address in the packet header. 2. Longest Prefix Match: The router searches its routing table for the route with the longest match (most specific subnet mask) that includes the destination IP. 3. Determine Next Hop: If a matching static route is found, the router determines the next-hop IP address or exit interface. 4. ARP Resolution: If the next hop is on a directly connected network, the router performs an ARP request to find the next-hop MAC address. 5. Layer 2 Encapsulation: The router encapsulates the IP packet in a frame with the destination MAC address of the next hop and forwards it out the appropriate interface.

Static Route Configuration Syntax

On Cisco IOS, the global configuration command for a static route is:

ip route <destination-network> <subnet-mask> {next-hop-ip | exit-interface} [administrative-distance] [permanent]

destination-network: The destination network IP address.

subnet-mask: The subnet mask for the destination network.

next-hop-ip: The IP address of the next-hop router.

exit-interface: The local interface to use (e.g., GigabitEthernet0/0).

administrative-distance: Optional. Default is 1 for static routes. Use a higher value (e.g., 5, 10) to create a floating static route.

permanent: Optional. Keeps the route in the routing table even if the interface goes down.

Example Configuration

Consider a router R1 with two interfaces: GigabitEthernet0/0 (192.168.1.1/24) connected to a LAN, and Serial0/0/0 (10.0.0.1/30) connected to an ISP. We want to send all traffic to the 10.0.0.0/30 network as a static route, and a default route to the ISP.

R1(config)# ip route 10.0.0.0 255.255.255.252 10.0.0.2
R1(config)# ip route 0.0.0.0 0.0.0.0 10.0.0.2

Verification Commands

show ip route: Displays the routing table. Look for lines starting with 'S' for static routes.

show ip route static: Shows only static routes.

ping and traceroute: Test connectivity.

Example output:

R1# 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
       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

Gateway of last resort is 10.0.0.2 to network 0.0.0.0

S    10.0.0.0/30 [1/0] via 10.0.0.2
S*   0.0.0.0/0 [1/0] via 10.0.0.2
C    192.168.1.0/24 is directly connected, GigabitEthernet0/0
L    192.168.1.1/32 is directly connected, GigabitEthernet0/0

Administrative Distance and Floating Static Routes

Administrative distance (AD) is a measure of route trustworthiness. Lower AD values are preferred. Default ADs:

Connected: 0

Static: 1

EIGRP: 90

OSPF: 110

RIP: 120

A floating static route is a static route configured with a higher AD than the primary dynamic route. It only appears in the routing table when the dynamic route is removed (e.g., due to a link failure). For example, to create a backup static route for a network learned via OSPF (AD 110), configure:

ip route 10.1.1.0 255.255.255.0 192.168.2.1 120

This route will only be used if OSPF fails to provide a route to 10.1.1.0/24.

Default Route

A default route (0.0.0.0/0) matches any destination IP address. It is often used as a gateway of last resort. Configure:

ip route 0.0.0.0 0.0.0.0 <next-hop>

Static Route with Exit Interface vs Next-Hop IP

Exit interface: The router performs ARP for the destination IP itself. Useful for point-to-point links (e.g., serial). Example: ip route 10.0.0.0 255.255.255.0 Serial0/0/0

Next-hop IP: The router performs ARP for the next-hop IP. Required for multi-access networks (e.g., Ethernet). Example: ip route 10.0.0.0 255.255.255.0 192.168.1.1

Troubleshooting Static Routes

Common issues: - Incorrect next-hop IP: The next-hop router is not reachable. - Missing return route: The destination network has no route back to the source. - Wrong subnet mask: The route does not match the intended destination. - Administrative distance conflict: A dynamic route with lower AD overrides the static route.

Use show ip route and ping to isolate problems. Also check show ip interface brief and show cdp neighbors for connectivity.

Walk-Through

1

Plan the static route

Before configuring, determine the destination network, subnet mask, and next-hop IP address or exit interface. For example, if you want to reach network 10.1.1.0/24 via a router at 192.168.1.2, note these values. Also decide if you need a floating static route (backup) and set the administrative distance accordingly. Planning avoids errors like wrong subnet masks or unreachable next hops.

2

Enter global configuration mode

Access the router's CLI and enter privileged EXEC mode with `enable`. Then enter global configuration mode with `configure terminal`. This is the standard starting point for any configuration task. Example: ``` Router> enable Router# configure terminal Enter configuration commands, one per line. End with CNTL/Z. Router(config)# ```

3

Configure the static route

Use the `ip route` command with the destination network, subnet mask, and next-hop or exit interface. For a standard static route to 10.1.1.0/24 via 192.168.1.2: ``` Router(config)# ip route 10.1.1.0 255.255.255.0 192.168.1.2 ``` For a default route: ``` Router(config)# ip route 0.0.0.0 0.0.0.0 192.168.1.2 ``` For a floating static route (backup) with AD 120: ``` Router(config)# ip route 10.1.1.0 255.255.255.0 192.168.1.3 120 ```

4

Verify the static route in the routing table

Exit configuration mode with `end` and use `show ip route` to confirm the route is present. Look for a line starting with 'S'. Example output: ``` Router# show ip route Codes: ... S 10.1.1.0/24 [1/0] via 192.168.1.2 ``` The [1/0] indicates administrative distance 1 and metric 0. For a floating static route, you will only see it if the primary route is absent.

5

Test connectivity with ping

From the router, ping a host in the destination network to verify end-to-end reachability. Use extended ping to specify source interface if needed. Example: ``` Router# ping 10.1.1.10 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 10.1.1.10, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5) ``` If pings fail, check the return path from the destination network back to the source.

6

Troubleshoot using traceroute

If ping fails, use `traceroute` to see where packets stop. This helps identify the hop where the route is missing or misconfigured. Example: ``` Router# traceroute 10.1.1.10 Type escape sequence to abort. Tracing the route to 10.1.1.10 1 192.168.1.2 4 msec 4 msec 4 msec 2 10.1.1.1 4 msec 4 msec 4 msec 3 10.1.1.10 4 msec 4 msec 4 msec ``` If a hop is missing or shows '* * *', that router likely lacks a return route.

7

Document and save the configuration

After successful testing, save the running configuration to startup-configuration with `copy running-config startup-config` or `write memory`. This ensures the static route survives a reload. Example: ``` Router# copy running-config startup-config Destination filename [startup-config]? Building configuration... [OK] ```

What This Looks Like on the Job

In enterprise networks, static routes are commonly used in three scenarios:

1. Stub Network Connectivity: A branch office with a single WAN link to headquarters. The branch router has a default static route pointing to the HQ router. This is simple and efficient — no dynamic routing protocol overhead. For example, a retail store with one internet connection: the router has a default route to the ISP. Configuration: ip route 0.0.0.0 0.0.0.0 203.0.113.1. If the link fails, the branch loses connectivity until the link is restored or a backup is configured.

2. Backup Path (Floating Static Route): An organization uses OSPF between sites but wants a backup via a secondary link (e.g., a slower DSL line). A floating static route with AD 120 is configured for the remote networks via the DSL router. When OSPF fails, the static route appears. This provides redundancy without the complexity of running a second routing protocol. For example: ip route 10.10.0.0 255.255.0.0 192.168.100.1 120. The AD 120 is higher than OSPF's 110, so it only activates when OSPF routes disappear.

3. Traffic Engineering: A network engineer wants specific traffic (e.g., backup traffic) to go over a dedicated link. They configure a static route for that destination network via the dedicated link, overriding the dynamic route. This is common in MPLS VPN environments where static routes are used for specific customer prefixes. However, care must be taken to ensure the static route does not create a routing loop.

Misconfiguration Consequences: A misconfigured static route can cause black holes (packets dropped) or routing loops. For example, if you configure a static route pointing to a next-hop that is not reachable, packets are discarded. If you create a route that points back to the same router (via a wrong next-hop), you get a loop until TTL expires. Always verify with show ip route and ping.

How CCNA 200-301 Actually Tests This

Exam objective 3.2 specifically requires you to 'Configure, verify, and troubleshoot static routes.' The exam tests your ability to:

Write the correct ip route command syntax.

Identify administrative distance values (default 1 for static).

Understand the difference between next-hop and exit interface.

Recognize when a floating static route is needed (higher AD).

Interpret show ip route output to find static routes.

Common Wrong Answers and Traps: 1. Using the wrong subnet mask: Candidates often use a /24 mask when the actual network is /16. Always match the exact subnet mask of the destination network. 2. Forgetting the return route: A common mistake is configuring a static route on R1 but not on R2 for the return traffic. The exam may show a scenario where pings fail because only one direction has a route. 3. Confusing administrative distance with metric: Static routes have an AD of 1, not a metric. The metric is always 0 for static routes. The exam might ask which route is preferred when multiple routes exist; the answer is the one with lowest AD. 4. Using exit interface on Ethernet without next-hop: On multi-access networks, using only the exit interface (e.g., ip route 10.0.0.0 255.0.0.0 GigabitEthernet0/0) causes the router to ARP for every destination IP, which is inefficient and may fail. The correct method is to specify the next-hop IP.

Exam Tip: When you see a question about static routes, first identify the destination network and subnet mask. Then check if the next-hop is directly connected. If the question involves backup, look for a higher AD. Always verify with show ip route output provided in the question.

Key Takeaways

Static route command: ip route <network> <mask> {next-hop | interface} [AD] [permanent]

Default administrative distance for static routes is 1.

Floating static routes use an AD higher than the primary dynamic route's AD (e.g., 120 vs OSPF's 110).

Default route uses 0.0.0.0/0 as the destination.

Use show ip route to verify static routes; look for 'S' in the code.

On multi-access networks (Ethernet), always specify the next-hop IP, not just the exit interface.

A missing return route is the most common cause of one-way ping failure.

Easy to Mix Up

These come up on the exam all the time. Here's how to tell them apart.

Static Route

Manually configured by administrator.

No routing protocol overhead.

Does not adapt to topology changes.

Default AD of 1.

Best for small, stable networks.

Dynamic Route (OSPF)

Learned automatically via OSPF.

Requires CPU and bandwidth for hello packets and LSAs.

Adapts to link failures automatically.

Default AD of 110.

Best for large, redundant networks.

Watch Out for These

Mistake

A static route with an exit interface does not need a next-hop IP.

Correct

On point-to-point interfaces (e.g., serial), using an exit interface alone is fine. On multi-access (Ethernet), you must specify a next-hop IP to avoid ARP flooding.

Candidates often see examples on serial links and assume the same works on Ethernet.

Mistake

The metric in a static route is the administrative distance.

Correct

Administrative distance (AD) and metric are different. Static routes have an AD of 1 and a metric of 0. AD is trustworthiness; metric is cost.

Both are numbers in the routing table, leading to confusion.

Mistake

A floating static route always appears in the routing table.

Correct

A floating static route only appears when the primary route (with lower AD) is removed from the routing table.

The word 'floating' suggests it is always there, but it is actually a backup.

Mistake

You can configure a static route to a network that is not directly connected.

Correct

The destination network can be any network, but the next-hop must be directly connected (reachable via a directly connected interface).

Candidates think the destination must be directly connected, but that is not true.

Do You Actually Know This?

Reveal each answer, then mark whether you got it right. Score 60%+ to unlock the next chapter.

Frequently Asked Questions

What is the difference between a static route and a default route?

A static route is a manually configured route to a specific network (e.g., 10.1.1.0/24). A default route (0.0.0.0/0) matches any destination IP that does not have a more specific match in the routing table. It acts as a gateway of last resort. Both are configured with the `ip route` command. On the exam, know that a default route is a special type of static route. Tip: If a router has no default route and a packet's destination is not in the routing table, the packet is dropped.

How do I configure a floating static route?

A floating static route is a static route with an administrative distance higher than the primary dynamic route. For example, if OSPF has AD 110, configure `ip route 10.0.0.0 255.255.255.0 192.168.2.1 120`. This route will only appear in the routing table when the OSPF route is removed (e.g., link failure). The exam may ask you to identify the correct command for a backup route. Remember: the AD must be higher than the primary route's AD.

What does the 'S*' entry mean in the routing table?

The 'S*' indicates a candidate default route — a static route to 0.0.0.0/0. The asterisk (*) means it is a candidate for the default route. If multiple default routes exist, the one with the lowest AD is used. On the exam, you may see 'S*' and be asked what it represents. Answer: a static default route.

Can I use both next-hop and exit interface in a static route?

Yes, you can specify both, though it is not commonly done. The syntax is `ip route <network> <mask> <exit-interface> <next-hop>`. This is useful when you want to ensure the route uses a specific interface but also provides the next-hop IP for ARP resolution. On the exam, you might see this in a question about serial interfaces where both are given.

Why does my ping fail even though the static route is correctly configured?

Ping failures often occur due to missing return routes. The source router may have a route to the destination, but the destination router may not have a route back to the source. Check the routing table on both routers. Also ensure that any intermediate routers have appropriate routes. Use `traceroute` to identify where the packet stops. The exam loves this scenario.

What is the administrative distance of a static route?

The default administrative distance for a static route is 1. This is the lowest AD among routing protocols (except connected routes which have AD 0). This means a static route will always be preferred over dynamic routes (OSPF AD 110, EIGRP AD 90, RIP AD 120) unless you manually set a higher AD. On the exam, memorize these default ADs.

How do I remove a static route?

Use the `no ip route` command with the same parameters as the original configuration. For example, `no ip route 10.0.0.0 255.255.255.0 192.168.1.1`. You can also use `clear ip route *` to clear the routing table, but that does not remove the configuration. On the exam, know that `no ip route` is the correct way to delete a static route.

Terms Worth Knowing

Ready to put this to the test?

You've just covered Lab: Configure Static Routes — now see how well it sticks with free CCNA 200-301 practice questions. Full explanations included, no account needed.

Done with this chapter?