OSI Model: Fully Explained

internet concept image

OSI Model: Fully Explained

If you’re creating software that needs to communicate with a network — internal to your company or global across the Internet — it’s helpful for you to understand exactly how network communication works during every step of the process of transmitting data.

Many developers use the TCP/IP model to guide their knowledge on this subject, but there is another network communication model you should know about: the OSI Model.

But before we dive too deeply into the OSI Model, here’s a comparison that shows how the two network models differ from each other:

OSI Model vs. TCP/IP Model

7Application Layer
6Presentation Layer
5Session Layer
4Application LayerTransport Layer
3Transport LayerNetwork Layer
2Internet LayerData Link Layer
1Network Access LayerPhysical Layer

OSI Model: Overview

Introduced in 1984, the OSI Model—standing for Open Systems Interconnection—was designed to show how networks communicate with each other. Though the modern Internet is not based on this model, many major companies adopted this standard when ISO announced it officially in 1984.

If you’re not familiar with the OSI Model in networking, don’t worry. We’re going to break down what it is in layman’s terms, and you’ll walk away understanding a lot more about computer networks once you’re finished reading this article.

Even if you’re not an expert on computers, having this foundational knowledge will well prepare you if you simply want to understand how it all works.

structured vs. unstructured data
The OSI model is made up of 7 layers. It explains how data moves across the internet from one application to another.


Layer 7 — The Application Layer 

We start at the last layer because this is where the use of the model begins. Throughout this article, we’ll use an example of a basic software program created for a fictitious business-to-business (B2B) e-commerce company that sells T-shirts to other wholesale companies, which in turn sell those T-shirts to their retail customers in a brick-and-mortar location.

So, where does the communication begin? It begins here in the application layer, which is where an employee at Company A (the retail company) places an order with Company B (the wholesale T-shirt company) because they’re running low on inventory.

The order begins on a website Company B gives Company A access to after they are approved for a wholesale account. The employee puts all the items in their cart they need to order, and they hit “send” to finalize the order.

That “send” button is attached to a network protocol called HTTP—hypertext transfer protocol—which is the network protocol you use to communicate with web servers when you want to access a website.

No matter what the use case, all software that communicates over a network needs a protocol that sends or retrieves information from another computer that operates as a network server.

Layer 6 — The Presentation Layer

This next layer decides how this order needs to be encoded, encrypted, and/or compressed so the next layer can interpret the data being sent to it. These three operations do different things, so let’s look at what each means separately so you can understand what’s being done in the presentation layer.

Encoded Data

When data is encoded, it simply means that it’s being translated in a way that the receiving computer understands it. So, when this order is encoded, it’s sent over to Company B’s web server with certain details their server understands.

For instance, their web server expects to see what items need to be ordered, how many, colors, sizes, etc. 

Encrypted Data

When data is encrypted, it’s changed in a way that protects sensitive data from being accessed by anyone who’s unauthorized to view the data. In this example, one thing that’s important to encrypt would be Company A’s payment information.

The presentation layer will have modules that tell the sending computer how to encrypt this data, and the receiving computer will have a key that translates the encrypted data so the order can be processed successfully.

Compressed Data

To make the network run as seamlessly as possible, data is also compressed before it’s sent. Put simply, compressed data is data that’s been reduced in size to ensure resources are accessed easily and data’s being sent in the smallest possible format.

In our e-commerce example, there might not be a heavy need to compress data if large files aren’t transmitted. However, the capability is there should they need to upload large image files if they’re requesting a custom T-shirt be made from their graphics.

Video compression
To avoid crowding the network, data is compressed in this layer of the OSI model.

©777 Bond vector/Shutterstock.com

Layer 5 — The Session Layer

This next layer will open up a line of communication for both computers to talk to each other. The session layer has a big responsibility to keep this session open as long as data is being transferred from one computer to the other.

So, in our example, Company B’s server will be open to receiving information as long as the order is still transmitted.

Through setting checkpoints, the session layer ensures they receive the entire order before they close the line of communication. If these checkpoints do not pass, the receiving server will tell the session layer to go back to the last successful checkpoint and resend the rest of the data. This checkpoint process ensures there are no interruptions or erroneous data getting sent to Company B’s server.

However, if the session fails, Company A’s employee will receive an error message, which will prompt them to resend the order because it wasn’t successful. Company B’s server will also have a log of the error should they need to do any troubleshooting to investigate the issue if it happens repeatedly.

Layer 4 — The Transport Layer

This next layer takes the order Company A sends and breaks it into segments called packets to make it easier to send across the network.

This layer enforces error control to ensure the order is received in full at Company B’s server. If it is not, Company B’s server will ask the sending computer to resend the data so it receives all the packets it needs to fulfill the order.

Once the error control passes, it can reassemble the packets in a way that makes sense to Company B’s server. This error control uses what’s called a checksum to signal to the receiving computer that the data hasn’t been corrupted.

It uses a hash algorithm that turns the data sent into a string of numbers and letters that are always of the same length. This works in the same way software applications turn passwords into hashes in a database. So, this sensitive data can’t be known by anyone other than the user who created it.

If the checksums don’t match, this signals to the server that the data has been changed in some way, and the communication will fail. The server will request for the packets to be resent, and it will do this until the hash codes match each other.

Layer 3 — The Network Layer

The network layer works in conjunction with the transport layer to ensure the data is transmitted successfully to the server.

It does this first by breaking up the packets into segments that get transmitted over the server. Then it also ensures these packets get reassembled when they’re finished transmitting. 

