Skip to content
CBT Nuggets
DemoBook a Demo

Understand the OSI Model

This skill provides an in-depth understanding of the OSI Model, a foundational concept in computer networking. It explores each of the seven layers, detailing their functions and significance in data transmission across networks. The skill contrasts the OSI Model with the TCP/IP Model, highlighting their differences and practical applications in network troubleshooting. Key concepts such as logical and physical addressing, data encapsulation, and protocols like TCP and UDP are thoroughly examined to equip learners with essential networking knowledge.

Full skill from HPE6-A86. Preview the IT training 23,000+ organizations trust.

48m

Skill 1 of 28 in HPE6-A86

Introduction

Let's discuss what we plan to learn in this skill!

What is the OSI Model?

The OSI model consists of 7 different layers. Whilst it does not accurately model the reality of modern networking, it is referenced extensively within the industry. In this video we discuss what the OSI model is, why it is important and contrast it against the TCP/IP model.

Knowledge Check

Which layer in the OSI model is responsible for establishing, managing, and terminating sessions between applications?

Application, Presentation and Session Layers

In this video we explore the top layers of the OSI model. Namely the Application, Presentation and Session layers. Let's dive in and find out what operations are performed within these layers!

Knowledge Check

Which layer of the OSI model is responsible for handling encryption and data formatting?

The Transport Layer

Now let's turn our attention to the fourth layer within the OSI model - the transport layer. We discuss what is controlled at the transport layer and discuss two very important protocols - TCP and UDP!

Knowledge Check

Which protocol is used for reliable data transmission at the transport layer of the OSI model?

The 3 Way Handshake

The 3 way handshake is the vital first step in establishing a TCP connection. It is used to ensure both parties are ready and able to transmit and receive data. In this video we walk through how the TCP handshake is used to create reliable connections and identify potential problems when data is lost or corrupted.

Knowledge Check

What is the correct sequence of messages in a TCP three-way handshake?

The Network Layer

The network layer is defined via the use of "packets". This is the layer used for logical addressing in the form of IP addresses. In this video we discuss the purpose of layer 3 addresses and highlight the role of routers in moving packets across different networks.

Knowledge Check

Which of the following is a primary function of the network layer in the OSI model?

The Data Link and Physical Layers

The last 2 layers in the OSI model are the data link layer and the physical layer. These layers deal with data frame and binary bits. In this video we discuss the use of MAC addresses and how data is transported across physical media!

Knowledge Check

What is the primary purpose of the Data Link Layer in the OSI model?

Validation

Let's now validate what we've learned in this skill with a series of questions:

Knowledge Check

Which layer of the OSI model deals with "segments"

Knowledge Check

Which layer of the OSI model deals with "frames"?

Knowledge Check

Which layer of the OSI model deals with "packets"?

Knowledge Check

Which layer of the OSI model deals with "bits"?

Knowledge Check

Match the layers of the OSI model to the layers within the TCP./IP model.

This interactive assessment is available in the full learning experience.

Want to answer questions like this yourself?
with no purchase required. Already have an account?

Knowledge Check

Match the OSI layers with the correct value.

This interactive assessment is available in the full learning experience.

Want to answer questions like this yourself?
with no purchase required. Already have an account?

View Transcript

Introduction

0:00Hey friends and welcome to the HPE Aruba Networking Certified Associate course

0:05here on CBT Nuggets.

0:07So in this opening skill what we're going to be talking about is some

0:10foundational topics

0:11related to computer networking. More specifically we're going to be looking at

0:16something known

0:16as the OSI model. So let's discuss the seven layers within the OSI model. We'll

0:21discuss what

0:22each one actually does and the first thing we'll begin talking about is

0:25something known as the

0:27application presentation and session layers. So with that said let's just get

0:31to it.

What is the OSI Model?

0:00So friends to kick off this skill, what I want to do is to first talk to you

0:03about the concept of modeling and

0:06And no, I'm not talking about a catwalk or a runway type of modeling. What I'm

0:12talking about here is the ability to model

0:15How data is actually transported across a network?

0:18So say for example you on perhaps this machine here wanted to talk to this

0:22server over here. How does the data actually get from

0:26Your machine all the way through all of these different nodes end up in the

0:30server whereby the server can understand your request

0:33And ultimately relay it back with the correct response directly to your machine

0:38without any particular issues

0:40Well as you can imagine for this to actually happen

0:43There is a lot of complexity going on and in order to understand the complexity

0:48We want to break down each component into individual steps and this is what we

0:52're modeling

0:53We're modeling the actual steps taken when we send data from point a all the

0:58way over to point b

0:59Now the most well-known model that was ultimately developed way back in the

1:041970s as the OSI model

1:07Now all OSI stands for is open systems interconnect

1:11And basically what we do describe the connection from say for example

1:15This device here to another device within a network

1:17It has been logically broken down into seven distinct steps

1:22Now let's plant a flag before we go any further. So we have the application

1:26layer

1:26The presentation layer followed by the session layer the transport layer the

1:31network layer

1:32Then the data link layer and then finally the physical layer

1:36So what we're going to do in this particular skill is we're going to talk about

1:39each of these individual layers

1:41And describe what they actually bring to the table how they actually play a

1:45part in facilitating this connection from here

1:48All the way over to here now very very important point to note

1:51These seven layers they actually are not how things really operate in reality

1:56So upon hearing that you might think so if this is not how things are actually

2:01done

2:01Then why even bother doing this at all but quite honestly this is more of a

2:05helpful utility

2:06Whereby we can easily identify layers in isolation

