Walking Through OSI and TCP/IP

Total Seminars • 750,000+ Enrollments
A free video tutorial from Total Seminars • 750,000+ Enrollments
Home of Mike Meyers and his Team of IT Certification Pros
4.7 instructor rating • 39 courses • 418,736 students

Lecture description

In this episode, Mike takes an Ethernet frame through the incoming and outgoing processes, using both the OSI and TCP/IP models for reference.

Learn more from the full course

TOTAL: CompTIA Network+ Certification (N10-007)

Everything you need to pass the CompTIA Network+ Exam (N10-007) from Mike Meyers, CompTIA expert and bestselling author.

23:00:10 of on-demand video • Updated February 2020

  • You will learn the knowledge and gain the confidence to pass the CompTIA Network+ Certification (N10-007) exam AND the skills to be a great network tech.
  • Your new skills and the CompTIA Network+ Certification will help you land a network tech job or get that raise or advancement you are seeking.
  • This course is ideal as both a study tool and an on-the-job reference.
  • Learn new networking skills and prepare for the CompTIA exam.
English I love the comedian Steve Martin, the guy is an absolute genius! One of my favorite quotes that he makes is, talking about art is like dancing about architecture. And for those who are into the arts scene it makes total sense because, sometimes you just have to appreciate the art by enjoying it and encountering it. And to me that really is kind of like the OSI and TCP/IP models as well. The challenge with these models is we can draw the pretty boxes up and discuss each levels function, but until you actually watch it happen it doesn't really make sense for you. So that's what this episode is all about. I'm actually going to be putting on different hats and I'm going through interpretive dance, going to show you all of the different layers of the OSI and TCP/IP models and we're going to be doing this working with an Ethernet frame. Now in this scenario what's going to be happening is I'm going to first start off as a client system and I'm going to be just sending out a HTTP request to open up a web page, and then on the return I'll be acting like a web server who's actually bringing all this information back and we're going to see how every step in these models works together to make all this happen. So, let's go ahead and start all this. I'll be right back with a hat. Hi, I'm the lowest layer of both the OSI and the TCP/IP model. Now there's a lot of different layer pieces involved here. So for right now pretend like I'm a network card, and I'm just sitting around and I'm waiting for some data. Oh, here comes a frame now. So here is an Ethernet frame. Now with this Ethernet frame my job as the network card is really to first of all take a look at the incoming MAC address and verify that it's for me. In this case it is. So I can take this data. Now the first thing I'm going to do is I'm going to take a look at the frame check sequence, I'm going to check the entire Ethernet frame to make sure it's in good shape, and assuming that it is has a network card I can go ahead and strip this off and I can strip off the MAC addresses. Now if I'm a good network card, and aren't we all these days, I'll keep this information and I'll store this off to the side somewhere in memory primarily because I want the MAC address where this came from because later we might want to be sending a frame back out. So what I have at this point is an IP packet. Now my job as a network card is pretty much over at this point. So let's consider what we've just done. If we're taking a look at the OSI model we've basically covered layer 1 and layer 2. So we've got the physical layer and the data link. The physical layer is going to be really more of the actual connection I have to the outside world, the cabling and the hubs and all that type of stuff. And then the layer two or the data link is when I'm looking at the MAC addresses. Now on the TCP/IP model they make it pretty easy. They just call all of the stuff that I've just done the link layer. So at the link layer that handles both of the OSI's physical and data link. Oh, and by the way not only do you call this the link layer sometimes you also call it the network interface layer. So my job here is done. So what I need to do now is pass this IP packet up to the next layer. Thank you lower layers. Hi, I'm what you'd call in the OSI model the network layer, or if you're in the TCP/IP model it would be called the Internet layer. My job is real simple. I have to deal with IP addresses and that's pretty much all that I do, when I'm looking at these IP addresses my big first number one job is to make sure that this IP address is for me, and in this case it is so I'm happy. What I'm going to do is I'm actually going to pull this IP information off, and now that I've got this IP information, I'm going to get rid of this one because I know my own IP address, but I'm going to keep the IP address that it came from just as the lower layers will keep MAC address that they come from, I'm going to keep this for myself because I'm probably going to want to send an IP packet back in a little bit. So this is, I've got an easy job compared to a lot of the other layers. And what I'm left with is, well it depends on what type of packet, but in this case I'm left with what's known as a TCP segment. This TCP segment is designed and it's ready for my computer. The challenge now is to get it to the right applications and in the right format that those applications can use that. Luckily for me that's not my job. All I have to do at this point is pass it up to the next highest layer. Thank you lower layers. OK. Hi, I'm the transport layer and I'm actually kind of cool because I'm exactly the same on both the OSI and the TCPIP model. My job as the transport layer is to act as the assembler disassembler of data. Now keep in mind that what I'm holding right here is probably, well it depends, it could be all the data if this was just a simple HTTP request, this might be all the data in one little piece. But it could be other things. For example what if I have a big web page that's coming in, and what if I've got a big word document that I'm copying or what if I've got big chunks of data. Well that's what I'm all about. My job is to take data and if it's big and going out I'm supposed to chop it up into little bite sized chunks. Equally, if a bunch of data is coming in, my job is to reassemble all this data, and I'm going to do that using the sequencing number. The sequencing number is kind of like, if you've ever gone to U.P.S. and you got a whole bunch of boxes and it'll say one out of 20, 2 out of 20, 3 out of 20. Let's kind of like how sequencing numbers work as well. So, either I'm disassembling and adding sequencing numbers to individual TCP/IP segments or I'm getting a bunch of TCP/IP segments in and I'm going ahead and I'm reassembling them using the sequencing number. The bottom line is that at the transport layer things get a little bit strange. Now I'm going to keep my data, but not only am I going to keep my data I'm going to take the sequencing number off. Now keep in mind at this point this data is complete. Whatever it is, it's a complete chunk of data. The only thing left are my port numbers. Now these port numbers, they don't really get reassembled but I'm going to kind of pretend like they do. Because the next layers above me are going to need this. So, my job at the transport layer is done and I pass it up to the next layer. Thank you lower layers. Hi, I'm the very top of both the OSI and the TCP/IP model. Now on the TCP/IP model I'm just called the application layer. But on the OSI called session, presentation and application layer. So since TCP/IP makes a little bit too easy let's concentrate on the OSI side. The session layer is really designed to connect a server to a client on a remote system. Now on today's systems we have applications that are network aware. We have web pages, and e-mail, and FTP and World of Tanks and all these things. So on the TCP/IP model making a session doesn't really make sense. It's the applications the moment you fire them up. They are by definition going to try to connect to something, I mean try to fire up an email client and not connect to your e-mail server. Get the idea? Now back in the OSI days you would have operating systems that were not network aware. You'd have something like Microsoft Word and it couldn't save anything but a drive letter. So we used to have to have a distinct session layer that allowed us to connect to a remote system as opposed to say just saving to our hard drive. Now the next one is probably, in fact this should be should be erased in my opinion, and that's the presentation layer. The presentation layer was designed a bazillion years ago because we would get the data to a particular application but it wasn't in a form that the application itself could use. So you would have text files that were stored in weird things. You may have heard of ASCII files where there was a time when they had names like EBCDIC and crazy stuff like that. So the presentation layer is kind of pretty much disappeared. So that leaves us with the application layer itself. Now when we're talking about the application layer we're not talking about the actual applications. We're not talking about your actual web browser, we're not talking about your email client. We're not talking about your World of Tanks client. What we're talking about is the built in smarts that allows them to interface to a network. So my job at this layer is really more than anything else within TCP/IP, I'm taking a look at my port numbers, and my job at this point is to take a look at the port number, and I see that this is port 80, so I know that this needs to go to my web server. So what I'm going to be doing is I'm going to be taking this information off, and you'll notice that I have the return port number and again I'm going to keep this. I'm going to put it in memory someplace, in case we need to send that back later. So my job is pretty much complete. I know it's port 80 and I know to send this up to the right application and let that application do the voodoo it do so well. OK. Now that was fun but what I want to do now is actually reverse the process. What we just did is we took an incoming Ethernet frame and turned it into data that our applications can use. So what I want to do this time is start with some data and we're going to send out an Ethernet frame. So, let me start back up at the top and what I'm going to be doing is going to receiving data from an individual application. Now my job here is to make sure that this data gets to the right computer over there. So the first thing I'm going to be doing is I'm going to be taking the information, and this is the port numbers that I got from the incoming frames, and what I'm going to do is reverse them. So now the destination port number is going to be 1 4 2 3, because that's where it came in from, and the source port number is going to be port 80. Now I'm not going to put them together at this point. Basically what I'm saying is, this is the connection and I'm going to send it down to a lower layer. So I guess I need, I need another hat. OK OK OK. So, so now now I'm the next lower layer. So what I'm going to be doing here is the transport layer is going to be taking a look at this data. Now this is a lot of data and if I may a web server this is probably a great big web page so I'm going to have to bring in some sequencing numbers. I need some really bad magician music right now. There we go. All right. So I'm going to start breaking all the data up into individual chunks that are big enough for individual IP packets and I'm going to be making in this case a very pretty TCP segment. So once a TCP segments done now I have to go down to the next layer, and OK here we go, Here we go. So now I'm the network or the internet layer. And when I'm going to be doing is I'm going to be taking the IP information that I got from the original incoming data. And again since I'm sending it back to the guy you sent it to me I'm just going to reverse these and I'm going to plug that in. And now I've got my IP packet which is ready for the next layer, which is going to be, hate a hat backwards. OK. So which is the next layer which is going to be the physical layer or the data link layer or the network interface layer for the TCP/IP model, and in this case what I'm going to be doing is first of all I'm going to be putting on the MAC addresses, because I'm at Ethernet now, and, I'm not quite done because I have to go ahead and run another frame check sequence and get this guy in and, tada, I have now completed the process in reverse. and I send it out, very carefully, And the job is done.