CompTIA Network+ N10-008 – OSI Model Part 2

  1. Layer 4 (Transport Layer)

Layer four transport The transport layer is the dividing line between what we call the upper layers and the lower layers of the OSI model. We’ve already covered the lower layers when we talked about the physical datalink and network layers, and we’re going to talk about the upper layers, the session presentation and application, in the next three lectures. Segments are our data type. When we’re dealing with the transport layer, we deal with segments and also datagrams, and we’ll talk about datagrams a little bit more later. TCP and UDP are the two protocols we’re going to use inside Layer 4, and we have introduced a couple of extra reliability features called windowing and buffering. So what is TCP? Well, it’s the transmission control protocol. It is a connection-oriented protocol, and it is a reliable way to transport segments across the network because, if a segment is dropped, the protocol actually asks for acknowledgement each time.

And if it doesn’t get it, it will resend that piece of information. So let’s look at the little diagram here on the screen for a second. You’ll see that I have a client on the left and a server on the right. Now the client is going to send what’s called a “sin” or synchronisation packet over to the server. When the server gets that, it’s going to send back a synchronisation acknowledgement to the client. Now, when the client gets that acknowledgement, it’s going to send back its own acknowledgement to the server. And this is what we refer to as a “three-way handshake.” Essentially, it’s the client going: “Server, are you ready to get some information?” The server says, “Sure, send me some data.” And the client says, “Okay, here it comes.” And then the transmission starts because we have that three-way acknowledgement. Are you ready? Yes, I am. Here it comes. And then it sends the information. Every time data is sent across this segment, there is an acknowledgement that is received for successful communication.

So if the server is expecting to get 100 pieces of information but only gets 98, it will say to the client, “Hey, you told me you were going to send 100, but you only sent 98.” Send me those other two I’m missing. Communication can then resend those packets. This is used for all network data that needs to be assured to get to its destination. I like to think of this like certified mail. If I want to send a message to the IRS, for instance, I want to make sure they get it. So I’ll pay a little bit extra to get a certified receipt so that when they get there, it sends an acknowledgement back to me saying that they got it. That’s the way TCP works.

UDP, on the other hand, is a connection-list protocol, and UDP stands for User Datagram Protocol. And datagrams, if you’re using UDP, are the layer 4 data type. Remember, for the exam, we layer four segments almost entirely because we use a lot more TCP than UDP. Now, UDP is unreliable, and it does transmit segments called datagrams. But if these are dropped, the sender will be unaware. Now, why would I want to send stuff that is unaware of its receipt? Well, it’s good for audio and visual streaming because you can send a lot of data because there’s less overhead with UDP, so it increases the performance of your network, and there are no retransmissions. Now, is that a bad thing? Well, not for these applications. Let’s say I’m streaming this video to you and I drop out for one hundredth of a second. Would you even pick it up? Well, no. And that’s why UDP is so good: you can actually drop those one hundredths of a second here and there and never know it. But with TCP, it would lead to a lot more buffering because you’d have to have acknowledgement and overhead for every single second of this video. And that’s why we use UDP for video streaming and audio streaming. Now, let’s do a little quick summary of TCP versus UDP, because this is really important. So TCP is reliable. It has that three-way handshake. UDP, not so much. Very unreliable. TCP is connection-oriented. We have the three-way handshake and acknowledgements. UDP is connectionless; it’s fire and forget. I just started sending information, and hopefully you’re going to get it. TCP segment retransmission and flow control are handled through windowing, which we’re going to talk more about in a second. UDP, there’s no retransmission and no windowing. TCP allows us to segment and sequence our segments.

With UDP. There’s no sequencing. I send everything out in the proper order, from one to ten. And if you miss some pieces, we’ll just hope you get it all at the end. TCP, it acknowledges the segments, so we have that acknowledgement. And if I don’t get it, I go back and retransmit. UDP. No. Acknowledgment. So again, UDP has a lot less overhead because there’s no connection, no windowing, no retransmission, no sequencing, and no acknowledgement. So, if you need to get it there and want to ensure that the person received it, TCP is the networking protocol to use. Now, what is windowing? Well, windowing is going to allow the clients to adjust the amount of data in each segment as it goes through. And this will continually adjust to send more or less data per segment that’s being transmitted. And this will adjust it lower if you have a lot of retransmissions happening. But if you’re not getting any retransmissions, it’s going to keep going upward until retransmissions start happening again. So we’re trying to maximise our throughput here.

So if you’ve ever copied a file on a network on Windows that you’ve ever seen, like say, I want to move a movie file from my shared drive to my hard drive, what always happens for you? Well, for me, it’ll say 20 minutes remaining, and then it will go to five minutes remaining, and then 50 minutes remaining, and then 30 minutes remaining, and then an hour and a half remaining. And it’s terrible at estimating it. Well, why is that? Well, that’s when I’m at work. What’s happening here is that as there are issues on the network, it starts having to retransmit more, which increases the time. And so what happens is, as you can see here on the screen with this diagram, the green is what I’m sending, and I start sending information, but that red starts creeping up to the point where we start not being able to keep up with it. And so we’ll come back down until the red can creep up again. And hopefully, the red and green will eventually match at a higher level than they did before. But we start out slowly and then go faster and faster. For example, if I started counting numbers to you and went one, two, three, it would be quite slow. And you’ll say, “I got it.” Go faster. So I’ll start talking faster. 123450.