2:10So if you want to troubleshoot a very particular issue say for example, you say

2:14hey

2:14I'm going to troubleshoot a transport layer issue

2:18That refers to a very precise portion of the communication very very different

2:22from say for example examining a data link issue

2:25Now the way things work in reality is actually more closely modeled via

2:29something known as the tcpip model

2:32Now the tcpip model is really quite similar but it happens to combine some of

2:37the layers within the osi model together

2:39So in the osi model we have the application layer the presentation layer as

2:43well as the session layer

2:45And the osi they're all subdivided very very clearly whereas in the tcpip model

2:50all of these different layers are simply just

2:52Aggregated and referred to as the one application layer. Okay. So what does

2:56this layer actually cover?

2:57Well, again

2:58We'll talk about all of these individual components as we progress throughout

3:01this particular skill

3:02Now the next layer in the osi model happens to be the transport layer and the

3:07good news is is in the tcpip model

3:09This one is still the exact same basically the model the exact same thing

3:14similarly

3:14With respect to the osi model we happen to have the network layer

3:18And this is kind of the same thing in the tcpip layer

3:22But it's known as a different name

3:24It's referred to as the internet layer and then finally when it comes to the

3:29last two layers in the osi model

3:31This is the data link layer as well as the physical layer

3:35These last two in the osi model are ultimately combined and just referenced as

3:39the network access layer in tcpip

3:42So ultimately in the tcpip model what we get is this the application transport

3:47internet and network access layer and this much more closely models

3:51How things are done in reality?

3:53But like I said the osi model is still very very important

3:56It's used all the time to reference particular problems within troubleshooting

3:59scenarios

4:00It gives us a model to much more precisely diagnose particular issues

4:04So it honestly is very important that we understand how each layer actually

4:09operates

4:10So to get things kicked off let's go and begin first talking about the

4:13application presentation and session layers

Application, Presentation and Session Layers

0:00Alright friends, so let's begin talking about the application layer within the

0:04OSI model.

0:05So the first thing to state about the application layer is that it's referenced

0:09as layer 7.

0:11This is the highest layer within the OSI model and you can kind of conceptual

0:15ise this

0:16as the way the end user, such as you or I, actually interacts with the network

0:21itself.

0:22So what exactly do I mean then? Well imagine you happen to be over here,

0:25let's say this is you on your little laptop or computer and you want to go and

0:30access a web

0:31server out on the internet. How on earth would you actually do that? Well what

0:34you could do is you

0:35could open up your web browser and quite simply you just type in the page that

0:40you want to go to

0:41and suddenly you happen to reach it. Now there is a lot going on in that single

0:45transaction there

0:46but the way we interacted with the service itself is via something known as

0:51HTTP which is the

0:53hypertext transfer protocol. More accurately though, you probably will use in

0:58modern terms HTTPS,

1:00this is the secure version of HTTP with encryption. Alright start the bus there

1:05, start the bus.

1:06This particular protocol, HTTPS, this is actually operating at layer 7 of the

1:12OSI model. So whether

1:13you happen to be using Firefox or you happen to be using Chrome or Edge, the

1:17same application

1:18layer protocols are ultimately in play, HTTP and HTTPS. But quite simply hyper

1:24text transfer protocol

1:26is not the only layer 7 protocol that we can use. Say that we as the end user

1:31want to access email

1:32services, okay? So what do we do? Well we can use things like Outlook or you

1:36can use things like

1:37Gmail and ultimately under the hoods they happen to use a whole bunch of

1:41different protocols. Now

1:43we don't really have to talk about these different protocols, certainly not

1:46quite just yet but

1:47just understand that these protocols are actually in place. So say for example

1:50we have SMTP which

1:52is the simple mail transfer protocol. This is how emails are actually sent

1:57between servers and the

1:58way we can actually receive our emails is going to be using things like IMAP4

2:03or maybe even POP3.

2:04Now once again, despite being very very different from hypertext transfer

2:09protocol,

2:09all of these protocols right here they are also operating at layer 7 and in a

2:15similar way if

2:16you want to maybe transfer files from a particular server to another server

2:20over the network once

2:21again. Well there are even more protocols we can use such as FTP which is file

2:26transfer protocol

2:27or we could use SFTP, the secure version of that protocol or similarly we could

2:32use

2:32SCP for secure copy. All of these protocols allow us to do just that copy files

2:38from one location

2:39to another and again these particular protocols are once again acting at the

2:44application layer.

2:45All of them essentially are our bridge as the end user to the underlying

2:49network that we want to use.

2:50Let's talk about the next layer. The next layer as you may imagine is going to

2:54be layer number six.

2:56Now this one here is referred to as the presentation layer. So what does this

3:01one do? Well let me tell

3:02you. So again let's say we are over here on our laptop here and we want to

3:07reach a web server over

3:09here. Let's imagine that this is google.com or something okay. We know via the

3:13application layer

3:14we can use HTTP or rather HTTPS as we would in the modern day and we can

3:18ultimately establish

3:19that connection and get the data back but the data itself has got to be

3:24formatted in a particular

3:25way and we've also got other considerations about how we want the data

3:30presented to us.

3:31Would we like say for example the data to come back in an encrypted form? Well

3:35if that is the case

3:36the data is going to be encrypted on the wire and then decrypted at the end

3:41points so that ensures

3:42that as the data is actually traversing the network it's not readable to any

3:47type of eavesdropper

3:48but it also means that the data is readable to you on your end station when you

3:52get it back on your

3:53browser. The handling of encryption and decryption well this is going to be

3:58handled via the presentation

