Hi, and welcome to this CertificationKit CCNA training video on routing basics. We’re going to be covering CCNA routing basics, we are going to talk about what routing is – how routers make the forwarding decision as well as the importance of a populated routing tables so the routers can make their decision.
I have brought up a CCNA slide here that shows 6 different routers and a subnet coming off each router where host computers would be populated. So we might have a machine here, machines in each different area in each one of these routers might be in a different city. This might be in San Diego, LA. Let me try to think of other areas here, Las Vegas we can have another one on Las Vegas, St. Louis. So, we have some routers and again they might be in completely different areas. These are separated by WAN links. Now the importance of routing is to allow this computer right here to be able to talk to this computer over here and how does that function. First of all, we need appropriate IP address scheme. What we are going to do is, we just going to make it real simple. 192.168.1.1 is this guy's IP and this guy's IP is 192.168.2.1. Now, for routers to be able to route, every different broadcast domain there is 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, there’s 11 broadcast domains all together in this scenario. For routers to be able to route, every broadcast domain has to have a unique ID, a unique network or subnet address. I always compare routing to the post office. Every different area designated by the post office needs to have its own zip code. The zip code is what the post office is used to get from one place to another. The routers use network addresses to determine where to forward information, just like the post office use the zip code to determine where to forward information; a router will use a network address.
Now, to be able to route, let say this computer right here wants the ping this computer over here; so it types in ping on the command prompt 192.168.2.1. At this point the computer will compare this IP address to the subnet mask and realize that the network address is 192.168.2.0 and that is not the same network address that this guy has, this computers network address is 192.168.1.1. So, he goes okay, I need to send that to the routers since it’s not within my network. I am going to send it to this router. How he does that is, he ARPs, what is your MAC address? The router will have a MAC address on his interface right here, the MAC address might be 9D, so as the computer is addressing the packet at layer three, he puts the source and destination IP information and then at layer two he puts the MAC address information. What he is going to do is, he's going to put the MAC address 9D as the destination and then I will put a little trailer on there. He sends it out the router gets this packet and he seen his MAC address and It’s like receiving an envelope with his name on it. What happens when you get an envelope with your name on it? You open it up and that’s exactly what the router does. He strips off this layer two information and looks at the layer three addressing which is the IP’s stuff, and so, he goes oh, okay, 192.168.2.1 let me check my routing table and see if I have a destination address in my routing table from 192.168.2.1 and it goes, okay, I do. I see it in there, I have to send it out of this interface right here.
So, what he does is he repackages it at layer 2 to be able to go out of that interface. So the router strips the layer 2 frame, it's called a frame, when it has this information on their strip the layer 2 information off, then forwards the packet based on the layer 3 IP address. Before he sends it out of these interface though, he has to repackage it at layer 2. A typical WAN layer 2 encapsulation is something like PPP. MAC addresses are not needed in this point to point serial connection here so he puts the PPP information in the packet, sends it out, this router receives that packet and so he see this packet coming in to his interface and he knows if it’s a PPP packet he's got to open it up. So he opens this up, gets rid of the PPP information and looks at the layer 3 information in here which is the IP address and goes 192.168.2.1, let me check out what network that's a part of. That's got to go out of this interface right here. He goes okay let me package that up appropriately so he repackages it at layer 2. Layer 2 says here is this IP packet and we need to get a MAC address.
So he'll ARP this computer right here and his MAC address might be A3 and he says hey what’s your MAC address? He sends back A3 so he puts the header information on there and redoes the trailer. Sends it out the computer, gets it, he sees his name, strips off the layer 2 information and sees his IP. He then opens it up further to get to that desired information on the inside of this packet. So routers need to be able to use these network addresses like a zip code. Like our post office, the first thing they are going to look at is what zip code it is going to so they know what plane or train or bus whatever to put this on. The router looks at the network portion of the address as the zip code so they know what interface to send it out of. So it's very important that a router knows where these destination networks are located. If they don’t, they will not going to be able to send the information. Let's look at how they find out where those destination networks are located.
I'm going to bring out a CCNA slide here that show three routers, router A, router B and router C. Now there are 1, 2, 3, 4, 5 subnet in this scenario. Each subnet has to have its own network address. This subnet is 99.8, 99.32, 99.16, 99.40, 99.24 so I've got each subnet with each own individual network or subnet address. But the routing tables here are empty. So let’s take a look at what going to happen with the empty routing table and the importance of having this routing table populated. So I've got a computer over here in the 22.214.171.124 subnet. So here is this guy he wants to talk to his buddy over here in the 126.96.36.199 subnet. So he wants to send the messages to this guy. The routing tables are empty. The IP address for this computer right here is 188.8.131.52. The IP address for his default gateway is 184.108.40.206 and here’s the gateway right here, .1. This is the IP address of the gateway, the router's nearest interface. So what he does is he says ping 99.24. Say this guy's IP address is .13 so 220.127.116.11. The first thing again, let me go over this one more time, the router's going to do is find out if this IP address is trying to connect to which is 18.104.22.168. 13 is within his subnet. So he checks this IP address against the subnets mask which is 255. /29 24.0.0 and he realizes something. He realizes that this destination computer is in the 99 24.0.0 subnet not in the 22.214.171.124 subnet.
So he can't ARP this guy directly get his MAC address. He has got to send this to the router and let the router take it from there. It's like I wanted to give my next door neighbor a letter. I just walk the letter over there and put it in his mail box. But if I want to mail something to my mom who is in a completely different part of the state, then I am going to have to use the postal service because I am not going to walk there. So he has got to use the router to get the information over to his buddy. So he ARPs his default gateway 126.96.36.199. The router sends back his MAC address. Again his MAC address might be 9C. He sends it back. So he addresses his ping packet, IP to the destination MAC address of 9C, sends it the router. The router gets the envelope, opens it up and sees a destination IP address of 188.8.131.52. He goes hey, where the heck is that? Compares it to the subnet and says all right; that’s got to go to the 184.108.40.206 subnet. Let me check my routing table. Oh-oh, my routing table is not populated. I don’t see how I can possibly get to 220.127.116.11. My routing table is not telling me anything. Actually there would be a couple of things in the routing table. His directly connected routes would be in the routing table; 18.104.22.168 directly connects to subnets I should say. So this subnet 99.32 and 99.8 will be in there because he actually has to retype in the IPs and the subnet masks on these interfaces and the router does the math and says okay, I have got these two subnets. Anyway he looks in there and he sees 99.8 and 99.32 but he does not see 99.24. So what does he do? He gives up, he doesn’t try. He just gives up because the routing table doesn’t tell him how to get to this destination. So this guy gets very sad because he cannot ping his buddy. Let's take a look at what's going to happen with the populated routing table.
I am going to clean up the CCNA slide real quick and populate the routing table. So I have got the routing table populated here. Don’t worry about how they are populated; we will go into different ways of populating the tables from static routes to routing protocols in other videos. I just want to — they are just populated and these are actual RIP costs right here that they are using. We are just basically using the cost of one router away just like here; it's just basically one router a way. So what it shows this router now 22.214.171.124, he knows that his Ethernet 0 interface has a connection to that. We have serial 0 and Ethernet 0. All right, so we have got all the routing tables here that populated. So let's take a look at the same scenario. This computer tries to talk to his buddy over here with the 99.24 network address. So he ARPs his gateway, this time when the router sees the 126.96.36.199 destination subnet, he looks in his routing table again and it says hey, I have a path to 99.24.00, it's right here. It's in the routing table and it tells him how to get there. It says you need to go out of your serial 0 interface and it is two routers away.
So it goes okay, I will package it up to go out my serial 0 interface. So a typical WAN encapsulation is PPP. So it takes the IP packet and puts it into a PPP frame. Then basically packages it up like it is in an envelope and sends it to the router B. Router B opens it up and looks at the IP packet again does the same thing. It says hey, 188.8.131.52, let me check my routing table. Oh yeah, I have got that in here; it's right here. It’s got to go out of my serial 1 interface and its one router away. So he will repackage it to go out of a serial one. Again maybe PPP puts it in the PPP envelope and sends it to router C. Router C opens the envelope looks at the IP packet. And goes oh network 99.24, let me see if its directly connected he still also check because yeah I have got that, 99.24.00, that’s got to out of my Ethernet 0 interface. And its 0 hops away meaning I am directly connected to it. That’s great. So he packages it up again with layer 2 encapsulation. But this time, it’s an Ethernet layer 2 encapsulation so he ARPs this computer right here to get the MAC address and he puts the MAC address on there. It might be A9 and says MAC address, sends it out this computer opens it up and gets the information. If the routing tables were not populated, it wouldn’t able to do that. Let’s take a look at a scenario where maybe some of the routing tables are populated, but not all of the routing tables are populated.
I have cleaned up my CCNA slide yet again. I have made a change here for the routing tables. All the routing tables are populated for A and B, but router C does not have 184.108.40.206; it doesn’t have this subnet in it over here. So we have got to figure out what to do or what's going to happen even though, these routers A and B have all the routes in them. Router C does not, so what's going to happen when this guy tries to talk to his buddy? So he sends out his ping. When you ping, you want a response back. You are not just wanting to talk to yourself; you want a reply back. So he sends out his packet and since A and B knows where 99.24 is; they keep sending it on. A sends it out serial 0, B sends it out serial 1, C gets it. He knows Ethernet 0, he goes okay, I am going to send that packet out Ethernet 0. So his buddy sees the ping and he tries to send a response back so that they can talk. When he pings back however he goes, okay 220.127.116.11 this guy’s IP, its 18.104.22.168. That’s not in my subnet so I need a send it to my gateway.
So he ARPs his gateway. ARP then gets the gateway’s MAC address and he goes okay, I am sending this to the router. So he packages it up and sends it to the router. The router opens up the envelope and sees the destination IP address of 22.214.171.124. He does his math and goes okay, that’s on subnet 126.96.36.199. Let me check my routing table. Let me see 99.32, 16, 40, 24 and there's nothing in here telling him how to get to 188.8.131.52. It could even have what's called a default route saying; hey, if you don’t know where it’s at, send it this way. There's nothing like that in there. Say I know where 32 is 16, 40 and 24, so what's he do? He gives up. He sends a response back, destination unreachable to this guy right here. That’s because he doesn’t know how to get there. So this guy gets very sad because he tries to respond to his buddy and the router doesn’t know what to do. So it’s important that all of the routers have the routing tables populated. If one of them doesn’t or doesn’t know where a particular subnet is then they will not be able to communicate in both directions. So if he is actually receiving the initial ping request or echo request, that’s is what a ping packet is, its two parts echo request; echo reply. He tries to send the echo reply back this router. Router C can't do it, so they are unable to have communication. So he is getting the hellos, but he is not getting the replies back.
I have cleaned up my CCNA slide one more time as I want to re-illustrate this CCNA point. I have put basically what's going to be in the routing tables by default without telling them anything else. By simply configuring an IP address on an interface and putting the subnet mask in there, the router figures out what subnet it's directly connected to. So it knows on the Ethernet 0 interface here, it’s got 99.8 and it knows that on serial 0 it’s got 99.32. Here is serial 0, Ethernet 0, serial 1, serial 0 and Ethernet 0. So again one more time if I had a computer here and let’s say from this computer I am simply trying to ping this interface serial 0 on router B, 184.108.40.206 is the IP. If I try to ping that again, it’s important for all routing tables to be populated for this to function because if I send out a hello to that router from this guy; he realizes that 220.127.116.11 is not local. So he packages it up to go to the destination of Ethernet 0 interface on router A and the router opens it. It sees the IP packet says 18.104.22.168; let me check my routing table that’s the 22.214.171.124 subnet. I have got to send it out of my serial 0 interface and I am directly connected to it.
So he sends — so he repackages it with PPP and sends it out. So he puts it in a PPP envelope and sends it out to router B. Router B opens it, sees the packet is for him. It checks it out; a ping, cool. I am not going to ping back. So he sees the destination address said that is supposed to respond to as 126.96.36.199 and he does his math and he goes oh that’s on the 188.8.131.52 subnet. I better send it somewhere because I don’t have that — that's not directly connected to me. So let me check my routing table and see how I can get there. He looks in his routing table, he sees 32, he sees 16, he sees .40 he sees 8. So he can't respond, so again the packet can get there, but just because it gets there doesn’t mean it can get back. All routing tables need to be populated and if they are not populated appropriately you going to have problem. So it’s important if you are troubleshooting why this machine can't ping this router over here; not only do you need to check router A’s routing table, you need to check router B’s routing table as well. So in this CCNA video we have talked about routing basics. What routing is, how routers make the forwarding decision and the importance of a populated routing table. Additionally the importance of all routing tables being populated. I hope you enjoyed this CertificationKits CCNA training video on routing basics.