BOOK THIS SPACE FOR AD
ARTICLE ADThe Open System Interconnection (OSI) Model is a standard for how data should be transferred between devices in a network. It is standardized by ISO. It has 7 layers/steps which are:
1. Application layer
2. Presentation layer
3. Session layer
4. Transport layer
5. Network layer
6. Datalink layer
7. Physical layer
When data is transferred from a device, it goes down the layers from the Application layer to the Physical layer. And when data is received by the device, it goes up the layers from the Physical layer to the Application layer.
Each layer is a package of protocols, which can be understood as instructions or rules set based on the type of data being transferred, such as a file, email, or web content.
But why these many layers? To answer that, you need to understand that various factors must be considered during data transmission, such as security, data compression for faster exchange, error handling, locating device IPs and MAC addresses, and the media through which data is transmitted. These layers are formed based on these tasks.
Without further ado, let’s dive into these layers:
Application Layer:
It is the closest layer to your raw data and the application generating the data. For network applications (applications that use the internet like browsers and social media web apps), the main functions include file transferring, web surfing, email, and establishing a virtual terminal. The Application layer provides user interfaces, services, and different sets of protocols to these applications so that they can perform desired activities. These protocols are known as Application layer protocols.
Presentation Layer:
It receives text data from the Application layer. It has three major roles:
Session Layer:
For data transfer between devices, there is a need to establish a session. A session can be understood as a temporary connection between two devices. Only during the session can devices exchange data.
The Session layer establishes or terminates the channel/session between devices.
How is a session established?
A device sends a session request to another device.The other device asks for authentication and authorization.Only then is a connection established, and data transfer can happen.Terms:
Authentication: Authentication means verifying that the other party is who they claim to be.Authorization: Authorization means determining what the other party is authorized/allowed to do, such as whether they are allowed to transfer data, and if so, what kind of files and other permissions.The Session layer uses APIs like NetBIOS to allow devices to communicate. In addition, the Session layer also keeps track of the data being transferred and shared, including the types of files (text, images, etc.) and storing them in the desired folder on the device. This is called session management.
Transport Layer:
Once the data is extracted and converted to the desired format and a session is established to let devices communicate, there are a few steps to follow to ensure the reliability of the data being transferred. The Transport layer controls reliable communication through segmentation, flow control, and error handling.
By reliability, we mean that the data is transferred in the correct sequence, to the correct application, and without any loss.
Segmentation: The data to be transferred is first divided into segments called data units. Smaller data units are easier to handle and recover in case of error or loss. Each data unit contains a sequential number, which helps to reassemble the data correctly, and a port number to direct each data unit to the correct application.
Flow Control: This refers to the amount of data being transferred between devices per unit of time. Devices may have different processing power; therefore, there is a need to ensure that all the devices communicating are compatible in terms of the speed of data transmission and processing. Flow control allows devices to tell each other to increase or decrease the speed of data transmission to prevent data loss during transmission.
Error Control: If any data is found missing, the device requests retransmission. This is an automatic repeat request (ARQ), where the sequential number is used to check for missing data.
Protocols used in this layer are TCP and UDP.
Network Layer:
Once the data is segmented and prepared with sequence and port numbers, i.e., data units, these data units need to be converted into packets. Packets contain information about the IP addresses of both the sending and receiving devices along with the data unit. This is called logical addressing. The Network layer also helps in determining the best path for data transmission through routing. The protocol used here is IP.
Data Link Layer:
After logical addressing, there is physical addressing. MAC addresses of the sender and recipient devices are added to the packet to ensure only the intended device receives the data. The Data Link layer is embedded as software in the Network Interface Card (NIC). It provides a means to transfer data via local media, where media refers to the physical connection, either through wire or air.
Physical Layer:
The binary transformed data is converted into the necessary signal based on the media used for data transmission.
For cable/wire media, an electric signal is formed.For light media, an optical signal is formed.For air media, a radio signal is formed.The first three layers discussed are called software layers. The Transport layer is considered the heart of the OSI model because it is where data becomes ready for transmission over the network. The last three layers are known as hardware layers.
In case of doubts, put them down in comments and follow for more!
Have a nice day :)