3:59layer. It's how the data is going to be presented in a similar way. Perhaps we

4:04want to have the data

4:05compressed. How on earth is this going to be handled once again? This is just

4:09yet another task

4:10of the presentation layer in a similar way. What about the data actually being

4:15formatted? Say for

4:16example is the data going to come back in ASCII or maybe the data is coming

4:20back as a JPEG maybe

4:22the data is going to be presented as an mp3 or maybe even the data is coming

4:27back in some type of data

4:28format like JSON or maybe even XML. Now it doesn't matter if you know what JSON

4:33and XML are absolutely

4:35not but not focused on that at all. These are just file formats that are very

4:39popular when

4:40machines want to talk to other machines. That detail isn't actually what is

4:44important.

4:45The important part is that whether or not we're using JSON or XML or we're

4:48dealing with jpegs and

4:49images or ASCII and regular text. All of that stuff along with encryption and

4:54compression this

4:55is once again all handled via the presentation layer number six which then

4:59leads us to the next

5:01layer that I just want to talk to you about and you already know the number

5:04this is going to be

5:05layer number five. So this one here is known as the session layer and the name

5:10itself really is

5:12quite descriptive. It's going to allow us to manage connections between the two

5:16endpoints. So this

5:17device here talking to this device here. So in fact you know what let's maybe

5:20say you are here

5:21and I am over here okay. We want to connect over the network and have some type

5:26of video

5:27conferencing call okay. Now in order for this connection to actually begin we

5:31've got to do a

5:32few things. We've got to first establish the connection with one another using

5:36things like

5:36authentication. So we're actually talking to the correct person when we happen

5:40to be talking we

5:41want to ensure that the audio and the video is actually correctly in sync with

5:45one another

5:46and if we happen to get some type of glitch in the network and the connection

5:50temporarily drops

5:51we do not want to have to start the meeting all over again instead we would

5:55much rather just have

5:56the application itself just kind of figure that out. Everything I've just said

6:00here

6:01is ultimately controlled via the session layer layer number five. So that is

6:05our introduction

6:06into the application presentation and session layers layers five six and seven.

6:11Let's now move

6:11on and talk about the transport layer layer number four.

The Transport Layer

0:00So friends, the next layer of the OSI protocol, OSI protocol, OSI model, this

0:06one is known

0:07as Layer 4, otherwise referred to as the transport layer.

0:11The whole purpose of the transport layer is really about facilitating what is

0:15known as

0:16end-to-end communication between our devices.

0:19So really we're talking about how connections between devices are established,

0:23how they

0:24actually are maintained throughout their life cycle, as well as how we can tear

0:27down that

0:28connection once the data transfer is over.

0:31Now just for clarity and posterity, the data at this particular layer is

0:36referred to as

0:37segments.

0:38Alright, first things first, very, very important.

0:42Two well-known protocols happen to operate at this layer.

0:46The first one is known as TCP.

0:48The other one, this one is referred to as UDP.

0:51So the name for TCP or rather the acronym for TCP actually stands for the name

0:57Transmissions

0:58Control Protocol, really, really important protocol, very, very useful.

1:03The UDP protocol, this one is referred to or rather stands for User Datagram

1:08Protocol.

1:09Alright, so apart from having different names, what actually is the use case or

1:14the purpose

1:15of having two distinct protocols to work at the same layer?

1:19Well, as a high-level overview, this one here is the one we want to use when we

1:25want

1:26to establish a reliable connection.

1:28So when the data between sender and receiver, we want to ensure that the

1:31receiver gets all

1:32of that data, and if any data happens to be lost or corrupted, we want the

1:37protocol to

1:38notice this and to re-transmit that data so that ultimately it can be rebuilt

1:43at the

1:43end point and nothing is lost.

1:46When we want to do this, we're going to be using our friend, Transmission

1:50Control Protocol.

1:51Now you can maybe imagine that this is a little bit involved to ensure that all

1:55the

1:55data is always sent and if it's not, we re-transmit.

2:00The drawback of doing this is that ultimately we get a slower connection and

2:04this also actually

2:05adds overhead to the connection itself.

2:07So more data slows things down.

2:10This is the price we pay for reliable transmission.

2:14So you might be able to imagine what the benefits and drawbacks are for UDP.

2:19UDP is not reliable in the sense that it's not going to re-communicate any type

2:24of lost

2:25or corrupted data.

2:26UDP is kind of like a fire hose just going blaaaand just sending all the data

2:31all at

2:31once it doesn't care if any gets lost.

2:33It's just fire-hosing this data towards the end point destination.

2:37Now whilst this might sound a little bit reckless, it might sound sub-optimal,

2:41the use case here

2:42is that because UDP doesn't concern itself with the re-transmission of data, it

2:47's also

2:48going to be much more lightweight.

2:50So now we have a faster connection with less overhead.

2:54Now for clarity here, you as the end user, you're not going to be concerned

2:58with picking

2:59a particular protocol.

3:01You're not going to say hey I want to use TCP, hey I want to use UDP instead.

3:05This is going to be handled via the upper layers within the OSI model.

3:09The application layer is going to handle this for you transparently.

3:12Now okay, very very important.

3:15This part here really lets you know that you're working with the transport

3:19layer.

3:20Remember we're talking about utilising particular ports, we're talking about

3:25operating at the

3:26transport layer.

3:27Now just to be clear here, we are not talking about physical ports, you know

3:31like taking

3:32a cable and plugging it into the port of a computer.

3:36This is not the same thing at all.

3:37We are talking about logical ports, these are just end software and used to

3:41ultimately

3:42differentiate between different services.

