The 7 layers of OSI Model – Definition, Advantages, and Explanation

OSI Model

While studying computer networks, you may have heard about the term the layers of OSI Model from somewhere. In a nutshell, it’s a theoretical model that shows how the data is transferred in a computer network.

The Open System Interconnection(OSI) model was first introduced in 1984 by the International Organization for Standardization (ISO).

What is an OSI model?

It is a theoretical blueprint that helps us understand how data gets from one user’s computer to another.

Why we need a layered model?


Explain the advantages of the OSI model?

  1. It is easy to understand.
  2. Reduces complexity.
  3. It develops standards so that all of our hardware and software talk nicely to each other.
  4. Changes in one layer do not affect how the other layers work.

The OSI Model consists of 7 layers. These are as follows:


We’ll discuss these layers from the top to bottom approach, which is from the application layer to the physical layer.

Layer 7 – Application Layer

The application layer is the closest layer to the endpoint user. Network applications use it—for example, Google, Firefox, Outlook, Skype, etc. However, web browsers are a network application that does not reside in this layer. Still, it uses application Layer Protocols such as Http/Https(for web browsers), SMTP(for mailing services), and Telnet(for Virtual Terminals). For example, in this layer, the user enters alphanumeric values to perform regular searches in the browser.


Layer 6 – Presentation Layer

The data that is passed on by the application layer is in the form of numbers and characters. Now the Presentation Layer converts the data to binary format. This process is called Translation. The binary data is compressed so that it can travel faster which is called Data Compression. It is helpful in real-time video or audio streaming. To maintain integrity, data is encrypted via SSL(Secure Socket Layer) Protocol. This process is called Encryption.

osi-presentation layer

Layer 5 – Session Layer

Session Layer helps in setting up and managing connections enabling, sending, and receiving data followed by termination of connections or sessions. It consists of protocols like APIs(Application Programming Interfaces), Netbios(ensures communication between two computers). It has some other functions like:-

  1. Authentication- To permit the authenticated user.
  2. Authorization- Every user has a specific role on the website. For example- An admin has a different kind of rights on a site rather than an average user.
  3. Session Management.

Layer 4 – Transport Layer

It controls the amount of data being transmitted and ensures the reliability of communication. It performs three functions:-

  1. Segmentation-The data that is received from the session layer splits up into segments(small data units). Each segment consists of a port number and a serial number.
  • Port number helps to direct each segment to the correct application.
  • The sequence number helps to reassemble the segments in the correct order to form the right message at the receiver.


2. Flow Control– It helps in maintaining the speed of data that is transmitted to the device.

For example- Our mobile is connected to a server, the server can transmit data up to 100 Mbps, and the mobile can process data up to 10 Mbps, Now if the server sends data at 50 Mbps the mobile with the help of transport layer can tell the server to slow down the data transmission rate up to 10 Mbps so that no data gets lost.

3. Error Control– If some data does not arrive at the destination, the transport layer uses its automatic repeat request scheme to retransmit the loss or corrupted data. Checksum a group of 0s and 1s added to each segment by the transport layer to find the received corrupted segment.

Protocols like TCP(Transfer Control Protocol) and UDP(User Datagram Protocol) are used in this layer.

Layer 3 – Network Layer

It works for the transmission of received data segments from one computer to another located in different networks. Data units in the network layer are called Packets. It is the layer where routers reside.

The functions of the network layer are –

  1. Logical Addressing– Every computer in the network has a unique IP address. The network layer assigns senders and receivers IP address to each segment to form a packet. IP addresses are assigned to ensure that each data packet can reach the correct destination.
  2. Routing– It is a method of moving a data packet from source to destination and is based on the logical address format of IPv4 or IPv6.
  3.  Path Determination– A computer can be connected to an internet server in multiple ways choosing the best data path for data delivery from source to destination. It uses some protocols like OSPF(Open Shortest Path First), BGP(Border Gateway Protocol), IS-IS(Intermediate System to Intermediate System).


Layer 2 – Data Link Layer

It receives the data packet from the network layer. Here physical addressing takes place.

Physical Addressing-Here MAC(Media Access Control) addresses of the sender and receiver are assigned to each data packet to form a frame.

MAC Address– It is a 12 digit alphanumeric number embedded in NIC(Network Interface Card) of your computer.

DataLink Layer is embedded as software in NIC of computer and provides means to transfer data from one computer to another via a local media(Copper wire, Optical fiber).

It performs two functions-

  1. Allows upper layers of the OSI model to access media using techniques such as Framing.
  2. It controls how the data is placed and received from media via Media Access Control and Error detection.

If two or more devices connected to the same media send data at the same time, then there may be a possibility of collision of two messages resulting in a useless word to avoid this situation datalink layer has a protocol named CSMA(Carrier-sense multiple access) which helps to prevent these situations.


Layer 1 – Physical Layer

It receives the data in the form of frames from the data link layer, which consists of binary values. The physical layer converts the bits into signals and transmits them over local media. It can be an electrical signal in case of copper cable, a light signal in case of optical fiber, etc. So the signal generated by the physical layer depends upon the type of media used to connect two devices.

So, guys, these were the seven layers of the OSI Model in detail. Feel free to as any questions and contact us if you have any queries.

Get the latest tech news and updates, programming tutorials, and cybersecurity tips and tricks. Check out music for more.

Sometimes we include links to online retail stores and/or online campaigns. If you click on one and make a purchase we may receive a small commission.


1 reply on “The 7 layers of OSI Model – Definition, Advantages, and Explanation”

Leave a Reply

Your email address will not be published. Required fields are marked *