REAL LIFE example!! (TCP/IP and OSI layers) // FREE CCNA // EP 4

892.65k views3515 WordsCopy TextShare
NetworkChuck
Let's follow a packet through the layers of the TCP/IP and OSI model!! // CCNA Course 200-301 - sp...
Video Transcript:
this is episode four of my free ccna course and a huge shout out to bozon software the official sponsor of this ccna course they are the reason this can be made available for free so i highly encourage you to go check them out they have the absolute best ccna ccnp labs and practice exams tcp and osi networking models that define how we connect our computers without these we wouldn't have networking so in this video we're going to watch it happen we're going to follow a packet as it goes through a network and how it interacts with each layer let's do it [Music] okay same scenario as the last video johnny wants some delicious network chuck coffee so he needs to go over the internet to access networkchuck. coffee to order some coffee let's watch his packets go across the network and we'll analyze the layers as it goes across the network let's check it out now i'll say it again in reality we're using the tcp ip model which is this but for reference i'm going to use the osi model so i'll add in those extra layers the session layer and the presentation layer just going to add those in there stack them up and if you want to follow along which i highly encourage you to do that it's really helpful to watch this actually happen use your own computer so i got a link below download this package tracer file that i'm about to walk through go ahead and do it right now i'll wait for you if you pause otherwise here we go so using simulation mode we'll watch johnny go all the way across the network to access networkshop. com which is this server right here and order some delicious coffee so let's click on simulation and watch this in bullet time because it's it's amazing now as we go through this i want you to notice one thing i have our traffic filtered meaning that i'm only looking at http in https traffic web traffic things you might use to access a website i'm telling you this because you won't see things that we saw in the last video like arp requests to discover a device's mac address you won't see a dns query so johnny can discover the ip address in narc shock.
coffee if you want to see those things you can just go edit the filters right here you can unlock all those goodies so we're going to open up johnny's laptop here we're going to navigate over to his desktop and click on web browser we're going to type in https colon whack network chuck dot coffee and go now nothing happened because we're filtering traffic let me step forward in time and watch things happen there we go so we see here we have our blue message our blue packet that johnny is getting ready to send out in our simulation panel here you can actually see we have two separate messages why well one is what he's getting ready the other is what he's sending out to the switch let's open up that first one and take a look i'll just select that first message right here you can see we have our wonderful seven layers of the osi even though we're actually using tcpip again i'm telling you the networking world always uses the seven layers always so let's analyze this first johnny starts out by using layer 7. what's layer 7 it's our application layer what application is he using well we get a message right here because we have that layer selected the http client sends an http request to the server what that basically means is that johnny's web browser is attempting to access a website so simply this is the application layer the protocol we're using here is the http protocol and actually we're using the https because it's secure and encrypted but this is an example of an application layer protocol that is used by things like hey your web browser you're using that right now so johnny types in networkchuck. com into his web browser he hits enter and his computer gets to work and so again the application protocol we're using is https and the computer takes this data and gets it ready to send out now at this point the computer's goal is to get the data all the way down through the layers down to the physical layer so it can go across our ethernet cable through the internet to the other server to the networkchuck.
cof server but what's happening in all this mess what's going on let's talk about it now we're gonna skip these two layers for now we will go into more detail later but again typically they're meshed into the application layer anyhow so it's okay looking back at packet tracer we're on to layer four now layer four is our transport layer for now the way i want you to think about it is how can we transport the data how can we get it there and we really have two main options we can use tcp or udp now i'm not going to cover this super in depth right now but just know that when we use tcp it's more reliable it's when we want to make sure our message actually gets there we have mechanisms in place to make sure that if it doesn't get there we can send it again whereas udp is not as reliable as tcp and it's typically seen as a faster transport method so when it comes to the transport layer these are the two main options we have and then we have our ports now the destination port here is destination 443 you might recognize this port 443 is reserved for https traffic you might also be familiar with port 80 which is http traffic again we'll cover more in detail later but just know that that's what's happening right now so i'll move on down through our layers real quick put our data down here and the transport information we're going to use will slap on as a layer 4 header we'll attach that to our data and inside this header are things like hey we're going to be using tcp and we'll be using port 443 now what just happened here is important the process of taking our application data and then scooting it on down here and slapping on that layer 4 header that's called encapsulation this encapsulation process actually happened up here as well the web browser encapsulated whatever johnny wanted to send to the network coffee server which is him saying get me some coffee it's a message saying get me some coffee he encapsulated that into a http header which is our data the way i like to see this is let's say for example the data is like a message a letter we encapsulate that message into a http header which is our data when we moved on down to the transport layer we took that data envelope and we put it inside another envelope we encapsulated it and this new envelope has our data inside and this is our layer 4 header and that's the way i like to visualize encapsulation we'll keep taking our letters and just putting them inside other envelopes other letters until we get to the bottom which is our data link and i'll show you oh by the way this message right here when we have our data encapsulated with a layer 4 header attached we call this message a segment and now we're getting into familiar territory we're at layer 3. layer 3 again is our network layer and if you watched our previous video you know that layer 3 we're dealing with iop addresses we're dealing with routers love that stuff so in this layer 3 header we see that we have our source ip address and we have our destination ip address this ip address being johnny's ip address and this ip address being the ip address of the networkchuck. coffee server so we'll drag our segment down on to layer 3 and we'll encapsulate that segment by adding a layer 3 header and again our layer 3 header is going to contain the ip address information and we're basically telling our router where to send this we're giving our router directions we're saying hey mr router here's my source ip this is who the message is from which is 10.
1. 1. 3 and then the destination ip address which was 23.
227. 38. 65 now let's test your memory you would have learned this from the last video what is this new message we have what is it called what do we call that if you said packet you're absolutely right a packet has all the layers above it the transport session presentation application all those layers encapsulated with a layer three header telling the router hey here's where you send this info and now we're at layer two almost there layer two is our data link layer with data link our layer two we're dealing with mac addresses we're giving our switch directions to the next stop that our information is taking in this case it'll be our router here we have the mac address of johnny's laptop and here we have the mac address of the router so now i'll move down our packet into layer two and we'll slap on our layer two header and layer two also have a trailer as well and this will encapsulate it into a message that we call well what do we call it what do we call messages that deal with layer two that deal with mac addresses and switches if you set frames you gotta this message is indeed a frame a frame has all these layers encapsulated down and inside these layer two headers we have the directions for the switch telling the switch where to send his message so in this case we have the source mac address which is johnny's mac address and then we have the next stop the destination which is our router and that's pretty much it we've encapsulated all the layers down to a frame and now we can send that frame over the physical layer the ethernet cable so he hits the wire and boom and actually he's up here so he goes from johnny to the switch let's watch it happen in packet tracer if we step forward in time we see that frame go to the switch if we open up that frame we're only seeing layer one and layer two because the switch can't see anything else all these layers right here have been encapsulated down into this frame and when the switch receives his frame he's got this bulky envelope but he only opens the first envelope and he opens it up and goes oh well it's going to this mac address which if i look in my cam table my mac address table i can see that mac address belongs to this port i'm going to send it out this port that's where the router is see right here he looked it up and fast ethernet 06 is the port that the router belongs to let's step forward in time and watch it happen boom it goes out to the router and boom it also does it here if we open up that message the router did indeed receive a frame and he made sure that it was for him it came to his mac address he will then do the opposite of encapsulation he'll de-encapsulate it which basically means he opens the next envelope to see what the next layer says so he takes a peek at layer 3.
at this point we're dealing with the packet with the layer 3 header the layer 4 header and the data the router looks at the layer 3 header sees where it needs to go what is the destination ip address looks in his routing table he's like yeah i know where that goes i've got my map i'm a layer 3 guy and he then proceeds to send it out to the switch now something important happens here remember the switch can only deal with layer 2. if you recall from our previous videos the router has to somehow tell the switch how to get to networkcheck. coffee he has to tell him his mac address otherwise the switch will have no idea where to send it because he can't see ip addresses so after the router learns the mac address of networkchuck.
coffee using arp he encapsulates his layer 3 header which is the ip address information inside a new layer 2 header and he changed the source and destination mac address and he had to change it because before the message he received the source mac address was johnny and the destination was himself now he has to change it to being the source is himself and the destination is networkchuck. coffee so he encapsulates that it's now a layer two frame and he sends it off to the switch we'll step forward in time and pack a tracer here the message arrives at the switch if we open that up here we are again switch eyes we can only see layer two and layer one the switch looks in his cam table as mac address table sees that hey network check dot coffee does indeed live on fast ethernet zero one that's where i'm gonna send that sucker that's where i'm firing the electrical signals and he does that let's watch we step forward in time once more boom the frame goes to networkchuck. coffee if we open the message up we now have all the layers once more and here's what just happened the switch sent this frame to networkcheck.
coffee now because the server that runs networkcheck. coffee was built obeying the guidelines of the tcpip model when it receives a frame it knows exactly what to do it'll first do exactly what the router did look at the layer 2 header make sure that hey this is actually for me it's my mac address hey cool he'll take a look at the layer 2 header he'll open up that message and go oh yeah this is my mac address it's to me awesome he'll then de-encapsulate or open up the next message and look at the layer 3 header and go huh look it's for me too this is my ip address awesome he'll then de-encapsulate it once more opening up the layer 4 message and going oh hey we're using tcp oh and awesome i love 443 reasoning port 443 and then he sends it up to the next layer and then finally the last layer the application layer opens up that last message and goes oh it's for me https it's browser information it's website stuff awesome so real quick a thousand foot view what johnny had to do is he had to use the entire tcp ip suite encapsulating all this stuff down into a frame and then he sends this frame across the physical network across ethernet cables and such touching each device a switch a router another switch and then finally arriving at networkchalk. coffee networkchuck.
coffee took that frame and then de-encapsulated the entire thing to look inside and see what was meant for the web browser the application information of course in this case the data was a request for his web server johnny's wanting to buy some coffee and johnny's like hey i'm trying to get to the homepage of networkcheck. com can you give me the home page so i can shop so the web server reads that request which is inside the data and the whole process starts over again the networkcheck. cof server encapsulates all the information into a frame sends that to the switch the switch sends it to the router the router to the switch the switch to johnny and this is what johnny receives all right quiz time i hope you have your copy ready because these questions i chose are kind of difficult one is from the old ccna and one is from the old ccnp route exam so let's see what you got let's go question number one which of the following functions are performed by the application layer of the osi model select three choices now if you just started studying networking this could be a difficult question for you but when i encounter a difficult test question i start with the process of elimination so let's take out things that we know have nothing to do with the application layer which again is layer seven looking at this i think d is probably not it at all managing logical and physical addressing when i hear that i think mac addresses layer 2 definitely not layer 7.
another one that you might pick up on is that b is probably not the answer either ensuring error-free data delivery between devices this makes me think transport layer and specifically tcp tcp gives us reliable delivery of our packets of our data so now we're down to four choices and i'm gonna go ahead and select the right answers and i'll explain why a c and e let's see if i'm right boom now here's the tricky part though this is correct for the osi model so these three options are absolutely applicable to layer seven the one we didn't select down here the one we didn't eliminate this is part of the presentation layer which is layer six but as part of the tcp model layer six layer seven and even layer five are all clumped together in the application layer and if we had talked about the presentation layer in detail you would have known that this is not it but we didn't so it's okay if you didn't get this now c and e we probably could have just guessed that without having even known anything about layer seven managing communications between applications directing data to the correct program programs another word for applications a would have been a bit more fuzzy but just from the process of elimination we would have got that one question number two which of the following relies on a three-way handshake in order to provide connection-oriented reliable reliable data transfer between networked computers select the best answer now again this is a question that has terms you have not learned yet or possibly one of those being the three-way handshake we haven't talked about that yet but through the process of elimination we can look at these answers and go huh that's probably not that so for example arp when we talked about routers and switches we learned what arp does it's how a host on a network can find out what mac address belongs to a certain ip address so that's not it we can mark off a dns we saw what that was in our router video dns helps us map a friendly name like netflix. com or networkchuck. coffee to an ip address so that's not it and then down here even though it looks kind of weird rarp it stands for reverse arp and it's arp and reverse you got the mac address but you want to find the ip address so that's not it now we have two options and we just learned about these didn't we tcp and udp are two of the main protocols we can select when we are using the transport layer now out of those two options which of them do you think provide connection oriented reliable data transfer well udp no it's fast but it's not reliable tcp yeah it is if we select this answer and see if we're right we are right now if you got that right that's impressive that's a ccnp level question from the old ccmp route and the route exam i failed that three times three no two times it was a tough exam well guys that's about it if you like this video hit that like button if you have any questions or comments or need help with the ccna comment below or jump into my discord server i got a link below for that as well if you want to see more stuff like this more courses check out this is it.
Copyright © 2025. Made with ♥ in London by YTScribe.com