3:45So let's imagine this, okay?

3:46Here I am over here, this can be my little personal PC within my local network.

3:52And let's go with all the way over here, this server, let's give it the IP

3:56address of let's

3:57maybe go with, so I don't know 192.168, let's go with 2.10.

4:02So I over here want to talk to this server over there.

4:06Now this server actually has multiple different services that it actually

4:10supports, so it's

4:11got web services.

4:13So it's going to allow connections over HTTP.

4:16It also allows for secure web access, so it also supports HTTPS, the secure

4:22version with

4:23encryption.

4:24Let's maybe say it also supports the ability to handle SSH connections which is

4:29often used

4:30for secure management of a server, as well as a whole bunch of others.

4:35We're not too concerned about the details of what it might be actually running.

4:38The thing I want to highlight here is that I over here want to connect to this

4:42server

4:42and I'm going to connect over this IP address, what is going to differentiate

4:48between if

4:48my connection to this server, if say for example I'm using a web browser to

4:53manage the connection,

4:54how do I differentiate whether I'm going to be connecting over HTTP or I'm

4:58going to wrap

4:59the connection and encryption and use HTTPS.

5:02Well, drum roll please, the way we're going to do this is via the use of our

5:06logical ports.

5:08The connection is not just specified with the IP address, we also add on a

5:13little colon,

5:14let me just remove this, and then specify the port number, so if you want an un

5:18encrypted

5:18connection, we specify port 80.

5:21And now, we get the connection to the server, it's unencrypted and anyone can

5:26read it.

5:27If we're not happy with this, what do we do?

5:29Specify the logical port of 443 over the transport layer once again, now the

5:34connection

5:35between these end devices is going to be fully encrypted and protected from any

5:39potential

5:40eavesdroppers.

5:41Now, one thing to state here is that when I'm specifying these port numbers,

5:45that is not

5:46the full story.

5:47In the case of say for example HTTP, whilst it does use port 80, it also uses

5:53TCP port

5:5480.

5:55Okay, this is very, very important.

5:57This is going to be a reliable connection.

5:59Any errors or any type of loss data is going to be retransmitted.

6:03This is the standard here.

6:05Similarly for using HTTPS, you can imagine it's going to be port 443, but also

6:10wanting

6:11that reliable connection, it's going to be TCP port 443.

6:15In fact, even the other example I was giving to you, SSH, this is going to be

6:20port 22.

6:21Once again, though, it also uses TCP.

6:23So you might be thinking, John, does everyone just use TCP?

6:26Is there ever a use case for UDP?

6:28And the answer for that is absolutely yes, very, very often.

6:32If you happen to be dealing with say, for example, real time data, you can

6:37imagine if

6:37you are, let's go with an a zoom meeting, okay, some type of teleconference.

6:42In this case here, we are going to be utilizing UDP for the transport.

6:47Here's the reason why.

6:48For a start, UDP is lightweight.

6:50It's fast.

6:51We want that for real time communication, but also think about it.

6:54In the event that we lose data, let's just draw it out.

6:57Once again, let's say here I am over here.

6:59Here you are over there.

7:00Let's say we are connecting over, let's say, Skype to our devices.

7:04If along the way, as we are streaming data to one another, let's say some of

7:07that data

7:08happens to be temporarily lost or corrupted.

7:11You know, something happens in the network.

7:13There's a little blip.

7:14Some data doesn't actually make it from you to me.

7:17So the net effect of that is I, as the end user, I am watching my screen, I see

7:21your face.

7:22I can hear you talking and maybe in the actual audio, I get a little bit of

7:27distortion in

7:28the sound.

7:29But you've all heard it before.

7:30The picture resolution maybe dips a little bit temporarily.

7:33The audio becomes a little less clear.

7:36But then the connection resolves itself.

7:37The HD comes back.

7:39The actual audio comes back, nice and clear.

7:41Nobody actually cares.

7:43What use therefore do you really have for retransmitting that lost data?

7:48Think about it.

7:49You and I are having a conversation in real time.

7:51Let's maybe say half of a word that you said gets cut out or clipped.

7:56The conversation is continuing on.

7:58Does it really make sense to retransmit that data and get the missing word five

8:03seconds

8:04later and then just insert into the communication.

8:07Doesn't make much sense at all.

8:08So in this case here UDP is actually the way we're going to handle this end to

8:13end communication

8:14between these two end devices.

8:17Speed and low overhead is all we're actually after.

8:20Now here's another example.

8:21Let's maybe say that I want to access this particular server.

8:26Okay, let's maybe say it's a web server.

8:28Now this web server is let's maybe say we just know the name of the actual

8:32address.

8:32So let's say it's called server one dot CBT nuggets dot com.

8:37Now the way we actually communicate is via IP addressing.

8:41But the problem is is that I don't know the IP address of this particular

8:44server.

8:45The way we actually get this is by taking the domain name we see right here and

8:49we resolve

8:50that to the servers actual IP address.

8:53The way we resolve it is via the main name system, a DNS request.

8:58Now we will talk about DNS in more detail later on.

9:00But for now just assume that let's go with this server right here.

9:04Okay, this one on my local network is my DNS server.

9:07It's just there to resolve these types of names to IP addresses.

9:11So effectively I make a connection to my own server here, the DNS and I ask you

9:17the question

9:17hey, what is IP address associated with this particular name?

9:22Now you see that little request I just made right there.

9:25This was also made over UDP and it's been made over UDP port 53.

9:30This is the well known port for DNS requests.

9:34So what the server ultimately does it responds back over the UDP connection

9:38gives my device