Wait, wait, not too fast. Okay, let me slow down again. One, two, three. You get the idea. That’s how windowing happens. It starts speeding up or slowing down the amount of information being sent so that you get it with the fewest retransmissions possible while still getting the maximum throughput. Buffering devices such as routers have a special memory in them that will store segments if the bandwidth isn’t readily available. Now, when available, it will go ahead and transmit the contents of the buffer and clear itself out. If the buffer is going to overflow, the segments will drop. So let’s look at an example of how a buffer is going to work. Consider bufferon router number four in our diagram. Notice how it’s kind of the central point of this diagram. So I have stuff coming into it from router numbers six, one, and three. If I look at all of those, there are 100 megabits, 100 megabits, and ten megabits. So that’s a possibility of 210 megabits persecond of information coming into router four. And if it needs to send that out to router 5, where there’s only a 50 megabit connection, you can see pretty quickly that there’s going to be a bottleneck there.

So what’s going to end up happening for us is that router four is going to have to catch it in the buffer and, when available, send the information to router five. Now you may ask, “Why would we design a network this way?” Well, often, what’s happening here is that there isn’t necessarily going to be 100% utilisation from router four to router five. In fact, Router 1 may only be sending 10 or 15 megabits per second right now. And router 3 may be sending you 30 and router 6 may be sending you one, which is all less than 50, so no buffering would occur. But there is the possibility that routers one and three send more information, causing that buffering to occur. What are some examples of layer 4 devices? TCP and UDP protocols, on the other hand, are layer four protocols. We also have things like Wan accelerators, where we try to add compression to our IP packets and those segments to get them across the network faster. We have load balancers and firewalls that operate at layer 4 by blocking and allowing different ports and protocols.

  1. Layer 5 (Session Layer)

Layer five is the session layer. So now that we’ve gotten into the session layer, layer five, we want to start thinking about what a session is. Well, the way I think about a session is that it’s a conversation that has to be kept separate from others to prevent the intermingling of data. So if you think about yourself in a classroom setting, there might be 20 students. And if I wanted to ask one of the students a question, the rest of the class could listen in.

Well, maybe I want to take that student and we’re going to walk out into the hallway so we can have our own session while the other students talk amongst themselves during their session. That way, we can separate those two sessions and each of us can talk at the same time. Well, that’s the idea here. We have a lot of data flying around these networks all day with the session layer. And by establishing these sessions, we can separate them to prevent the intermingling of that data. We’re going to set up sessions, maintain sessions, and tear down sessions here in the session layer. So what is “setting up a session”? Well, this is where we’re going to check our user credentials. We’re going to assign a number to each session to help identify them. And it’s some random number, and it’s going to allow us to negotiate services for that session with the server and negotiate who’s going to talk first. So in a classroom setting, again, if Johnny asked me a question, he was going to say, “Professor Dion,” and I would say, “Yes, Johnny.” And then we’ll start talking, right? We’ve established that session; I know who he is and what he wants. And then we start talking. Well, in a computer network, it’s a little bit more difficult, but that’s the idea behind it. The next thing we have to do is maintain that session.

And this is where we’re going to transfer the data back and forth across the network, over and over again. So in my classroom example, if some student had asked me a question, I would then say, “Yes, go ahead and ask the question.” Then they ask the question. We are now in the maintaining a session phase and now we’re going to go back and forthwhere I answer their question and see if I can answer everything they have for it. Right? The same concept can be found in the networks. Now that the session is established, we’re going to send all of our data back and forth. If we have a break in the connection, we’re going to have to reestablish that. So, for instance, I might say, “I’m sorry, I didn’t hear you say that.” Again, maintain that session. And I’ll acknowledge the receipt of the data, and I’ll say, “Did you understand my answer?” And they’ll say, “Yes, I did,” or “No, I didn’t.” If they did, they’ve acknowledged the receipt.

The same thing happens digitally with your networks. And that brings us to tearing down a session. So now that the student’s question has been answered in our analogy, I’ll say, does that answer your question? And they’ll say yes, and I’ll say, “Okay, we’re going to move on to the next thing.” And if they say yes, we’ll move on to the next question. That would be the end of that session, and I would go back to teaching. This is now done by mutual agreement. Once the transfer is all done, we’ll both verify that I’m ready to tear down the session. You’re ready for the session to be torn down, and we’ll tear it down. The other way we can take down a session is if the other party disconnects and we simply can’t reconnect.

