Static routing configuration is demonstrated on a Cisco router, showing how to resolve a connectivity failure caused by a missing return path to a remote network. Both IPv4 and IPv6 static routes are added and verified using common IOS show commands.
Configuring Static Routes
What I have set up here is, first of all, I've got a connection into router 1, because that's where we're going to have to make the configuration change. And I'm pinging router 1 with the demo laptop, so I'm pinging 10.240.0.2 and it's unsuccessful. I'm also pinging its IPv6 address.
This is not working because this computer right here has a default gateway. It can get out to the layer 3 switch. The layer 3 switch is aware of this directly connected network, so it can actually reach this. This ping, this ICMP packet, actually gets to router 1, but what happens is that router 1 doesn't know how to come back to the 10.1.10.0 network. And so what we need to do is, it's as simple as just adding a static route, and we add it on router 1, that says 10.1.10.0, you just need to go through this layer 3 switch.
So let's tell that router how to do that. I'm on router 1. What I'm first of all going to do is get into global configuration. Actually, before we do that, let's just take a look at the routing table. So I'm going to type in show ip route, and then we can see all of our different routes here.
And what it has here is the directly connected network and the interface itself. So we know that this is the interface itself because it's a dot two and it's a /32. So that is one interface that we have, that's the interface that's connected to the layer 3 switch. And then we have another one here that's configured, that's connected to the serial on the other side, the serial connection on the other side, and it looks like we actually have maybe a wrong configuration there, so we'll have to scope that out and maybe correct something there. And then we have finally our loopback address right here. So we've got a few configurations here.
So now what we're going to do is we are going to get into the global configuration mode, and I am going to type in, we'll do ip route is the command, and we want to reach the 10.1.10.0 network, so that's the network, 255.255.255.0, so /24. We give it the interface that it needs to go out, so I'm going to say FastEthernet, and it's FastEthernet 0 1 is the interface that leads to the layer 3 switch. And then we can give it also the IP address of the layer 3, 10.240.0.1 is the other side of that interface. So I'm going to hit enter on that, and look, right away it pops up, and my demo laptop immediately is getting replies back now.
And I can do the same thing with the IPv6 statement, so I'm just going to copy and paste this IPv6 route, and then it's the network that it's trying to reach, and the interface it's going out, and the IPv6 address on the other side. So I'm going to hit that, and that one is taking, oh, there it is right there. So pretty fast that it comes up.
And now I can do a show ip route, and I can see this static address in here, and it is going out the FastEthernet 0.
There's a couple other show commands that might be helpful. show ip route 10.1.10.0, we could hit that and see information on that, so yes, in fact we get some information around that. I could do, instead of the network, I could type in static and just see all the static routes that are associated with this router.
I could also do a show and then include the pipe, and then section, IP route, and then get whatever is going to be, all the IP routes will show there.
And then also I can do similar commands for IPv6. So I'm going to do show IP version 6 route, and I have then the IPv6 routing table. And or if I wanted to see a specific network, I could do the same thing and then type in fc00 colon, and I'm looking at the one colon colon slash 64. So we'll do that, and now I can see some stats on that.
So there you go, there's a static route, and what a static route can do to bring us up and communicating.
TechKnowSurge builds IT and cybersecurity professionals through hands-on, concept-first training built around real understanding — not memorization. Free interactive tools, structured programs, and 25+ years of real-world experience, all in one place.
Explore free tools and programs →