Hi, and welcome to this CertificaitonKits CCNA Training Video on Routing with Static Routes. We are going to be talking about the IP route command, how we can manually enter routes into the routing table, the configuration of those static routes, verifying connectivity, default routing which a lot of times is used for connection to a service provider and then troubleshooting our static or default routes all from a CCNA perspective.
I am going to bring up a diagram of the network uploaded into the CCNA simulator. So we have got three routers, our A, B, and C and we have got a machine on each subnet. So basically this machine’s IP address that’s on the 22.214.171.124 subnet is 126.96.36.199. The Ethernet interface on each router is subnet address with 0.1 for the IP so it's 188.8.131.52, 184.108.40.206 and 220.127.116.11. So the routing tables, we are going to go and take a look at the routing tables right now. I have configured the IP addresses of 0.1s and 0.2s on the appropriate interfaces and turned the interfaces on so we are going to look at the default routing table, what shows up on the routing table by default, and then we are going to look at building that routing table so all of the machines can ping each other. Let me open up my CCNA simulator.
So again, in the NetMap Viewer I can see the CCNA simulator here. I have got Palaestra1, Palaestra2, Palaestra3 and one PC coming off of each one of those routers. So let’s take a look at this router right here, Palaestra1 and let’s look at what’s in that routing table. So if I go to router Palaestra1 and I do a show IP route, I can see that I have two directly connected routes in the routing table. C stands for directly connected. Now I see that I have 18.104.22.168 connected to the Serial0 interface and 22.214.171.124 connected to Ethernet0. There is nothing else in my routing table. So right now if the machine that’s on the 126.96.36.199 subnet tries to ping the machine that’s on the 16th subnet, this router would not know how to get it there. So I have to tell it how to get it there. And to do that, I can use the IP route command and say, hey, if you want to get to this subnet, you need to go out of this interface or send it to this next hop router.
Let’s take a look at the running configuration. I can see here that Serial0 has an IP of 188.8.131.52 and Ethernet0 has an IP of 184.108.40.206. What’s wrong with that picture? That is not a valid IP address. If it were on a non-simulated router, it would not allow you to put that IP address in there. 9+9, that’s much better. The IP address here is 220.127.116.11. Now this machine should be able to ping the next hop router of 18.104.22.168 and it can and it should be able to ping the machine of the Ethernet interface of 22.214.171.124. I cannot ping that machine so I am going to go in and verify connectivity real quick, then I will populate that routing table. I went to the Palaestra1 machine and I ping both of the routers’ interfaces so I am going to have to take the computer’s word for it that it has connectivity because the router’s acting little funny. Again, this is a simulator so not everything is going to be perfect. So what we want to do is we want to populate the routing tables in a way that the computer 126.96.36.199 machine can ping the 188.8.131.52 machine and the 184.108.40.206 machine. Since the routing tables are not populated, there is no connectivity between computers. So we have to go in and then populate these routing tables. Again, if I do a show IP route, I see that my router knows if it's two directly connected routes or two directly connected subnets but it does not know of the distance subnets.
Again, if we look at the Network Map, we have got the 0.16 subnet over here that PC2 is in and the 0.24 over here that PC3 is in as well as the 0.40 subnet that Palaestra1 does not know about that the two router interfaces are in. And I want to put that one in there as well so when I am testing for connectivity, I can see how far my pings reach. So let’s go in and configure Palaestra1 with one, two, three additional subnets into its routing table, and I do that with the IP route command. I type IP route and what I am specifying now is the destination subnet. We do a question mark, it says hey, what is the destination prefix or destination subnet address and it launches it in this format, dotted decimal. So I am going to say okay there is another subnet out there 220.127.116.11, then it’s going to ask me for the mask that goes along with that prefix and the mask is 255.248.0.0. That’s the subnet mask we are using.
Now this part right here it wants to know one of two things. I put a question mark there that says hey what interface does it need to go out of? So static right here, this is for ISDN dialer, what interface does it need to go out of, meaning serial interface do I need to go out to get there or what is the next hop router’s address. So I can either type in serial0 or I could type in the next hop IP address of 18.104.22.168. The only difference between the two is what’s called an administrative distance. If I put serial here, the router would look at that destination as a directly connected subnet or directly connected route. If I put in the next hop IP address, it gives it a cost of 1 as a static route. So it would be a cost of 1 versus a cost of 0. Most of the time, it won’t make a difference. I just want you to know that the router does assign a difference. So I am going to use the next hop router’s IP address which is 22.214.171.124. If I look at the NetworkMap, I am on router Palaestra1, I am saying hey to get to the 16th subnet over here, you need to send it to this IP address which is the router that’s directly connected to the 16th subnet. I hit Enter and I have a new static route in there.
I have to put a couple more in there and I can just bring up my previous command and I am going to say, hey to get to the 40 subnet, you are going to be sending it to the same next hop router. I have to specify a next hop IP address. I can't specify a router that is not directly connected. So he is going to be putting it to the same next hop router for each one of these. And the last subnet that we are going to connect to is 0.24 and even though 0.24 is off of this router, I am still sending everything to Palaestra2. It's up to Palaestra2 to get it on from that point. So if Palaestra2’s routing table is not populated, it's not going to help me any. So at this point, I have put in the three routes, show IP route and I can see that my routing table is completely populated, three static routes, here is my administrative distance of 0 instead of administrative distance and then it’s 0 here and no cost associated to these routes. So I have all five routes in the routing table here.
Router two however only has three routes in the routing table. So what that means is ping 126.96.36.199 from the router should work and why that works is because when I ping from here, I am sending it with the source IP address of 188.8.131.52 and I send it out. It's the machine. The machine sends back to 184.108.40.206 and as the destination 220.127.116.11 Palaestra2 looks in its routing table for the 99.32 subnet and it says, oh I know where 99.32 subnet is, so I will send it out of my Serial0 interface. However, when I try to ping 18.104.22.168 from PC1, I should not get a reply back and the reason I don’t get a reply back is because PC1 is on the 0.8 subnet. So it makes it all the way over here PC2 since the 0.8 hits this router. When the router looks for 0.8 in its routing table, let’s take a look at Palaestra2’s routing table, there is no 0.8 in there. So it can't send the ping response back or the echo reply back. But if I put that one route in there, IP route 22.214.171.124 Next Hop router of 126.96.36.199, show IP route, I just told Palaestra2 how to get to the 0.8 subnet, Palaestra1 router, and that’s where all the subnets are. So now from PC1, I should be able to ping 188.8.131.52. We will just see if the simulator agrees with me, and it does. So since I just put that one route in there now, that router Palaestra2 knows where the 0.8 is, it's able to get the response back.
So I am going to go in and populate all of the routing tables. So let’s go to Palaestra2, check out its routing table, show IP route. I just put in those four routes in there, the only one it doesn’t know where it's located is the 99.24 subnet. So in global mode again, I go IP route 184.108.40.206, 248.0.0 and the Next Hop router for this one is 220.127.116.11. So if I do a show IP route I can see that the routing table is populated, it’s missing one, show IP route, it’s missing that route I just put in there, there it goes, again the CCNA simulator not always going to be perfect, but does the job. So we have got 18.104.22.168 cost of one because it's a static route and it goes to this Next Hop route of 22.214.171.124. So again, looking my NetMap, it says hey, to get to the 24 subnet which is where PC3 is, send it to the Next Hop router Palaestra3 and the IP address is 126.96.36.199 right there.
So let’s go to Palaestra3 and populate that routing table. I do show IP route here, I already did one and I can see that there are only two routes and so I have to tell it where all the other routes are. And again, looking at that, Palaestra3 is going to send everything to the same Next Hop router Palaestra2. The center router here is the only one that has different potential Next Hop path. One router is Palaestra3 to get to the 24 subnet, Palaestra1 will get it to the 8 subnet. However for this router on the far side, everything needs to go to Palaestra2 because that’s the only Next Hop router. So the Next Hop will be the same on all the IP route commands. So IP route 188.8.131.52, 184.108.40.206 and since I can leave that the same, the subnet mask is the same with all of these, all I have to do is just edit that part of the command so it makes it real easy to fill in all the other destination routes and show IP route, everything is working. So as long as I put the right Next Hop router IPs, I should be able to ping from eStation3 to anywhere in the network, 220.127.116.11 so I can ping PC2 and I can ping PC1. So now that all the routing tables are populated, I can ping from here to anywhere in the network.
Let’s take a look at what’s called Default Routing. In this situation here, Palaestra2 is the only router that’s got more than one gateway, meaning more than one Next Hop router to go to Palaestra1 and Palaestra3, send all other destination traffic to the Palaestra2. So what I can do is instead of telling these routers where all these other subnets are, I mean there might be hundreds or you might be connected to a service provider, I can say hey, I don’t care where the traffic is going, if Palaestra1, if you get a packet from PC1 that wants to go somewhere, send it to Palaestra2. So I say all traffic that you get, send it over to Palaestra2. So anything PC1 sends out, I just tell a router I don’t care what it is, just send it on to this guy and that’s called a Default Route. So it's easy for me to go in and set that up. It's a lot easier to set a Default Route than it is to go in and tell the router all these destination subnets and that’s typically what you would do when you are connecting to a service provider.
So the first thing I have to do on Palaestra1 is I am going to get rid of these IP route commands here and replace it with just a Default Route. I can get rid of these commands by simply using the No command. I go No IP route 18.104.22.168. Just by typing a ‘No’ in there, I can go in and get rid of each one of those Default Routes or Static Routes. 40. So I am able to go in and get rid of those. I am just going to go ahead and do a show IP route and make sure that they are gone. So by typing in that show IP route command and hitting Enter, I can see in here that it only knows of its directly connected paths anymore. If I do a show run, those Static Routes that I put in earlier that I have gotten rid of are gone. So now what I want to do is go in and configure Default Route. I use the same IP route command but for the destination, I just put a bunch of zeros. So here, it is just a bunch of zeros on there and I am saying I don’t care where this destination traffic is going and that’s what all these zeros mean, it means that any destination, send it to 22.214.171.124. I hit Enter, show IP route. Notice in here it's showing up 126.96.36.199, 188.8.131.52, nothing else is showing up and what should be showing is a gateway of last resort and that’s my Default Route that I have put in there, it's called a Gateway of Last resort. What it is it's any traffic going anywhere can go to this Next Hop route. Not showing up in simulator very well but this is where it’s going to show up. It’s a Gateway of Last Resort.
Gateway of Last Resort can also be used for a router, does have multiple paths but you don’t want it to drop packets that it doesn’t know where the destination is. So you can set a Gateway of Last Resort, say hey, that’s a last chance or last ditch effort. If you don’t know where the destination is, try this next hop path. I just typed in show IP route again and hit Enter and my Gateway of Last Resort is working now. So I guess there is just a little bit of a lag time with the CCNA simulator. Static route, all zeros, meaning anywhere, cost of 1, there our next hop router, 184.108.40.206, and check it out, it says Gateway of Last Resort is to network wherever. So wherever it’s going, whatever destination, they are going to be sending it to 220.127.116.11. So what this is, look for this entry in the routing table which is here and you will be sending it to that Next Hop router. So that’s a Default Route. So now I can still ping, let me go back to my PC, PC 01, I can ping 18.104.22.168 because of that Gateway of Last resort being set. Just took a second for the router to process that information.
We will go to the last router so you can see this one more time Palaestra3 and we will get rid of those Static Routes again. Ctrl A brings me to the beginning of the line and I hit No and get rid of that. So I am going to get rid of all the Static Routes again so we won’t have connectivity, 32 gone. If I do a show IP route, routing table should be empty. Let me try that one more time. Again, this thing is a little bit slow as far as picking up what I am doing. So now again, nothing is there. Only thing that’s showing up in the routing table 99.40 and 99.24. Gateway of Last resort is not set so if it gets anything destined for the 16 or the 8 or the 32 subnet, it’s going to drop it. So we need to tell it how to get there. Again, let’s look at eStation3. When we try to ping 22.214.171.124, can't get there because the router doesn’t know where to forward it. So we are going to give it a Gateway of Last resort, IP route Next Hop router 126.96.36.199, Enter, show IP route and I might need to wait a second again. It’s showing up right away this time, awesome.
So we have got Static Route, destination network meaning anywhere 188.8.131.52. We can see, hey Gateway of Last resort is when you don’t know where to go, send it the same path that network zero takes. So network zero goes to 184.108.40.206 and that means any traffic. If we go back to eStation3, we should be able to ping 220.127.116.11 because we have put the Default Route in there. Again, the Default Route would not work for Palaestra2 because it has two different Next Hop paths but for Palaestra1 and Palaestra3, it works fine.
We have talked about routing with static routes, using the IP route command and configuring the routers with these static routes, verifying connectivity with the use of ping, default routing, again when we have got only one way out, here is a router, there is a subnet. Some computers, there is only one way out, might be going to a service provider or just another next hop router. Whatever the case, we can use a default route to all traffic to send it out of this interface and also some troubleshooting, verifying that all the routing tables are populating what happens when only some of the routing tables are populated and problems you might run into. I hope you have enjoyed this CertificationKits CCNA Training Video on Routing with Static Routes.