Network communications have required a lot of thought and engineering,
and how can we send data between two different systems and ensure that
it's properly understood? When we talk as people we use analog types of
communications. Our voice varies by frequency and amplitude, frequency
being then the number of cycles per second, and amplitude being the
strength of the signal.
But when we talk in a computer, we're using digital signals,
which means there's only two values, 1 or 0, for the most part.
So, if I'm going to send a million 1s and 0s to a
destination device in the next few seconds,
that destination device needs to know, what does that 1
mean in this place? So that is why they developed models
and protocols for communication.
The first of these that was really developed as the international standard
was the ISO 7498, the Open Systems Interconnect Model.
It also had a ‑2, or a second part, to the standard, which talked
about how to put security into the OSI Model.
We don't actually really use the OSI standard for communication.
Instead, we use it as a reference to describe how communications work.
So let's take a look at that.
There are seven layers to the OSI stack, as we call it. Starting
at the top with the Application, Presentation,
Session, Transport, Network, Data Link, and Physical.
The application layer is used to interface between the user's
application and the communication system. Let's say a user writes an
email using some type of email application.
So that user application now has the content of that
email, and the user hits Send. They want to send this data
across to a destination device.
The data itself contains the content of the email.
When this Send button is pressed,
this piece of data passes down to the application layer of the OSI stack.
The application layer says,
well, eventually this email is going to get to a destination device,
and that destination device will need to know what to do with it, so
I'll put a header on there, then I'll say,
hey, this is an email.
So when it's received by the application layer at the far end,
it knows to pass it to the destination email's application,
not to their web browser or their FTP server, or some other communication.
So this header that is put on by the application layer is
intended for the application layer at the far end.
It's kind of an interesting thing to point out here, that the application
layer of the OSI stack is not really the application,
it's the interface to the application that the user is using.
So the purpose of this header, as we said,
is so that when the sender uses their user application to send traffic
down through the application, presentation, and so on, down finally to
the physical layer, it traverses across some type of physical media,
and that data now reaches the receiver's machine. The receiver's
machine then passes the data back up those seven layers of the OSI
stack, and of course, as we said,
in order for the application layer on the receiver's machine to know
what to do with it, it then reads the header that was provided by its
corresponding or peer level on the sender's machine, and it knows to
send it to the correct user application.
If you looked at the traffic going over the physical media,
you would see the application header that indicates it's an email, and the data,
the content, of the email itself.
We can actually encrypt emails, which would mean we'd encrypt that data
that's being sent, maybe using products like PGP or S/MIME,
for example. When we go down to the presentation layer,
this is where we deal with things like formatting and compression.
If I'm going to compress some type of traffic to save space,
then, I will use the presentation layer to do that. I'll put a
header on there, the presentation header, that will tell the
presentation layer at the far end, oh, by the way,
this is compressed so you need to expand it back before you give it to the
application layer or it won't know what to do with it. At the session
layer, this is where we log in to a remote device.
This is where we do session management.
So if you're doing something like online banking,
we put in here some type of indication which session this
communication belongs to, so your traffic goes to your
session and not to somebody else's.
And here we see a number of different protocols used, things like
Layer 2 Tunneling Protocol, or Point‑to‑Point Tunneling Protocol,
that help us manage the session.
We can also encrypt at this layer using things like Secure Shell.