However, the network layer also has another important job to carry out—it finds the best route from Company A to Company B, using network addresses known as IP addresses.

Each computer on the Internet, for example, has a unique IP address. This is similar to the address on your home because no other address in the world can have this address. 

Through analyzing the origin and destination addresses, the network layer finds the best possible route to transmit all this information. It will find the route with the least obstructions that allows it to send the information the fastest way possible. 

internet network connection wi-fi connection connectivity
The network layer breaks up packets and sends them to the server.


The data link layer is also involved in network communications in a way similar to the network layer. However, this layer, in particular, deals with two computers on a network that are physically connected to each other.

In our example of communication between Company A and Company B, the sending computer is not physically connected to the destination. So, the data link layer wouldn’t be involved in communication between those two nodes.

However, let’s say after the transmission of the order has been processed, the web server that received the order needs to send the information to the warehouse. Since they are on the same campus as the web server, it is likely they would be physically connected to each other through Company B’s internal network. 

When that order gets transmitted to the warehouse for processing, the data link layer sends the message in frames by breaking packets down further. This all happens seamlessly because of two aspects of the data link layer: Logical Link Control (LLC) and Media Access Control (MAC).

The LLC component will first identify the network protocols used to transmit the message so the same protocol is used throughout the transmission. Then it performs error checking and pieces the frames and packets back together.

If you’ve dealt with computer hardware before, you’ve likely already heard the term MAC. In addition to an IP address, your computer also has a MAC address, which physically identifies your specific computer on your physical network.

The data link layer uses these addresses to connect devices and define permissions of what machines can access the data being sent across the physical network.

Layer 1 — The Physical Layer

Lastly, we have the physical layer in the OSI network model. And, as the name suggests, this layer deals with the physical components of the network:

  • Connectors
  • Physical cables
  • Routers
  • Wireless cards and technology

This is the computer hardware on both the origin and the destination responsible for transferring the raw data from one computer to another.

So, components on Company A’s physical layer might be the wireless card on the employee’s computer that connects them to the Internet, along with any routers or firewalls that direct their outgoing traffic.

And, on Company B’s network, this would consist of their physical connection to the Internet, as well as any other hardware that allows them to communicate back to Company A.

The data transmitted on this layer is translated into binary code—the 1s and 0s that computers understand—so the server’s CPU understands what it needs to do. This is at the foundation of any computer that needs to carry out some action because it is the only language the computer understands.

Wrapping Up

Understanding the OSI model, its seven layers, and the interactions between these layers is crucial for any developer, network engineer, or enthusiast aiming to grasp the intricacies of network communication.

While the modern internet might not entirely adhere to this model, the principles and structure of the OSI model remain valuable. Though there are newer models, knowing this one makes for a nice foundation of knowledge for designing, understanding, and troubleshooting network systems.

In our journey through an e-commerce transaction, we explored each layer’s unique role in ensuring successful, secure, and efficient communication between different network entities.

From the application layer, where the interaction begins, to the physical layer, where the data is translated into binary code, the OSI model provides a comprehensive framework for understanding the complexity of data transmission.

Summary Table

7Application LayerHandles network communication protocols, such as HTTP
6Presentation LayerEncodes, encrypts, and compresses data for transmission
5Session LayerOpens and maintains communication sessions between computers
4Transport LayerBreaks data into packets, enforces error control, and reassembles packets
3Network LayerRoutes data between computers using IP addresses
2Data Link LayerHandles communication between physically connected computers using MAC addresses
1Physical LayerDeals with the physical components of the network, such as hardware and binary code

Frequently Asked Questions

What does OSI stand for in the context of networking?

OSI stands for Open System Interconnection. It’s a reference model that describes how information from a software application in one computer moves through a network medium to the software application in another computer.

Who developed the OSI model?

The Open Systems Interconnection group at the International Organization for Standardization (ISO) developed the OSI model.

When was the OSI model established?

Development on the OSI model began in the 1970s, but it was not officially published until 1984.

Is the OSI Model widely used today?

Some experts argue over whether the OSI Model is still relevant today, but it does actually still serve some valid purposes in the modern world of IT. Though the TCP/IP model is more widely used, the OSI Model is a helpful teaching tool for people like yourself who are learning all about how networks communicate with each other. It breaks the communication process into small, easily understandable concepts that even beginners can grasp. Additionally, the OSI Model also assists in troubleshooting when something in the network is causing consistent problems during the process.

How does the OSI model function?

The OSI model divides a networking system into layers. Within each layer, one or more entities implement its functionality. Each entity interacts directly only with the layer immediately beneath it and provides facilities for the layer above it.

Why would you choose the OSI Model over TCP/IP?

Because the TCP/IP model was designed for communication over the Internet, there are many use cases that make great use of the OSI Model today. For instance, in a scenario where security is top priority, using the OSI Model makes more sense because it’s better at isolating risks and threats to the network than the TCP/IP model. Additionally, many companies that manufacture network hardware still use these standards today to ensure their products are compliant with industry standards.

What are the seven layers of the OSI model?

The seven layers of the OSI model are the Physical Layer, Data-Link Layer, Network Layer, Transport Layer, Session Layer, Presentation Layer, and Application Layer.

Is there a layer of the OSI Model that should be deemed more important than the others?

If you are a software developer, you should really understand all the layers in the OSI Model to ensure you fully understand what’s happening on both the front end and the back end of the applications you code. However, the network layer is the layer that does a lot of heavy lifting throughout this communication process because it is actively sending and receiving data across the network on the fastest route possible.

To top