9:39the IP address information.

9:41Now I know the IP address I can therefore make the connection over TCP this

9:46time to the

9:46web server.

9:47Over let's go with port 443 so it's nice and encrypted and fully secure.

9:52Now just notice all the nuance here.

9:55Sometimes we're asking for a very particular request such as DNS.

9:59How we doing that?

10:00We're using port numbers, we're using the transport layer when we want to build

10:03the

10:03connection to the web server whilst we are also using other layers such as the

10:07network

10:07layer but also relying on that transport layer.

10:11In this case here utilizing port 443.

10:14So really when we're talking about the transport layer we're talking about port

10:17numbers we're

10:18talking about two very particular protocols UDP and TCP we know their

10:22advantages and disadvantages.

10:25One is reliable, one is very fast but that is something very very important

10:29about this

10:30reliability that we get with TCP.

10:32The way this is actually instantiated is via something known as a three way

10:37handshake.

10:37I know that sounds pretty pretty cool.

10:39So how about we talk about that in the very next video.

The 3 Way Handshake

0:00Alrighty then, so let's talk about the three-way handshake.

0:03Now, first things first, to be clear, the three-way handshake is a function of

0:09TCP.

0:10This is not something we're going to be doing when establishing a connection

0:14over UDP.

0:16So let's talk about how the actual mechanics work then.

0:19So let's imagine we happen to have a machine on the right here, on the right,

0:23on the left here.

0:24Let's just call this PC1.

0:26Okay, super creative name, I know.

0:28And on the right hand side, we have PC number two.

0:32So here's the deal.

0:33PC1 wants to talk to PC2.

0:36We want to have a reliable connection over TCP.

0:39So we're going to have to establish that everyone is a okay with this

0:44connection coming through.

0:45The way we do this is by establishing the three-way handshake.

0:49So it consists of three particular parts, no real surprise there.

0:53The very first part is something known as a SIN message.

0:58And as a SIN with AY, it's basically a message for synchronization.

1:03So the first thing is we do is we send off the SIN message to what will be a

1:07receiver.

1:08And the receiver, if everything is AOK, we'll send their own response back.

1:13And this response is going to be something known as SIN.

1:16Now, the SIN portion might be self-explanatory.

1:20It's the exact same type of message as we just saw above.

1:23The difference though is we have this additional acknowledgments.

1:27Now, before we go on, any further, let's just close off this three-way

1:31handshake.

1:31Once the initiator receives the SIN ACK, what is then sent is the third and

1:38final component of the three-way handshake.

1:40And that's just simply an ACK message, basically an acknowledgement.

1:44So in a regular conversational style way, what is happening is PC1 says,

1:50"Hey, Mr. PC2, I would like to talk to you. Are you ready for this?"

1:53PC2 is up for a good old chat and PC2 says, "Yup, I hear your request and I'm

1:59ready for it."

2:00Would you also like to talk to me, hence its own SIN message?

2:04And PC1 goes, "You betcha. Let's begin this conversation. Here is your

2:08acknowledgement."

2:09So once this has happened, both sides are waiting and ready to participate.

2:14PC1 can now begin sending data to PC2 as they expect.

2:19Now, these are the three main components of the actual handshake,

2:23but there actually is something else that we're missing out here that is

2:27something known as a sequence number.

2:28And this is going to kind of play into the fact that TCP has reliability.

2:33Remember, if we happen to lose a packet or have a packet corrupted,

2:38the TCP protocol is going to be built in to handle that type of issue.

2:42So let me just describe it a little further with a little bit more detail.

2:46Once again, PC1 on the left, that's the sender, PC2 on the right, the receiver.

2:52So we already know the first message is going to be a SIN packet,

2:56but this packet is also going to include an initial sequence number.

3:01And this is just in numerical value chosen by PC1.

3:05Now, the value itself that happens to be chosen isn't really that important.

3:09Whether the number happens to be 1000 or the number happens to be 5 or the

3:13number happens to be 3520,

3:16the initial number is not what is important.

3:18What happens to that number though is, so let me describe it.

3:22So let's imagine in this packet here, we send the sender quest and we also have

3:27this sequence number.

3:28So let's just say this is sequence number.

3:31Let's go with 100.

3:32Nice simple number, okay.

3:33Now we know PC2 is going to respond with its own SIN Act.

3:37So let's just draw out the packet right here.

3:39This is SIN Act coming back.

3:41Now, similar, this particular device here is also going to choose a randomized

3:46numerical value for its sequence number.

3:49So let's just imagine that this one happens to use the sequence number of let's

3:53go with 5000.

3:54So we'll say sequence is 5000.

3:57But as a part of the Act message is going to send an numerical value associated

4:01with that Act and that is going to be

4:04the value of the initial sequence number that was sent and be simply incre

4:09mented by one.

4:10Here's what's happening.

4:11PC1 over here chooses a number at random.

4:14This is 100, no case here.

4:15That is then communicated to PC2 in the form of the initial SIN request.

4:21And in the response, we take that number and add one to it and the

4:24acknowledgement.

4:25Pretty much what we're saying here is that we are ready to receive the packet

4:30with sequence number 101 next,

4:33which is the next one in line that PC1 would send.

4:36We just incremented by one.

4:37But remember the acknowledgement is only one portion of the SIN Act.

4:42We've also sent our own sequence number right here.

4:45So can you predict what the response from PC1 and its acknowledgement message

4:50is actually going to be?

4:52Well, like we say, we know we're going to get the Act back right here.

4:55So in fact, let me just draw this here as the packet coming back at the Act

4:59message.

