CS Engineering Gyan

OSI Model in Computer Networks

The OSI (Open Systems Interconnection) Model is a conceptual framework used to understand how data is transmitted from one device to another over a network. It divides the communication process into seven distinct layers, where each layer performs a specific function and works with the layers above and below it.

The OSI model helps in standardizing communication functions, making it easier to design, implement, and troubleshoot network systems. Each layer plays an important role in ensuring that data is transferred accurately and efficiently from sender to receiver.

OSI Model Diagram

7 Layers of OSI Model


1. Application Layer

The Application Layer is the highest layer of the OSI Model and acts as a bridge between the user and the network. It allows users to access network services through applications such as web browsers, email clients, and file transfer tools.

Application Layer Diagram

As shown in the diagram, the communication process at the Application Layer happens in two directions: sending data (left side) and receiving data (right side).

Working of Application Layer

Sender Side:

Receiver Side:

Functions of Application Layer

Common Protocols


2. Presentation Layer

The Presentation Layer is the sixth layer (Layer 6) of the OSI Model and is responsible for data representation, translation, encryption, and compression. It ensures that data sent by the sender can be correctly interpreted by the receiver, regardless of differences in data formats between systems.

Presentation Layer Diagram

As shown in the diagram, the Presentation Layer processes data in two directions: sending data (left side) and receiving data (right side). It acts as a translator between the Application Layer and the Session Layer.

Working of Presentation Layer

Sender Side:

Receiver Side:

Functions of Presentation Layer

Common Data Formats Handled


3. Session Layer

The Session Layer is the fifth layer (Layer 5) of the OSI Model. It is responsible for creating, managing, and terminating communication sessions between two devices. This layer ensures that communication remains organized and synchronized throughout the data exchange process.

Session Layer Diagram

As shown in the diagram, the Session Layer receives data from the Presentation Layer, organizes the communication into synchronized sessions, and forwards it to the Transport Layer. On the receiving side, it restores and manages the session before passing data back to the Presentation Layer.

Working of Session Layer

Sender Side:

Receiver Side:

Functions of Session Layer

Key Features

Examples of Session Layer Usage


4. Transport Layer

The Transport Layer is the fourth layer (Layer 4) of the OSI Model. It is responsible for providing end-to-end communication between devices on a network. This layer ensures that data is delivered accurately, in the correct order, and without loss whenever reliable communication is required.

Transport Layer Diagram

As shown in the diagram, the Transport Layer receives L5 Data from the Session Layer and divides it into smaller units called segments. A Transport Layer header (H4) is added to each segment before forwarding them to the Network Layer. At the receiving side, these segments are reassembled into the original data and delivered to the Session Layer.

Working of Transport Layer

Sender Side:

Receiver Side:

Functions of Transport Layer

Key Features

Common Transport Layer Protocols

Examples of Transport Layer Usage


5. Network Layer

The Network Layer is the third layer (Layer 3) of the OSI Model. It is responsible for delivering data from the source device to the destination device across one or more interconnected networks. This layer determines the best path for data transmission and ensures that packets reach the correct destination using logical addressing.

Network Layer Diagram

As shown in the diagram, the Network Layer receives L4 Data from the Transport Layer. It adds a Network Layer header (H3) to create a packet and then forwards it to the Data Link Layer. On the receiving side, the header is processed and removed before the original data is passed to the Transport Layer.

Working of Network Layer

Sender Side:

Receiver Side:

Functions of Network Layer

Key Features

Common Network Layer Protocols

Devices Operating at Network Layer

Examples of Network Layer Usage


6. Data Link Layer

The Data Link Layer is the second layer (Layer 2) of the OSI Model. It is responsible for providing reliable communication between two directly connected devices on the same network. This layer receives packets from the Network Layer, converts them into frames, and prepares them for transmission through the Physical Layer.

Data Link Layer Diagram

As shown in the diagram, the Data Link Layer receives L3 Data from the Network Layer and encapsulates it into a frame by adding a header (H2) and trailer (T2). The frame is then converted into binary bits and sent to the Physical Layer. At the receiver side, the process is reversed before forwarding the packet to the Network Layer.

Working of Data Link Layer

Sender Side:

Receiver Side:

Functions of Data Link Layer

Key Features

Data Link Layer Sublayers

Devices Operating at Data Link Layer

Examples of Data Link Layer Protocols


7. Physical Layer

The Physical Layer is the first layer of the OSI Model and serves as the foundation for network communication. It is responsible for carrying data in the form of binary bits through a physical communication channel. This layer focuses on how data is physically transmitted between devices rather than how it is interpreted.

Physical Layer Diagram

As illustrated in the diagram, the sender's Data Link Layer passes data to the Physical Layer. The Physical Layer converts this data into a sequence of binary bits and transmits them through a communication medium such as a cable, optical fiber, or wireless channel. At the destination, the receiving Physical Layer accepts the incoming bit stream and delivers it to the Data Link Layer for further processing.

How the Physical Layer Works

At the Sender

During Transmission

At the Receiver

Main Functions of Physical Layer

Key Characteristics

Common Transmission Media

Devices Associated with Physical Layer



Data Units in OSI Model

Layer Data Unit
ApplicationData
PresentationData
SessionData
TransportSegment
NetworkPacket
Data LinkFrame
PhysicalBits

Working of OSI Model

When data is sent from the sender, it moves from the Application Layer down to the Physical Layer. During this process, each layer adds its own information (called headers). At the receiver side, the process is reversed, and each layer removes its respective headers to retrieve the original data.


Advantages of OSI Model


Conclusion

The OSI Model provides a clear understanding of how data flows in a network through its seven layers. Each layer has a specific role, and together they ensure reliable and efficient communication between devices.

← Previous Transmission Media Next TCP/IP Model →
Home Visit Our YouTube Channel