Cisco CCNA Static Routes: Configuration and Verification
Learn how IPv4 static routes work, configure Cisco IOS next-hop and exit-interface routes, and verify remote connectivity with show ip route and ping.
A static route is a route installed manually through router configuration. It gives a router reachability to a remote network—a destination network that is not attached directly to the local router.
Static routing is useful in small, predictable networks and in situations where an administrator needs precise control over the path. The tradeoff is administrative effort: every relevant router must be configured manually, and topology changes require manual updates.
How a Router Uses a Static Route
A router forwards a packet only when its routing table contains a route that matches the packet's destination IP address. A routing-table entry identifies a destination network, its subnet mask or prefix length, and where to send matching traffic.
A directly connected route is created when an active router interface has an address in that network. A static route is different: it is manually configured to describe a network that is reachable through another router or a selected local interface.
- Destination network: the network prefix the route should reach.
- Subnet mask: the IPv4 mask that defines the destination prefix.
- Next hop: the neighboring router address that receives the first forwarding step toward the destination.
- Exit interface: the local outbound interface through which traffic leaves the router.
When a next-hop address is used, that address must be reachable through a directly connected network. In the example below, R1 can use R2's address on the transit link because 172.16.0.0/24 is directly connected to R1.
Example Two-Router Topology
R1 and R2 are joined through the 172.16.0.0/24 transit network. The 10.0.0.0/24 LAN is attached to R1, and the 192.168.0.0/24 LAN is attached to R2.
| Device | Interface or network | IPv4 address or prefix | Purpose |
|---|---|---|---|
| R1 | Local LAN | 10.0.0.0/24 | Network directly connected to R1 |
| R1 and R2 | Transit link | 172.16.0.0/24 | Network used to reach the neighboring router |
| R2 | Transit-facing address | 172.16.0.2 | R1's next hop toward the R2 LAN |
| R2 | Remote LAN | 192.168.0.0/24 | Destination network that R1 must learn manually |
Initially, R1 knows about its own 10.0.0.0/24 LAN and the 172.16.0.0/24 transit network because those networks are directly connected. R1 does not yet know how to reach 192.168.0.0/24.
Cisco IOS Static-Route Syntax
In Cisco IOS, enter the route from global configuration mode. The standard next-hop form is:
ip route destination-network subnet-mask next-hop-address| Component | Example value | Meaning |
|---|---|---|
| Destination network | 192.168.0.0 | Remote IPv4 network to be reached |
| Subnet mask | 255.255.255.0 | Mask defining the /24 destination prefix |
| Next-hop address | 172.16.0.2 | Neighboring router that receives the first hop of the traffic |
| Exit interface | FastEthernet0/1 | Local interface used to send traffic toward the destination |
For the example, configure R1 with R2's transit address as the next hop:
R1> enable
R1# configure terminal
R1(config)# ip route 192.168.0.0 255.255.255.0 172.16.0.2The command tells R1: “For destinations in 192.168.0.0/24, forward the packet to 172.16.0.2.” The next hop is not the final host; it is the neighboring router that performs the next forwarding decision.
Interface-Based Form
IOS also supports a form that specifies the local exit interface instead of a next-hop IP address:
R1(config)# ip route 192.168.0.0 255.255.255.0 FastEthernet0/1Here, FastEthernet0/1 is the outbound interface on R1 that leads toward R2. This is not R2's interface name; it is the interface on the router where the command is configured. Use the interface that actually connects R1 toward the neighboring router.
The next-hop and exit-interface commands describe equivalent reachability for this topology. In a practice configuration, use the form appropriate to the platform and topology rather than adding duplicate routes without a reason.
Before and After the Static Route
| State | Routes known by R1 | Result when sending to 192.168.0.0/24 |
|---|---|---|
| Before configuration | Connected routes for 10.0.0.0/24 and 172.16.0.0/24; no route for 192.168.0.0/24 | Fails because R1 has no matching route |
| After next-hop static route configuration | Connected routes plus 192.168.0.0/24 via 172.16.0.2 | R1 forwards matching packets to R2 |
| After exit-interface static route configuration | Connected routes plus 192.168.0.0/24 out FastEthernet0/1 | R1 sends matching packets through the selected interface |
Verify the Route and Connectivity
Inspect the Routing Table
Use show ip route to display R1's routing table:
R1# show ip routeConnected routes are commonly marked with C, while a static route is marked with S. After the next-hop route is installed, look for an entry conceptually similar to:
S 192.168.0.0/24 [1/0] via 172.16.0.2The entry identifies 192.168.0.0/24 as the destination and 172.16.0.2 as the next hop. The bracketed values commonly show administrative distance and metric; the important observation here is that the route is static and points toward R2.
To inspect only the relevant destination, use:
R1# show ip route 192.168.0.0Test with Ping
Before configuring the route, ping a known host in the R2 LAN from R1:
R1# ping <host-address-in-192.168.0.0/24>The test should fail in this scenario because R1 has no route matching 192.168.0.0/24. After adding the static route, repeat the ping. R1 should select the static route, send the packet to 172.16.0.2, and allow R2 to forward it into the remote LAN.
A successful end-to-end ping assumes that the destination host is operating, its IP settings are correct, and a return path exists. The reply must be able to travel from the R2 LAN back toward the source network on R1.
Troubleshooting Static Routes
No Route Before Configuration
Symptom: A ping from R1 to a host in 192.168.0.0/24 fails before a static route is configured.
- Run
show ip routeon R1. - Confirm that 10.0.0.0/24 and 172.16.0.0/24 are present as connected networks.
- Confirm that 192.168.0.0/24 is absent.
Add a route through 172.16.0.2 or use R1's correct outbound interface.
Next Hop Is Incorrect or Unreachable
Symptom: The route appears in the configuration, but traffic does not reach the remote network.
- Verify that 172.16.0.2 is the correct R2 address on the transit network.
- Check interface addresses and operational status on the R1-to-R2 connection.
- Ping the next hop from R1.
Correct the next-hop address or select the interface that actually leads toward R2. A configured next hop must be reachable through a directly connected network.
Destination or Mask Does Not Match
Symptom: The route does not apply to the intended destination.
- Compare the configured destination and mask with the actual remote LAN prefix.
- Review the installed entry with
show ip route.
Remove or replace the incorrect route with the correct destination network and subnet mask.
Forward Path Works but Ping Still Fails
Symptom: Traffic reaches R2, but the end-to-end ping does not succeed.
The static route on R1 supplies only the forward path. Check the remote host's default gateway, R2's route back toward 10.0.0.0/24, and the status of each link. Test progressively: first the R1-to-R2 next hop, then a remote R2 interface or host, and finally the complete path.
Static Routing Tradeoffs
- Advantages: simple behavior, predictable paths, no routing-protocol messages, and precise administrator control.
- Limitations: each route must be configured manually, every affected router must be updated, and failures or topology changes are not automatically discovered.
- Scalability concern: as the number of routers and networks grows, maintaining all static entries becomes time-consuming and error-prone.
Related CCNA Topics
Static routes build on IPv4 addressing, directly connected networks, and Cisco IOS command modes. For broader routing concepts, review Computer Network Explained and Configure OSPF. For VLAN-based designs that often require inter-network routing, see Configure Router on a Stick.