Routers, Switches, Packets and Frames

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
welcome everyone my name is Jacob hat and I'm here to take you through 0-2 engineer let's look at a really cool example here I actually love this so if I had this kind of information at this kind of explanation a long time ago my mind would been blown because it would have made it all so clear to me so what we're going to do is we're going to see what happens to this data as it travels through the network from the host on the left to those on the right but before we do that we need to identify what's going on here with this with these two different networks so we have one network on the left one 92168 that 100.0 we have another network on the right which is 10 10 dot 10.0 two different private networks that were connecting together over this router and each one of our hosts on these networks have specific IP addresses and specific MAC addresses remember every node on a network has an IP address and the MAC address right they have two addresses so your host has both of these and the host on the left is going to want to sit 102 MAC address with all A's just for an example that's not real MAC address and then the ID host on the right has IP 10.10 gotten that too and it has all B's just for simplicity sake now we do have to understand what the IP address and MAC address is of the router as well when we only think of routers in terms of IP but they do have MAC addresses and the router is called the default gateway for a network whenever a computer needs to go to it to get to another network so for example this computer here on the left if it needs to communicate with the network on the right it's going to have to talk to its default gateway to get over to that network that's what the default gateway is it's the Gateway to get to other networks it's the router that will get you out to other networks like the interwebs that's what your default gateway is and you'll see in your IP config you have one and that's basically your routers IP right for your house all right so that's what default gateway is but we do have IP addresses and MAC addresses assigned to each individual interface of the router not just one this router doesn't have just one IP it specializes in routing traffic from one network to another so it's going to have multiple IP addresses and again each and each IP address will also have a MAC address associated with it for those particular interfaces and we're going to see how this relates as the traffic travels through okay so let's look at that now we understand now we have two different local area networks we have the one n - 1 state 100.0 and at ten ten ten zero and host one or two once we state that one hundred at two is going to send a message so 10 got 10.10 dot i want to send this data this data up here whatever it is we might find out what it is actually but I want to send this data to 10.10 zdenda - okay so let's see what happens so it's going to take this data and before it can send it out it first needs to create an IP packet so this IP packet is going to have the destination address it knows that the host that wants to send it to is 10 10 10 - so it puts that on the IP packet destination right it also includes its own IP address in the IP packet as well as the source so in the header we have the source which is 1 into 1 to state 1 or a 2 and the destination which is 10.10 dot ten dot 2 so it creates that packet and it's it stuffs all the data in there right so now it has this packet now what does it need to do with this packet before it can send it out onto the Ethernet LAN well it needs to create a frame so it creates a frame and it's going to put the mac information right it's going to put the destination MAC address well what is the destination MAC address going to be it actually doesn't know the MAC address of this computer 10 10 10 - because it's on a different networks it only knows the MAC addresses of computers on this local network but what it does have is a default gateway and this computer knows the MAC address of its default gateway so you just get 0 0 interface here has a MAC address of all C's so it's going to actually put a destination MAC address on the mac header of this frame as all C's here so that will actually get to the default gateway and it knows to do this because it knows its default gateway is this address and it knows its max all right so it knows this information so it has this frame and it's putting the addressing information on it and now it has this packet as well and it stuffs the packet into the frame right so now we just have a frame the data put it into the packet then we put the packet to put it into the frame just like we talked about before but we're excluding the TCP part for simplicity purposes we're just saying that it's already happened we're just going from data to pack it to frame all right so we've stuffed it all in there and now since we have a destination MAC address of all si use the default gateway we're going to see how it actually gets there so the computer sends it out onto the land and it goes to the switch now the switch actually takes that frame and looks at it and it opens up the header and it says oh I see si si si si si si si si si si si si as the destination MAC address so I'm just going to go ahead and send it out of my port that is connected to that MAC address because remember it has a table it knows exactly where this router is connected so it sends it out the port that's connected to that router boom it makes it to the router then the router goes oh I have some information here let me go ahead and look at that and it takes the frame it analyzes the frames mac header it says oh that frames mac header is si si si si si si si si si si si si si and it knows oh this frame is for me so let me open this up further so it opens it up further and what it finds is the IP packet right and now it looks at the packet header information and it sees that the destination IP in the IP packet header is 10 10 10 dot 2 and it says oh okay well let's see I know where that is so then it takes that packet it doesn't change the destination IP address it leaves that the same and it puts it back into a frame and on this new frame it's a brand new frame what it does is it changes the MAC address header to all B's bb-bb-bb-bb-bb-bb-bb so that it can be sent off to the host and then it says all right got the frame repackaged and I'm sending it off to the host and it sends it down to the network then it makes it to the switch the switch then has a look at that frame as well it says oh let's see the frame header is B BBB BBB BBB and it says I know where that is that's connected to my port Gigabit Ethernet 0/10 and then it sends it out that port that it has I just made that port number up right I don't have it on a diagram but it sends it out directly to the host and then the host receives it and the hostess I call sweet I got a frame let's see and it opens it up and it looks at the frame header the MAC address header and it sees that it's all B's right and says oh that must be for me so it opens up the frame completely getting to the IP packet and then it looks at the IP packet destination and it says oh cool this is for me it's pretend I attend that 10.2 and it came from 192 168 100 dot to my buddy over there all right this must have something interesting in it so then it takes the data out of that packet and it can then analyze it now what does it do with the packet in frame now well it destroys those things and it just is left with the data and now we can say hmm let me go ahead and take this data and figure out what it means it'll run it through its applications or whatever the data was meant to go through in this case it was a JPEG image of a flying cat a fine cat why do people keep sending me images of cats from the interwebs I don't know I don't know but that did make me laugh so thank you 1 I 2 1 6 8 102 I appreciate the message and that's how it works guys that's how packets go to frames which go to packets again which go to frames again which sometimes go to packets again and then go to frames again and then get D capsulated by the host eventually where it can pull the data out and find that really cool picture of the flying cat so that is how the communication actually works take a pass here thank you guys for viewing the video I hope you really enjoyed it and I'd also like to remind you that if you're truly serious about your career in information technology be sure to check out our career blueprint and engineer training program at ww0 to engineer calm you
Info
Channel: NexGenT
Views: 404,333
Rating: 4.9343109 out of 5
Keywords:
Id: zhlMLRNY5-4
Channel Id: undefined
Length: 9min 12sec (552 seconds)
Published: Tue Jul 25 2017
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.