5:00Now, that actually is two numbers that are going to be associated here.

5:03There is going to be a sequence number.

5:05And what do you think that sequence number is going to be?

5:07It's going to be the exact same value as the previous Act right here because

5:12remember in this message,

5:14PC2 is saying, hey, the next thing I'm expecting, not actually have received,

5:18but I'm expecting will be sequence number 101.

5:22And this is exactly what we're getting here.

5:24Sequence number 101 is indeed the one that's been sent.

5:27Now, we also have to remember for sending an acknowledgement and what is it?

5:31But actually acknowledging we're saying, hey,

5:34I saw your sequence number of in this case, you're 5000.

5:38The next one I would expect would be 5000 and one.

5:42And then from this point on, once the connection has been established,

5:45we can then begin sending our data with these sequence numbers intact.

5:51All right, so let me just try to simplify this a little bit more so we can

5:54actually just identify

5:55how these sequence numbers help detect errors.

5:58OK, so PC1 on the left PC2 over on the right.

6:03PC1 begins by sending over a message.

6:06And let's for now just really focus on the sequence numbers.

6:09OK, so we send the packet over with sequence number of let's go with,

6:12I don't know, let's say number 12.

6:14OK, what is that act coming back from that then?

6:17Well, the act message to acknowledge the previous sequence number is going to

6:21take the number plus one.

6:23So we're going to send an act back of 13 pretty much saying, hey,

6:26I got your message with sequence number 12.

6:29The next one I expect from you will be 13.

6:32Now let's just say this particular device, PC1 sends a bunch of messages

6:36and for some reason they don't get through.

6:38OK, so PC1 then sends another message which finally does get through.

6:42However, it's got a sequence number of let's go with 16.

6:45Now this device here is going to notice, hey, you just sent me a message of

6:51sequence number 16.

6:53The number I was actually expecting was 13.

6:56Therefore we have a mismatch here and I can interpret that as at some point

7:01between this point here and that point there,

7:04there was some type of loss data.

7:06Hey, can you resend the information back because I'm expecting the packet with

7:10sequence number 13.

7:12And in that case here, this device here can begin resending these packets

7:16and everything is OK once again.

7:19This is the beauty and the reliability of how TCP actually operates.

The Network Layer

0:00So the next layer we are going to be talking about is, you guessed it, it's

0:03going to be layer

0:04number three. This is the network layer and it's so, so important. We're really

0:09going to do a lot of

0:10focus on this layer as we progress throughout this particular course. So what

0:14is it all about?

0:15Well, you might already have a little bit of an inclination as to what we're

0:18trying to do here.

0:20The network layer, this is where we're going to do things such as routing. All

0:24right, but what

0:25does that even mean? Well, as you happen to be watching this, no doubt within

0:29your home you

0:30happen to have a router and you are probably familiar that this particular

0:35device let's you go to the

0:36internet. Now to be clear here, I'm not saying that routing only involves your

0:41visiting the internet,

0:42more specifically when we're talking about routing, we're talking about moving

0:47data across different

0:49networks. Now first thing to point out right here, see this term I happened to

0:53use, I said data

0:55this is not really the terminology we would use when we're talking about layer

0:58three,

0:59the data layer three is actually referred to as packets. So more accurately

1:03what we're doing when

1:04we're routing, we're moving packets across from one network over to another.

1:08Now when you happen to

1:10visit the internet, all the internet is is a whole bunch of connected networks,

1:14you know,

1:15all over the world, all over the globe. So let's imagine this is now your

1:18little home, okay?

1:19And this is your home router. So let's imagine this is your computer here. And

1:25this one can be

1:26your sister's computer, you know, you've got one computer in each bedroom maybe

1:30. Let's pretend

1:31that this here is not a server but rather it's a printer. So because this

1:35printer here is in the

1:37same network as you over here, if you want to print something on that printer.

1:42So in this case

1:43here, there actually is no routing involved. And the reason why there's no

1:47routing involved

1:48is because all of this communication you to the printer is all within that same

1:52local network.

1:53Whereas if you want to go and let's maybe say this is google.com, this is any

1:58separate network

1:59entirely, you ultimately have to send that packet to your router. And the

2:05router will figure out

2:06what to do with it. Most likely what it's going to do is just send it to your

2:10ISP, the people who

2:11you pay for your internet and then their routers will ultimately find the

2:14correct path to get you

2:16to the server that you want. Thus facilitating the connection that you're after

2:19. So that is the big

2:20big distinction when we want to talk to a different network. We're going to be

2:24operating at layer three

2:25with an OSI model. We're going to be routing and very, very important the way

2:30this is actually handled

2:31or the way this is actually facilitated is via the use of logical addressing.

2:36Now these logical

2:37addresses, but it might sound a little bit complex right now, you no doubt have

2:41heard of these at

2:42least in passing the logical addresses we use at layer three are known as IP

2:47addresses.

2:48This is how the connection actually happens. So your computer here will have an

2:52IP address.

2:53And if you want to talk to your printer in this case here that will have its

2:59own IP address,

3:00and as we'll get to learn because in the same network right here, the IP

3:05addresses of both the

3:06printer and your router are going to be within the same network range. What

3:09does that mean?

3:10Again, do not worry about that quite just yet. We'll talk about the details

3:14very, very soon.

3:15However, when we want to speak to a server out in Internet such as let's go

3:20with google.com once

3:21again, it is also going to have an IP address. But because it's not in this

3:25network, it's going to

3:26have an IP address and a different network range. And thus the routers here are

3:30going to go figuring

3:31out the best path how to reach that particular IP address. This is what we're

