Lecture - The Routing Process

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in this video I'd like to talk about the routing process that is the communications that occur between different routers to relay messages from end device to end device before I get into this process I need to lay down some ground rules one each of my private lands my local area networks will have a 192.168.0 network address you place or so you substitute the X with the appropriate number let's take a look at what I have going on this would be a local area network attached to router one and the network address for this local area network would be 192.168.1.0 this would be a local area network for router - do you know that router - bla so i router 2 contains the 192.168 2.0 then I take the 192.168.1 umber that represents the router that I'm dealing with so if this is router 3 that means the network address the private network address for router 3 would be one ninety two dot one sixty eight dot 3.0 now when I'm referring to these private addresses I want you guys to think of that as being a local area network that those routers represent and so finally router four would represent a local area network of 192.168.1.0 with this last twenty four prefix you'll notice that all my private networks have a slash twenty four prefix it's just shorthand when it comes to writing down a subnet mask I'm being a little lazy and I'm deciding instead of writing down 255 dot 255 dot 255 dot zero I decided to write slash 24 and think about it I meant from 3 255 it's octet is made up of eight bits if I take 24 and I divided by eight I get three numbers 255 dot 255 dot 255 dot then 0 another way looking at it is this last 24 is telling me the first three octets represent the network address and then the last octet represents a host address so when I come back over here to land to a device on this network is going to have an address of 192.168.0.0 sad R s pc one and of course it's going to have a subnet mask of 255 dot 255 dot 255 dot 0 now I decided to write this last 24 we're going to start exploring that in future chapters but for this chapter I'm just explaining to you and saying network prefix first three octets represent the network address the last one the host the total is known as the IP address for my routers I'm going to give the default gateway the last usable address in that block so in this case the last usable address for the one ninety two dot one sixty eight dot two dot something and that's something for the gateway is going to be 254 so all my hosts that belong to this network will go from 1 up to 253 and 254 I'm going to leave out and make it reserved for my default gateway and remember our default gateways way for a device so it's way for a message to leave a network you'll also notice that we go back and looking at my routers and how they're connected I have a serial connection a point-to-point I only have one host on this end and another host on that end in fact we would call this one the serial interface serial 0 / 0 / 0 and this one probably 0 sorry serial 0 / 0 / 0 as well the important thing is I have two interfaces and only two interfaces that represent this network this is a local area network between these two routers in fact when we take two local area networks two private networks like these and connect them together by routers we establish a wham and according to my rules in this demonstration or this lecture the way and addresses are going to begin with some number followed by all zeros then a / 8 remember the /h network prefix and that's telling that the first octet is going to represent the network address so between router 1 and router 2 I have a network address of 1 0 0 0 the same can be said about the network between router 2 and router 3 we see that I have a 2.000 network and lastly between router 3 and router for I have a 3.0 0 0 now I am being wasteful that's because we haven't learned about variable subnetting or saw variable length subnet but in this case if I were to configure this interface on r1 to have an IP address and I need to do that so these two devices can communicate with each other if I plan on relaying messages back and forth I would do that as 1 dot 0 dot 0 dot 1 I could pick any number between 0 and 255 for these 2 octet but I decided to leave them at 0 this is just me managing my network a little bit more easier so I put the dot one to represent routers ones serial 0 / 0 / 0 learn more about this as the course goes on but for now I'm just laying down some ground rules and I'll do the same thing for this interface I'll let it begin with the 1.0.0 but after the last 0 I'm going to put a dot 2 both of these devices are in the same logical network because both need to begin with a 1 both of them have their own unique IP address because they both end with some unique value this ones dot one and this one's dot two representing router 2 I'm going to do something similar up here this one's going to be 2 dot 0 dot 0 dot 2 and this interface over here I will configure to be 2 dot 0 dot 0 dot 3 shorthand I would just say dot 2 you know the network address because the network address is up here and I'll write that out for it so you guys can see it but the individual interface addresses are these two 0:02 2.0 0.3 and then likewise over here it's going to be 3.0 0.3 and see if you can figure out what I do to configure this interface for r4 so I'm going to start off with 3 because they need to belong to the same logical network and I'll probably continue the trend of using those 2 zeros and then I'm going to end it with a dot 4 so now I configured every interface on my router and I can figure it a PC over here to have a 192.168.1 address what I also need to do with that pcs need to figure it so it has a subnet mask and a default gateway so let me add that information here the subnet mask is going to be used by the PC to determine whether or not a message should stay locally or should be sent to the default gateway so it can leave the network so this is the IP address the 192.168 2.1 and this is my subnet mask of 255 dot 255 dot 255 dot zero and the last thing I'm going to do to configure this PC is I'm going to set up the default gateway address of 192.168.0.0 router you notice this interface of the router is connected to this side or sorry this network now in order to have communication I must have a sender and I have to have a receiver this is going to be my sender PC 1 then PC 2 is going to be my receiver so I'm going to come over here under the network one ninety two dot one sixty eight dot 4.0 I'm going to set up a new PC I need to identify it with an IP address so IP in order for this PC to be able to communicate with other devices on the same network they have to have the same network address so I'm setting up the first three octets now since this is my first PC on this network I can put a dot one there but what I'd like to do is call this one PC two and let's just make this the second PC so you can see that there are two other computers are going to be going on pc1 & pc2 but i don't want to get PC one mixed up with this PC one over here otherwise I'll start causing a problem not a problem with the communication process but the problem with the learning process which PC one is referring to so for simple learning techniques this PC one will have a dot one address and it'll begin with 192 dot 168 - I'm going to come over here and make a PC - and that's going to have an address of one ninety two dot one sixty eight dot 4 dot two and I'm going to give it the same subnet mask of 255 dot 255 dot 255 dot zero the reason why I'm doing that is because once again the subnet mask just like pc-1 pc2 is going to be using it to determine whether a packet stays within this local network or should be sent to this default gateway so the default gateway can determine which way it needs to go to get to the end of us and I mean the other end device in order to be able to do that this PC also needs a default gateway setup now the only router or gateway that I have installed on this network is router for now router 4 has two interfaces I've configured the serial interface which is on the public side the LAN side of 3.00 4 I cannot teach PC to or configure PC 2 to have that address and the reason why I can't do that is because this address belongs to a different logical network then these devices over here this network is the 3 network this network logical network is the 192.168 remember the pc uses the subnet mask ends it with each IP address the destination IP address to determine if they have the same network address if they have the same network address then we pass it to the switch for local delivery if they have different network addresses then it has to be passed to the Gateway so it can be routed to a remote network with that being said I need to come over here to the router for and I need to configure its Fast Ethernet interface so let me come to the r4 interface of router 4 and I'm going to give that an IP address give me a second my markers drawing up now remember this interface is used to connect to that network so I better configure it so it has an IP address of one ninety two dot one sixty eight dot four it's also going to need a host address so I'm going to follow the same rules that I followed over there and that is I'm going to use the last usable address I will also configure this to have the same subnet mask of 255 dot 255 dot 255 dot zero I will not configure that to have a default gateway routers don't have default gateways they have routing tables that have default routes and they also have rent entries in these routing tables to point to other routes or sorry other routers the only ones that get default gateways are local end devices so let's look at this local end advice now I need to teach this end device PC to that is about this new interface which is going to be 192 this new device I should say once dot one sixty eight dot 4 dot 254 and this is pc2 and we're making that one the receiver so pc1 becomes my sender and pc2 becomes my receiver I have two end devices they are connected together and they're governed by a set of rules now we need to see how they share resources give me a second let me erase some things we no longer need these sets we understand that the network addresses are going to be one ninety two dot one sixty eight dot something for the lands and the lands network address is going to be something followed by all zeros let me clear that up so pc1 is going to send up a message in order to do so it's going to go down through the OSI layer it's going to use an application like a web page sorry web browser and that's going to get passed down to the presentation the presentation takes that information and converts it into data and then that's going to pass down to the session let's just assume the sessions established we have a server on the other place that's going to be refilling my request let's move down to the layer for the layer for is dealing with the transport it's going to take the data and segment it give it a sequence number deal with source and destination port addresses and then pass each segment down to IP remember when we deal with the transport layer we're trying to deal with reliable communications if I'm dealing with a webpage so now I'm at layer 3 and that's the only focus I want to give in this presentation is what does layer 3 produce to be able to send a message from one end device to another what layer three produces is called a packet each packet is going to tain part of a segment from layer 4 and it's going to have a couple of fields well it's going to have about 24 bytes of data for end and delivery but the two fields that I truly care about is going to be the source IP address and the destination IP address I think that one's going to give me some issues if I'm pc1 on the sender and if I'm the sender I'm going to stamp my IP address of 192.168.0.0 into the source IP address field this is going to be used by PC to to be able to send its data back to me now PC one has to know what PC 2's IP address is typically when you and I are using a web browser we type in a domain name and hit enter that means the web browser is going to have to do a DNS query to convert that domain name into an IP address now later on we'll talk about how private IP addresses tend not to work as well as public addresses but let's just assume eye routers are configured they understand those and that when I did that DNS lookup I got 192.168 4.2 for my other end device so let me stamp that right in side my packet header for this segment so I stamped a one ninety two dot one sixty eight dot 4.2 for my destination IP address now I'm going to skip over layer two and skip over layer one and it's going to focus on layer three why is this information important the source is going to be used by the receiver to send the data back well then where does the destination get used a one does the destination get used well gets used first right here at PC one the first thing that PC one's going to do is determine whether or not this packet that its building needs to keep it local within this private network or send it out through the Gateway and how does it determine that well it takes its subnet mask remember pc1 subnet mask is 255 255 dot 255 for now we're going to make the assumption that any number that has a 255 underneath it that makes it part of the network address since these three octet have the 255 underneath them and means my network address is going to be 192 dot 168 to 0 but I'm assuming that since my subnet mask is last 24 that I take that and I determine the first 24 bits are the network address in this case the first 24 bits is one ninety two dot one sixty eight dot for now I'm using bits and decimal interchangeably we'll learn next week how to convert these into binary and count the 24 bits that the sub the network prefix is using but regardless I see that my DNA my destination network address is one ninety two dot one sixty eight dot 4 dot zero and that does not equal my own network address and my network address is one ninety two dot one sixty eight dot 2.0 and that tells me make a left instead of making a right and the left means send my frame or in this case packet to my default gateway so PC one looks at its configuration and sees that its default gateway is one ninety two dot one sixty eight dot 2 dot 254 please do not think that PC one is now going to race the destination IP address and replace it with the default gateway address it doesn't work like that the only thing that's going to happen is that pc1 is going to be doing an arp request looking at its art table to find out what the physical address is for the default gateway that's for another chapter let's just assume it knows what it is it reframes the packet with the correct physical address of the default gateway and then it ships it out the switch grabs that frame realizes it's destined to the router so pressing the fast-forward button so we don't go through all that theory all at one shot pc1 determines that the destination IP address isn't on the same network as the source therefore send the packet to its default gateway that means it's going to send its packet to router to router to is going to receive that packet and it's going to do something very similar to what pc one did it's going to determine what the destination network address is for that packet and it comes out the same answer that pc one did but it does the answer is slightly different when PC one try to calculate the destination network address for one ninety two dot one sixty eight dot forty two it used its own subnet mask when the router tries to calculate the destination IP address for sorry the destination network address for the one ninety two dot one sixty eight dot 4.2 it's going to use each and every subnet mask stored in its routing table in order to illustrate that I'm going to draw what routers choose IP address sorry routing table is going to look like the three major elements to routing cable is going to be the DNA the network address the destination network address the next hop address and what we call the metrics I tend not to put too much focus on this one I'm just going to be looking at these two we'll explore that later this router when it first boots up is going to know about three networks the reason why it's going to know about three networks because it has three directly connected networks it's going to know about this network that's going to be one ninety two dot one sixty eight dot 2.0 and the next hop address isn't going to be at hop address at all it's going to be an exit interface and the reason why it's an exit interface is because this network is directly connected to it and that's going to say well let's just make that one FA 0/0 fastethernet 0/0 the other network it's going to know about is going to be this network right here between r1 and r2 so it's going to know about the 1 dot 0 dot 0 dot 0 and that's going to have an exit interface and that exit interface is going to be the serial 0 / 0 / 0 the other network this router is going to know about is going to be the sorry 2.000 Network and that exit interface is going to be serial 0 / 0 / 1 I can't put a zero in there because that interface is already used for the other Network so this one has to be 0 / 0 / 1 so there are my 3 entries that this router is going to know about and those are the only three entries this router knows about and this packet is coming into router to this router is not going to find a match and since it doesn't find a match it's going to drop it it's going to discard it so I need to teach this router about this network or about a router that might know about that network so I'm going to create a default route it's going to be a catch-all and the way I'm going to do that it's going to put in destination Network and address of all zeros with a subnet mask of all zeros that means these are wild cards match anything in fact you don't have to match anything when it comes to this if you have a default route if you can't find a better match in the routing table send it out this is why we call this the Gateway of last resort now the next hop address well to me I could choose two addresses I can pick the 1 0 0 1 because that's the other router I can hop to or I can teach it to hop to 2 0 0 3 which one you think would be the better choice the one 0.01 which only represents this network or the 2.0 0.3 which represents a couple of other networks well if I'm creating this I would probably be using the 2.0 got 0.3 for my next hop address and that's where the matrix gets into how many hops away is that router 2 where I'm at well it's only one hop so this would become a 1 in here now that I have this information in my routing table this packing can come into the FA 0/0 interface gets D encapsulated comes up to layer threes up packet header looks at the destination IP address of one ninety two dot one sixty eight dot 4.2 determines what the network address is by using the subnet mask for each one of these entries and starts calculating it do I have a match with the first entry does one ninety two dot one sixty eight dot four match the one ninety two dot one sixty eight dot to remember that is a slash twenty four prefix so they're matching three for this one and the answer is no that doesn't match what about the one that is a slash eight so it says match the first octet there's one ninety two match one know what about two is 192 match to know what about nothing well it doesn't match nothing that's a problem and it doesn't match nothing it's going to pass the packet to router three so now our packet is going to be reshaped to router three this is nice because it was able to leave this router so able leave this network and onto another network in order to do that I had to reframe this to have a source MAC address that matches this interface and a destination MAC address that matches this interface is what we call local delivery message it's delivered from network to network to network until they finally reach their end device now this packet comes into r3 and what do you think r3 is going to do it's going to follow the same process that r2 followed it's going to look at its routing table and determine if it has a route to relay the message on well let's look at our three routing table I know that r3 is going to have three entries right off the bat when it first boots up it's going to be the three connected networks the to network the one ninety two dot one sixty eight dot three network and then the three network so it's going to know about two wins and one land hmm if this packet comes in with the state this router is in right now it's going to get dropped so we need to configure another route for this router to pass that packet on to the next router I could do a default gateway as well or sorry default route as well or I can be a little bit more precise and have it match one ninety two dot one sixty eight dot four and that's the approach I'm going to do right now so we said this router knows about the one ninety two dot one sixty eight dot three das knows about the dot two network also knows about the dot three but now I want to teach it a new entry in order for router 3 to be able to relay the message on forward the packet I've got to teach it about Network one ninety two dot one sixty eight dot 4.0 so I'm going to type it in its routing table one ninety two dot one sixty eight dot 4 dot zero let's look at our diagram for a second where should rather three forward the packet two what makes sense to forward to any of these other routers back here even if it had a connection between R 3 to R one it wouldn't make any sense the best path for R 3 to take for that packet we're sorry for that packet the take from R 3 would be to R 4 I have three choices I could use I could use that address this address or that address but only one of those three choices is actually going to work let's see the first address 3.00 three if I use that for my next hop address all that would do is take it from here and drop it there didn't get very far let's talk about the third option that is if I use the one ninety two dot one sixty eight dot 4 dot 254 well in order for this router to forward it out that interface must have the same logical address so same logical network address as any one of the three interfaces that that router has that doesn't match the same logical network address as this one nor does that one nor does this one so that would be a poor choice only because it required another router to be able to relay it to there why would you want to get another router mixed up into this little private network that they have going on you don't what you want to do is use only this address it allows the packet to move forward but still stay within this local network they both have the same local address local network address or sorry logical network address of a three so that means they can handle physical addresses really well and this one should receive it so my next hop address is going to be 3 dot 0.04 and it's only one hop away well that's going to allow me to do is it's going to allow me to take that packet forward out of this interface and let it land at that interface now do I need to teach our four about the 192 dot 168 got 4.0 Network the answer that is no this is a directly connected network to our 4r for now only knows about two networks the three network and the one ninety two dot one sixty eight dot four network so our fours routing table is going to be looking like this replace this three with the four and it's also going to know about the 3.000 and that will probably like serial zero slash zero slash zero now when the packet comes into r4 the frame will dxi the router will deal the encapsulate Sardi capsulate the framing information to reveal the packet resources and look at the destination IP address of that packet and determine hey I do know about one ninety two dot one sixty eight dot four that belongs to this interface so it's going to reframe it do an arc request for that end device of one ninety two dot one sixty eight dot 4 dot to get that MAC address put it in there for the destination forward that frame onto a switch the switch looks at that physical address and then delivers it to PC - I know it seems like a very convoluted process but what it allows us to do is allows these packets to follow different paths for instance if this was connected here and even connected to this router a packet doesn't necessarily have to follow the same path to get to its end device which gives us flexibility because if this would to go down something happens like a drunk driver ran into a utility pole and we lost connection between router 3 and router for as long as router 3 knows about an alternative route it could pass to r1 and r1 capacity to r4 this allows us to scale our networks and makes them networks even more stronger or dependable because we offer multiple pathways through these routers to get to our destination the other thing allows us to do is sort of balance our load to distribute the processing attention and bandwidth required to be sending packets back and forth to our end of Isis so in a nutshell to review but flipping it back in the same direction or so in the opposite direction if our receiver wants to send something back to our sender the first step is to look at the destination IP address I remember this packet it's going to be flipping the source with the destination so the source IP address is going to be one ninety two dot one sixty eight dot whoops ZF 4.2 because now on the sender on PC too and I need to respond back to the request that PC one has made and the destination IP address is going to be one ninety two dot one sixty eight dot two dot one now that I'm ready to ship out this packet I have to determine whether or not this packet is going to stay local or if it's going to be sent to my default gateway so it can be forward on to other networks other routers if you will well with that being said let's look at it do they both of the same network address the answer to that is no 4 & 2 are not equal 192 168 are but this is where they differ they both have a 255 dot 255 dot 255 subnet mask so I need all three of these to match I get 2 out of 3 won't cut it so that tells me forward it on to the gateway pass the packet to the Gateway what is this gateway going to do the router is going to look at the destination IP address and end it with every entry in its routing table well routing table 4 looks like this now one ninety two dot one sixty eight dot 4 dot zero and it's also going to about the 3.000 network at this given moment in time router four will drop the packet it has no way of knowing where to get sorry my apologies it has no way of knowing what interface to send the packet out of when only routes it knows about or these two I can configure it in one of two ways I can configure it dynamically or statically if I choose static I can set it up so it can say hmm any and all packets that aren't being matched can go follow this route and be passed to another exit interface let's just say we'll pass this one to 1.0 so 3.0 0.1 and that's one hop away so I'm saying if they can't find a match pass it to r3 and I made a mistake r3 had an address of remember correctly this would be dot three so I apologize by the way I promise you will do this in a packet tracer activity and if you put in the wrong address and the router allows you to do that don't expect communication to occur the only address that I have available here is the dot three address and the dot four address earlier showed me earlier I showed you the doll for wouldn't make any sense because it would still keep it at this router in order to move forward it has to hop to another router I chose to pick this router so it's going to follow the same path so now this packet comes into our for our four looks at the destination IP address of the packet decides to match it to the default route and then forwards it to our three hmm let's look at our three our 3 knows about four networks now it knows about these three networks that are directly connected to it but the last time we went through this communication process we configured our three to know about this network over here hmm if the packet comes into this router it will drop it because this router doesn't know about this network over here so let's just say we do the same thing with r3 we can figure it with a default route and this time the default route will have a next hop address of 2 dot 0 dot 0 dot to default routes are a lazy way to do a catch-all and they make it nice for terminal network sorry terminal end devices that means the networks are at the very very bottom like your home networks let then hook up to an ISP so we got this intermediary layer then which will hook up to an NS P by being at the very bottom I can just say if it's not locally then always send it to up my ISP makes it real easy to configure now this packet comes in it decides to match this route this route will then take the packet and forward it on to this interface this interface will then D sorry strip away the frame headers and trailers reveal what the destination MAC address is for the packets our IP address for the packet is which is 192 dot 168 2.1 take that entry try to match its routing table if it finds a match forward out of that interface well what does this router to know about should know about four routes knows about the three directly connected Network plus a default route that we use to pass up to router three since it knows about this network and that is where this packets destined to it finds a match does an ARP request for the dot the one ninety two dot one sixty eight dot two dot one gets a physical entry put that in its frame for the destination forwards it out of this interface onto the switch and the switch relays it to PC one which I erased but PC one still exists and that's the routing process like I said it is a convoluted process what it allows us to do is it allows us to add and remove networks which we call scaleable without hurting other networks we can evolve with our technology we can make better faster connections without bringing down the northeast or the southwest so gives us flexibility allows us to make our network scalable it also introduces security what if I don't want this network can be accessed from the public side I can deny that here after all it's like putting a security guard outside my front door the only way to get into my house is through my gateway the only way to get through this network is through our four okay so the routing process basically entails looking at the destination IP address getting the network address of that destination IP address and then trying to find a match in its routing table both host and routers will have their own routing table and I believe that should be everything thank you for your time and I'll see you the next video
Info
Channel: Nicholas Andre
Views: 162,353
Rating: 4.930356 out of 5
Keywords: Lecture, The, Routing, Process
Id: C5YfkR8LGm0
Channel Id: undefined
Length: 41min 23sec (2483 seconds)
Published: Thu Oct 04 2012
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.