So let’s go back to my classroom example. student asks a question. I go on a 30-minute diatribe, trying to explain every possible thing to answer his question. And I look up, and the student has fallen asleep. There’s no way for me to maintain that session. He’s completely asleep. He fell asleep, and he’s not listening anymore. Well, he’s disconnected from this conversation. I’m just going to stop teaching and move on to the next group of students who are paying attention and who are awake. That’s the idea here with tearing down a session; it will either be done mutually or the other party will just disappear. Now, what are some examples of layer five? There are two big ones that we’re going to talk about. Here are three, which are used to setup, maintain, and tear down voice and video connections. So if you’re using FaceTime or Skype or something like that, you could be using H 3 2 3, which operates over the RTP, or real-time protocol. And the other one we have is NetBIOS, which is used by computers to share files over a network. NetBIOS is a method for sharing files that is used in both Windows and other machines. And so you’ll see these as examples of layer-five devices.

  1. Layer 6 (Presentation Layer)

Layer six is the presentation layer. The presentation layer is responsible for formatting your data that’s going to be exchanged and securing the data with proper encryption. So anytime we talk about data formatting or encryption, I want you to think about layersix, the presentation layer inside the OSI model. What is data formatting? Well, data is formatted by a computer so that it can have compatibility between different devices. And there are some common ones out there that you may or may not have heard of. ASCII, which is the American Standard for computer information interchange, is one of those. Then there’s GIF, which is used for little pictures that dance around. And there are JPEGs, which are used for photographs.

Now, ASCII is where we have data in a textual format. So for instance, here on the screen, you can see that I’ve highlighted SSH 2.0, “blah blah blah,” which really is represented by ones and zeros, as you can see on the left of it. Now, I understand that the way we get from ones and zeros to something human-readable is through ASCII. It’s going to be a text-based language for us. This is going to ensure that the data is readable by the receiving system because we’re all speaking the same language, and it provides the proper data structures and formatting for it. This is going to negotiate data transfer syntax for layers. even the application layer, which we’ll talk about in the next lesson, and the next piece is encryption. This is the other thing that the presentation layer is going to do for us. Encryption is used to scramble data in transit to keep it secure from prying eyes. And this is going to provide us with the confidentiality of our data.

TLS, for example, is a transport layer security protocol that is used to secure data between your computer and a website such as Facebook, Deontra, or Amazon by creating an encryption tunnel that no one else can see and cannot see your username and password. Now, what are some examples of layer six? Well, scripting languages like HTML, XML, PHP, and JavaScript They will all instruct the text-based ASCII on how to display on the screen in a different way. For example, make this line bold; make this other line underlined; and make it size X font. Those types of things can all be controlled using things like HTML. We also have things that are just standard text, like Unicode, EBCDIC, and ASCII. Those are all different ways of displaying text from those ones and zeros. We have pictures like GIFs and JPEGs, and TIFFs and SVG for vector graphics, and PNG for photographs. We have MP4 files, MPG files, and MOV files. All of these will demonstrate how to take those ones and zeros and turn them into minto movies like the ones you’re watching right now. And then we also have the encryption algorithms like TLS and SSL, which will tell us how to secure our data. Now, the first four bullets here on the screen are all presentation styles. How do you take those ones and zeros and present them differently? The last lines here are TLS and SSL. Those are encryption styles. How do we secure the data in a jumbled format so nobody else can see it?

  1. Layer 7 (Application Layer)

Layer seven, the application layer So we finally made it. We’ve gone through seven different layers of the OSI model, starting all the way down with physical, going to datalink, network transport, session presentation, and finally application. The application layer is going to provide application-level services. Now, don’t think of an application like Internet Explorer or Chrome Home or Word, PowerPoint, or Notepad. Those are the applications the end user is going to use.

But when we’re talking about applications in the OSI context, we’re really talking about things more like file transfers, right? or network transfer. This is the layer where the user is going to communicate with the computer, and the computer can then take that information and pass it across the network. These are functions like application services and service advertisement, and we’ll talk about those as we go through this short lecture. Application services are the things that unite communicating components for more than one network application.

So if I have file transfers and filesharing, email, remote access, network management activities, and client-server processes, these are all application services. Now, again, I want to caution you: when I talk about email, I’m not talking about Microsoft Outlook; I’m talking about the protocol used by email. Things like Post Office Protocol 3 (POP3) or Internet Message Application Protocol (IMAP) or other things of that nature And we’ll talk more about that as we go through ports and protocols in a future lesson. Service advertisement: this is where applications can send out announcements to other devices on the network, so they can actually say the services that they offer. So if you have something like a printer that is essentially managed by Active Directory or a file server managed by Active Directory, it can do the advertisements for you, if not your files.

For example, if you have a nice wireless printer that’s on your network, anytime you connect to the wireless network, it’s actually sitting out there going, Hey, brand new device, I don’t know, I’m a printer, and you can use me to print. That’s what it does. It advertises itself. So that is all done underService advertisement here in layer seven. So what are some examples of layer seven? Email clients such as Pop3, IMAP, and SMTP; web browsing clients such as HTTP or HTTPS domain NameService, or DNS, which will translate names into numbers and numbers into names; file transfer protocols such as FTP and FTPS; remote access such as Telnet and SSH; and Simple Network Management Protocol, or SNMP. Now, if it just sounds like I threw out acronym soup to you, don’t worry; we are going to talk about each and every one of those in future lectures as we go through this course. So just hang with me, and by the end of it, you’re going to know all of them like the back of your hand.

img