3:35talking about

3:36this particular layer. So the address portion of the name might be quite self-

3:40explanatory.

3:40The same way the mailman can deliver your mail because you have a particular

3:44house address

3:44within a particular region. This is the same type of concept that we're talking

3:48about here,

3:48but this portion might not be quite so obvious. IP, what does this actually

3:52mean? Well, we're

3:53actually referring to the Internet protocol. Now it is worth just mentioning

3:58that IP is not the

3:59only protocol you can get in layer three, but it is by far and away the most

4:03popular one. The one

4:05you're going to see all the time at this particular layer. Now once we dive

4:09into IP addressing in a

4:10little bit more detail, we'll get to learn that there actually are two

4:12different versions of IP.

4:14And one is known as IP V4. This is version four of the IP protocol. And we also

4:20have IP V6 version

4:22six. This is the older version. And this one is the newer one. This one is

4:27still really quite common.

4:29And it is a little bit easier to use. This one here though is more modern and

4:33also provides

4:33some distinct advantages. Again, we'll talk about the details very, very soon.

4:37But really at its core,

4:38when we're talking about layer three, the data is referred to as packets. When

4:42we're moving these

4:42packets across different networks, we are routing using routers. The protocol

4:47on play is going to be

4:48the IP protocol, which can be in version four or version six. And these

4:53protocols ultimately allow

4:54us to address each individual node on our networks uniquely so that it can be

5:00found such that if

5:01this device wants to talk to this device, we can do so. And in a similar way,

5:06even if we happen to be

5:07trying to connect to a different network entirely because of IP addressing that

5:12connection can be

5:13facilitated. Now another thing that is managed at layer three and something we

5:17will talk about

5:18is something known as quality of service. So what does this actually mean? So

5:23let's say that this

5:24is a corporate network, we can imagine maybe there are a lot more computers

5:28than just two.

5:29And let's say for this particular company, video calling and video conferencing

5:33is very,

5:34very important. Now let's imagine that the users within this particular network

5:39are kind of slacking

5:40off on the job and spending a lot more time watching YouTube so there is

5:43visiting the internet,

5:45they're consuming lots of video, full HD, maybe it's 4K, they're just consuming

5:49lots and lots and lots

5:50of data. What this means though, is that they're ultimately putting a lot of

5:54demands on their own

5:56network. So the actual bandwidth availability is going to be reduced for other

6:00users because

6:01some users are well taking more than their fair share of the network. And

6:05because of this,

6:06users who really are doing work such as doing video conferencing, they are

6:10noticing a lot of lag

6:12on their systems. The network really seems to be congested and slowed down. So

6:16what can also happen

6:17at layer three is we can actually identify very particular traffic traversing a

6:22network such as

6:23traffic that is used for video calling or voice calling. And we can just say,

6:27hey, we want to give

6:28that traffic a very particular priority. So even if all of the other users on

6:32the network are wasting

6:34time watching YouTube, what we can ultimately do is prioritize any of the

6:38traffic that is actually

6:40used for video calling so that the people who are watching YouTube, they are

6:44the ones who suffer

6:45congestion, they are the ones who start noticing lag. So if this person here is

6:49actually doing a

6:50video call, they're actually going to be able to make that connection without

6:54much lag at all.

6:55Whereas the person on YouTube, they might start noticing that all of their

6:59videos are

7:00buffering and not really watchable. Now again, we'll talk about how we can

7:04actually implement

7:04quality of service much later on within this very course, but understand though

7:09that this

7:09particular concept, once again, all of this is happening at layer three within

7:14the OSI model.

7:15So routing forwarding packets between different networks, marking particular

7:19packets for a very

7:20particular quality of service, all of this made possible, via layer three

7:24within the OSI model.

The Data Link and Physical Layers

0:00Alright friends, so let's round this scale off by talking about the final two

0:03layers.

0:04This is going to be layers number two, as well as layer number one.

0:08So let's focus on layer two first.

0:10This one here is referred to as the data link layer.

0:14So what is this particular layer actually responsible for?

0:18Well, its primary purpose is to reliably transfer data over a physical medium.

0:24Quite simply, this is how all of our local connections happen.

0:28Now what I mean when I say local connections, I'm talking about connections

0:31between the devices

0:32within the same network.

0:34So remember the way routing was allowing us to facilitate communication across

0:38different networks

0:39right here, we're talking about devices in the same network.

0:42So if I or my little machine here want to talk to my printer on this same local

0:46network,

0:47the big thing that's going to allow us to do this is the data link layer.

0:50Now remember, we have things such as segments, layer four, we have packets at

0:54layer three.

0:55When we're talking about layer two, the actual data is going to be encapsulated

0:59into what is known as

1:00frames. Now the data link layer is responsible for quite a lot of different

1:05things.

1:05We're going to talk about this in more detail in an upcoming scale,

1:08but as a high level overview, some of the things it's going to do are,

1:12well of course it's going to manage the actual framing of the packets.

1:15It's going to allow us to detect errors within these frames so error detection

1:18is also covered.

1:20It'll manage things such as flow control to reduce congestion across the

1:23physical lengths,

1:24but one of the most important things, maybe something you've already heard of,

1:28is it actually is responsible for physical addressing. So remember we talked

1:32about IP

1:32addressing, how that was logical addressing. This time here we're talking about

1:36the physical

1:37connections and I really mean physical. So again, let's imagine I am over here.

1:42If I want to talk to this printer over here, I have an actual interface right

1:47here.

1:47This can be my local ethernet interface as the diagram shows.

1:50And this interface here, this physical interface, this is the interface from

