An Overview: The OSI Model

Colton Gabertan
7 min readJun 5, 2021

--

What it is. Why we use it. How it works.

Photo by Jordan Harrison on Unsplash

What is the OSI Model?

The acronym “OSI” stands for Open Systems Interconnection. We call it a “model”, because it is a point of reference when performing networking operations. It gives us a more simple understanding of the processes that go on closer and closer to the metal when computers are communicating to each other.

When using the OSI Model, it is important to keep in mind that this isn’t the actual system used, but it can help sculpt a specific picture of what is really going on.

Why use it?

Because of its specificity and clear borders used to define essential networking processes, the OSI Model is a powerful tool in helping us better communicate exactly what is happening, why something may have went wrong, and where a problem may have arisen when your computer tried to transmit information across networks.

Photo by Christina @ wocintechchat.com on Unsplash

How does it work?

The layers:

The OSI Model consists of 7 “layers”. In descending order (7–1), the layers are:

7. Application

6. Presentation

5. Session

4. Transport

3. Network

2. Data Link

  1. Physical

It is commonly taught in descending order, because, in general, when we decide to send something across a network, the sender would start at the application layer and descend to the physical. The receiver would then begin from the physical layer and work its way back up to the application layer.

One useful pneumonic to remember is: All People Seem To Need Data Processing.

Application Layer

This is the layer that we humans can see and interact with. For example, to get to this site, you used a browser application to access medium.com. This application allowed you to “request” to see this page, which is stored on a server.

In essence, your computer asked “May I see the information on this page?” and the server, which is simply another computer, allowed you access to view this article and sent the appropriate packets to you.

Presentation Layer

The presentation layer both transmits and receives data, but is essentially responsible for processes relating to security, efficiency, and making information passed on either readable to the networking equipment or to a human.

Some of these processes include encrypting data to prevent any bad actors from openly viewing any sensitive data, compressing files in order to quickly transmit information, and encoding data into the proper formats for the receiving device.

For example, medium.com is encrypted at this layer. So even if someone was to be looking at your requests made at the application layer, they couldn’t actually see what you’re receiving from or sending to this server.

Session Layer

When your computer requested medium.com’s server to view this article, this layer established the connection between your computer and the server in order to start sending the information it received from the presentation layer.

It also allows you to send further requests to the server, establishing a sort of dialogue between the two. Like when you click away from this article to view another, or even when you switch sites. This session would be terminated, and you’d no longer be communicating with the server that is allowing you to view this page.

Think of it as making a phone call. When you call someone, your phones connect to each other only for the duration of the call. During this time you can talk, and once one of you hangs up, the session would be over, and another phone call would need to be made in order to talk again.

Transport Layer

The transport layer will see the type of information that needs to be communicated between your computer and medium.com’s server, and it will decide which protocol to send it over. So, depending on if the information is live video, an article such as this one, or a picture of a meme, there is a protocol for each kind of data. You wouldn’t use a plane to get to a grocery store down the street.

The two most common protocols used to send data across a network would be the Transmission Control Protocol (TCP) and the User Datagram Protocol (UDP).

In general, TCP is chosen for accuracy over speed. It maintains a constant connection between the sender and receiver, and even ensures that each segment of information is passed on in order and in its entirety. (It’s actually the protocol you’re using right now!)

UDP is meant for speed over accuracy. Given that you need to video chat with someone over the phone, human communication is more reliable if it is done as close to real time as possible. This means that when you speak while on an application such as Facetime, this protocol would simply throw all of the datagrams at the receiving phone and hope that it keeps up. If anything is lost in translation, it is not re-sent, resulting in a poor display for the receiver.

Network Layer

To get to a specific place, we would need an address. It works the same way when dealing with the OSI Model and computer networking. Your computer has its own unique address, as does the server that is allowing you to read this article.

The network layer is responsible for finding these addresses and sending the packets of information back and forth to each other. Whether you’re reading this from home, an office, or at your local coffee shop, this device is connected to a network, and the server is also connected to its own network. In order for two networks to communicate, the network layer deploys its own protocols in order to let this happen all over the world.

In the world of computers, these addresses are referred to as Internet Protocol (IP) addresses. Your IP address may look something like: 192.168.0.1

Data Link Layer

OK, so your computer has received the packets that make up this article to your network. It isn’t quite at your screen yet. The data link layer will receive the server’s packets in a frame. This frame will contain some useful information for your network. It will know where the packets are coming from, where they’re going to (your computer) and if the data is corrupted or not.

The IP address discussed above is actually only the logical address of your computer, but to actually get to it, your network needs to know your computer’s Media Access Control (MAC) address, which is a unique, physical identifier for your device. From there, the data link will “link” the information on over to you, given that the data hasn’t been tampered with beforehand.

This layer, by checking the frames before sending it over, adds more security. It will also make sure that the packets don’t overwhelm your computer if it is too large. Data link does this by sending the packets over in bite-sized chunks, or fragments, ensuring that whatever information you receive is accurate and complete.

Physical

Once the data link layer has established the links, it is up to the physical components of our computers to understand and translate the information it has received. The thing to know about computers is that they only understand 1’s and 0’s, bits. Fortunately, this day and age, that’s all we need in order to determine what kinds of signals that these bits represent and how to present them to humans.

The physical layer also includes the networking equipment used to carry out the processes of the OSI model, such as routers, switches, cables, and the computers themselves. However, essentially, these 1’s and 0’s will be translated to all sorts of mediums such as audio, video, and more importantly, this article you’ve just finished reading.

Thank you! If I missed something, let me know at www.linkedin.com/in/colton-gabertan-463836209

--

--

Colton Gabertan
Colton Gabertan

Written by Colton Gabertan

Computer Science & Cybersecurity Enthusiast

No responses yet