Understanding Static Routing: A Simple Guide for Beginners

When devices in a network need to communicate with others outside their local area, they need a way to know where to send the data. That’s where routing comes in. In this blog, we’ll focus on static routing, one of the most basic types of routing. Don't worry if you're not a tech expert, I'll walk you through what it is, how it works, and when it's used, all in a way that's easy to follow. Whether you're studying for a networking exam or just curious about how networks move data, this guide will help you get the basics down.
Alright, now that we have a basic idea of what static routing is, let’s talk about where it’s often used and that brings us to network topologies, especially WANs, or Wide Area Networks.
A WAN connects networks over long distances. Think of it like linking offices from different cities or countries. Unlike small networks at home or in a single office, WANs deal with more complex setups and longer paths for data to travel.
This is where static routing comes in. In smaller or less dynamic networks, like some WAN setups, you might not need routers to automatically figure out the best path. Instead, network admins can manually set those paths using static routes. It gives them full control over how data moves between locations.
So before we dig into how static routing works, let’s quickly look at what kind of network setups (topologies) we’re dealing with especially in WAN environments where static routes are often used.
The diagram above shows four routers connected to each other, forming a network. Two of these routers are also connected to switches and end devices which is PC1 and PC2. Each router belongs to a different network, and PC1 and PC2 are on opposite ends of this setup.
The goal here is to make a successful connection between PC1 and PC2. But since they’re on different networks and separated by multiple routers, they can’t communicate with each other unless each router knows how to forward the data in the right direction.
That’s where static routing becomes important. By default, a router only knows how to reach its directly connected networks. So if PC1 tries to send something to PC2, its router won’t know where to send the data unless we manually configure a route.
With static routing, we tell each router exactly where to send traffic for networks it’s not directly connected to. Once these routes are in place, the data from PC1 can travel across the routers and reach PC2 and vice versa.
Now that we’ve added static routes to make sure PC1 and PC2 can communicate, how do we check if those routes are actually working?
This is where the show ip route
command comes in. It’s one of the most useful commands you can run on a router’s CLI (Command Line Interface). When you type show ip route
, the router shows you its routing table. Basically a list of all the networks it knows about and how to reach them.
Here’s what you can expect to see in the output:
Directly connected networks – These are networks the router is physically connected to.
Static routes – These are routes that were manually added by you.
Route codes – Letters like “C” for connected, “S” for static, and others depending on what kind of routes are in use.
Next-hop IP addresses – This tells the router where to send the data next.
Exit interface – The router port it will use to forward the traffic.
Using this command helps you confirm if your static routes are set correctly. If the destination network isn’t listed in the routing table, the router won’t know how to reach it so this is a quick way to troubleshoot and make sure everything’s in place for PC1 and PC2 to talk to each other.
Sometimes, setting up static routes for every single network can be a bit much especially if there are a lot of different networks in the setup. That’s where a default route comes in handy.
A default route is like a “catch-all” path. If a router receives traffic for a network it doesn’t specifically know about, it will use the default route to forward that traffic. Think of it as saying, “If you don’t know where to go, send it this way.”
In a simple setup like the one in the diagram, you might use a default route on edge routers (those not connected to all other networks) to reduce the number of static routes you need to configure. Instead of telling the router where every possible network is, you just give it one direction to send all unknown traffic.
This is especially useful when there’s one main path out of the network, like a connection to the internet or a central router that knows about the other networks.
To configure a default static route on a router, you use the following command in global configuration mode:
ip route 0.0.0.0 0.0.0.0 [next-hop IP or exit interface]
Here’s what it means:
0.0.0.0 0.0.0.0
is a wildcard that matches any destination IP address.[next-hop IP]
is the IP address of the next router the traffic should be sent to.
OR
[exit interface]
is the router’s own interface that points in the direction of the next network.
Example using a next-hop IP:
Router(config)# ip route 0.0.0.0 0.0.0.0 192.168.1.1
This tells the router: “If you don’t know where a packet should go, send it to 192.168.1.1.”
Example using an exit interface:
Router(config)# ip route 0.0.0.0 0.0.0.0 GigabitEthernet0/0
This tells the router to forward unknown traffic out of a specific interface.
After setting this up, you can use the show ip route
command again, and you’ll see a route with an ‘S’* symbol, which means it’s a static default route.
Now that we’ve seen how default routes help in certain cases, let’s go back to the core command that makes static routing possible: ip route
.
This is the main command you’ll use to create static routes on a router. It tells the router exactly where to send traffic for a specific destination network.
Here’s the basic format:
ip route [destination network] [subnet mask] [next-hop IP or exit interface]
Let’s break that down:
Destination network – The network you want the router to reach (e.g.,
192.168.2.0
)Subnet mask – The subnet mask of that network (e.g.,
255.255.255.0
)Next-hop IP or exit interface – Where the router should send the traffic (e.g., the IP address of the next router)
This command is how we manually guide traffic from one router to another in our setup.
The image above shows a simple network setup with two PCs (PC1 and PC2), two switches (SW1 and SW2), and three routers (R1, R2, and R3). PC1 is connected to Switch SW1, which is linked to Router R1. On the other end, PC2 is connected to Switch SW2, which connects to Router R3. In between, the routers are connected in a straight line (R1 to R2, and R2 to R3).
Each router and connected device belongs to a different network. That means if PC1 wants to send data to PC2, the traffic needs to pass through multiple routers. But routers don’t automatically know where to send data unless we give them specific instructions.
That’s where the ip route
command comes in. It lets us manually set routes on each router, telling them how to reach networks that aren't directly connected. Without these static routes, the routers wouldn’t be able to forward the traffic correctly and the PCs wouldn’t be able to communicate.
Next, we’ll go over how to use the ip route
command on each router so that PC1 and PC2 can successfully exchange data across the network.
Let’s look at how the ip route
command is actually used in this setup.
First Image – R1 CLI: Routing to PC2
The first image shows R1’s CLI, where we use the ip route
command to tell R1 how to reach PC2’s network. Since PC2 is on the far end of the network connected to R3, R1 needs to forward traffic through R2 and then to R3.
The static route added here points to R2’s IP address as the next hop, so any data going to PC2 will be sent in the right direction.
Second Image – R3 CLI: Routing to PC1
The second image shows the same idea, but this time on R3’s CLI. We use the ip route
command on R3 to make sure it knows how to reach PC1’s network.
Since PC1 is connected to R1, R3 forwards traffic to PC1 through R2. So, we add a static route on R3 that points to R2’s IP address.
Third Image – R2 CLI: Routing to PC1 and PC2
Finally, the third image shows R2’s CLI, where two static routes are added; one to reach PC1’s network and another to reach PC2’s network.
Since R2 sits in the middle of the setup, it acts like a bridge between the two ends. These routes tell R2 to send traffic either to R1 (for PC1) or to R3 (for PC2), depending on where the destination is.
These three static route configurations make it possible for PC1 and PC2 to communicate by guiding the routers on how to forward the traffic across the network.
Wrapping It Up
In this blog, we looked at how static routing works in a simple network and how to use the ip route
command to make devices on different networks communicate. By setting static routes on each router, we manually told them how to reach networks they aren’t directly connected to.
We also saw real examples from the router CLI. R1 routing to PC2, R3 routing to PC1, and R2 routing to both. These static routes are what made it possible for PC1 and PC2 to send data back and forth successfully.
If you’re just starting out with networking, practicing static routing in Packet Tracer is a great way to understand how routers make forwarding decisions. It gives you more control and helps you learn how data moves across a network.
Thanks for reading! I’m not a professional, just someone learning networking and sharing what I’ve picked up along the way. If you found this helpful, feel free to check out my other posts and keep exploring. There's always more to learn!
Subscribe to my newsletter
Read articles from Pits directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