1:55which I can reach the

1:55server. Now each of these interfaces, this one here and this one there, they

2:00actually have physical

2:02addresses. And in a similar way, this device here in the middle is switched,

2:05which is something

2:06we'll look at in great detail very, very shortly in an upcoming scale. This is

2:10going to manage the

2:11layer to communication utilizing these physical addresses. In fact, all of the

2:15ports here, this

2:16one here, this one, this one, and this one, each one of these interfaces all

2:20have their own physical

2:22address. Now this physical address I'm referring to, you may have heard it

2:25known as a MAC addresses,

2:27is what we're talking about here, okay? But it also has other names such as

2:30simply just a layer

2:31to address. And sometimes it's just referred to as a burned in address. Now

2:36with respect to IP

2:37addressing, at least in IP before addressing, the IP addresses look something

2:41like this, 192.168.1.1.1.

2:44This is a valid IP for address. When we're talking about addresses for MAC

2:49addresses,

2:50the format looks a little bit different. There are going to be 12 characters

2:54long, and they're

2:54actually going to use hexadecimal characters. Again, we're not going to

2:58struggle and worry about

2:59what this actually looks like quite just now. But to give you a rough idea,

3:03this would be a

3:04type of MAC address. Now I've just made this MAC address up completely off the

3:07top of my head,

3:08but you can see here it does look really quite different. If you count the

3:10characters, we're

3:11going to see we actually have 12 right here. And like I said, each of these

3:14characters are going

3:15to be hexadecimal. So in the example of this local network, when I want to talk

3:20to the printer

3:21right here, my interface here is going to have a MAC address in a similar

3:25format to what we just

3:26saw there before, as well this interface right here. Now the switch itself

3:30actually is quite

3:31intelligent with respect to this matter, because what happens when a frame is

3:35created, we actually

3:36specify a source MAC address within the frame, basically who originated the

3:41frame itself.

3:42And we also include a destination MAC address, much like with respect to your

3:46packets, we have

3:46a source IP address and a destination IP address. Same type of thing is true

3:50here. So if I specify

3:52that, hey, the source is here, and the destination is this one right here. Once

3:56we pass that information,

3:57this frame over to the switch itself, the switch is going to have a little

4:01table that maps all of

4:03the MAC addresses to a particular port. So when this switch here receives the

4:07frame coming in,

4:07it's going to look at the destination. And it's going to say, hey, whenever I

4:10see this MAC address

4:11destination, I know what I do is I actually forward the traffic out of this

4:16particular interface right

4:17here. So I don't forward it out of this, I don't forward it back down here or

4:21this one, I know

4:22that the destination MAC goes out of this interface right here. And ultimately,

4:26it ends up at the

4:27correct destination. Now again, the details of how the switch knows how to do

4:31this. This is

4:32something we'll talk about very, very shortly in the next scale. But

4:35effectively, this is what is

4:37happening. So the data length layer is all about dealing with frames. We use

4:40source and destination

4:42MAC addresses. This is how we communicate over a local network. And then the

4:46data before it's

4:47transmitted is encapsulated one more time. This time at layer one, you guessed

4:52it. This one is known

4:53as the physical layer. Now this might sound really quite similar to what we're

4:57just discussing.

4:58But in this case here, we are being a little bit more literal. We're talking

5:03about the physical

5:04transfer of the data, the actual binary bits, you know, as in the actual binary

5:09bits, the ones and

5:10zeros that are being transmitted. So whether or not the data has been

5:14transmitted as voltage over a

5:15copper wire ones and zeros, or perhaps maybe it's been transmitted over a fiber

5:20optic cable and

5:21pulses of light. So when the light is on, we have a one and the light is off,

5:24we have a zero,

5:25or maybe even the data has been transmitted over radio waves, which is what you

5:29would see with

5:30respect to Wi-Fi or maybe even Bluetooth. So cables, network interface cards,

5:35ethernet ports,

5:36all of this information relates to the physical layer within the OSI model. So

5:40really, when we

5:41have a device here wanting to talk to a server over there, the data that we're

5:46going to be

5:46transmitting is going to be encapsulated all the way from layer seven to layer

5:51six and layer five.

5:52And then we're going to wrap it any segment at layer four, we'll wrap that in a

5:56packet and then

5:57wrap that once again in a frame before ultimately transmitting all this data

6:02over the physical media

6:03as ones and zeros utilizing layer one. And then eventually when we hit our end

6:08points,

6:09the process of decapsulation is ultimately going to do the same thing in

6:13reverse this time stripping

6:15away the physical layer to reveal the data link layer to reveal the packets,

6:19the segments,

6:20all the way up to layer seven, whereby the application can actually read the

6:24initial data itself.

6:25All of the complexity we've just talked about, the binary bits, the physical

6:29medium, whether it's

6:30radio waves or pulses of light, the routers routing packets with layer three

6:34addresses,

6:34the switches forwarding frames with layer two addresses, all of this complexity

6:38, each individual

6:39component, all of it can be represented theoretically in this nice clean way

6:45utilizing the seven layers

6:46of the OSI model.

Team training path

Turn this skill into assignable team training

This free skill is a preview of the courses your team can assign, track, and report on with CBT Nuggets.

What's next?

Ready to keep going?

For your team

Bring this training to your team

See how CBT Nuggets helps IT teams close skills gaps, hit compliance targets, and prove training ROI.

Book a Demo
Just need HPE6-A86?

Learning on your own? Browse individual plans ($49/month, billed annually)

Not ready to buy?
with no purchase required. Already have an account?
Book a Demo