
What is OSI Model?
The OSI (Open Systems Interconnection) Model is a conceptual framework that explains how different computer systems communicate over a network. OSI Model was developed by the International Organization for Standardization (ISO). The OSI model is theoratical reference model not a physical system, that describes how network communication works.
The OSI Model consists of 7 layers and each layer has specific functions and responsibilities. These layers help standardize networking and make communication between different systems easier.
7 Layers of OSI Model
It devides the complex process of network communication into seven logical layers, each responsible for a specific function.

Layer 1: Physical Layer
The Physical Layer is the first and lowest layer of the OSI Reference Model. It is responsible for establishing the physical connection between network devices and transmitting raw data through the communication medium.
At this layer, data is transmitted in the form of bits (0s and 1s). It converts digital data into electrical, optical, or radio signals for transmission. When data is received, the signals are converted back into binary form and passed to the Data Link Layer.
Functions of Physical Layer
💠 Bit Synchronization : Synchronizes the sender and receiver using a clock signal so that bits are transmitted correctly.
💠 Physical Topology : Specifies how devices are arranged in a network, such as bus, star, or mesh topology.
💠 Bit Rate Control : Defines the speed of data transmission, which is the number of bits sent per second.
Layer 2: Data Link Layer
The Data Link Layer is the second layer of the OSI Reference Model. Its main purpose is to provide node to node data transfer and ensure that communication between two devices on the same network is error free.
This layer receives data from the Network Layer and converts it into frames before sending it to the Physical Layer. It also adds the MAC address of the sender and receiver so that the data reaches the correct device.
Functions of Data Link Layer
💠 Framing : The data link layer divides data into small units called frames for proper transmission.
💠 Physical Addressing : It adds the MAC address of the sender and receiver to each frame.
💠 Error Control : Detects errors in transmitted frames and retransmits them if necessary.
💠 Flow Control : Controls the rate of data transmission to prevent data loss.
💠 Access Control : Determines which device can use the communication channel when multiple devices are connected.
Sublayers
• Logical Link Control (LLC)
• Media Access Control (MAC)
Layer 3: Network Layer
The Network Layer is the third layer of the OSI Reference Model. It is responsible for transferring data between devices located on different networks.
This layer determines the best path for data transmission and ensures that packets reach the correct destination using logical addressing (IP address).
Data received from the Data Link Layer is organized into packets and then forwarded to the appropriate network.
Functions of Network Layer
💠 Routing : Determines the best path for data to travel from the source device to the destination device.
💠 Logical Addressing : Assigns IP addresses to identify devices uniquely in a network.
💠 Packet Forwarding : Moves packets from one network to another until they reach the destination.
Layer 4 : Transport Layer
The Transport Layer is the fourth layer of the OSI Reference Model. It is responsible for end to end communication between devices and ensures that data is delivered correctly from the sender to the receiver.
This layer receives data from the upper layers, breaks it into smaller units called segments, and sends them to the Network Layer for transmission. At the receiver side, it reassembles the segments back into the original message.
Main Functions of Transport Layer
💠 Segmentation and Reassembly :Large data is divided into smaller segments before transmission and reassembled at the destination.
💠 End to End Delivery : Ensures that the complete message is delivered from the source device to the correct destination device.
💠Flow Control : Controls the speed of data transmission so the receiver can handle the incoming data properly.
💠Error Control :Detects errors and retransmits lost or damaged data to ensure reliable communication.
💠Port Addressing : Uses port numbers to deliver data to the correct application such as web browser or email service.
Layer 5 : Session Layer
The Session Layer is the fifth layer of the OSI Reference Model. It is responsible for establishing, managing, and terminating communication sessions between applications on different devices.
This layer ensures that communication between two systems remains active during data transfer and properly closes the connection when the communication is finished.
Functions of Session Layer
💠 Session Establishment : Creates a communication session between two devices before data transmission begins.
💠 Session Maintenance : Maintains and manages the session while data is being transferred.
💠 Session Termination : Closes the connection after communication is completed.
💠 Synchronization : Adds checkpoints during data transfer so that if an error occurs, the transmission can restart from the last checkpoint instead of starting again.
💠 Dialog Control : Controls the direction of communication between devices such as half duplex or full duplex.
Layer 6 : Presentation Layer
The Presentation Layer is the sixth layer of the OSI Reference Model. It is responsible for formatting, translating, and presenting data so that the receiving system can understand it.
This layer acts as a translator between the application layer and the network. It converts data into a suitable format before transmission and converts it back at the receiving end.
Functions of Presentation Layer
💠 Translation : Converts data from one format to another, for example ASCII to EBCDIC.
💠 Encryption and Decryption : Protects data by converting it into an encrypted format during transmission and decrypting it at the destination.
💠 Data Compression : Reduces the size of data so that it can be transmitted faster across the network.
Examples : SSL / TLS, JPEG, MPEG, GIF
Layer 7 : Application Layer
The Application Layer is the topmost layer of the OSI Reference Model. It provides network services directly to user applications and acts as the interface between the user and the network.
This layer allows applications to access network resources and enables services such as web browsing, email, and file transfer.
Functions of Application Layer
💠 Network Virtual Terminal (NVT) : Allows users to log in and communicate with remote computers.
💠 File Transfer Services : Enables transferring files between systems over the network.
💠 Mail Services : Provides email communication between users.
💠 Directory Services : Provides access to distributed database information and network resources.
Protocols Used in Application Layer : HTTP, FTP, SMTP, DNS
Examples of Applications : Web browsers, Email applications, Messaging services


