To understand networking and how communication works, it’s essential to first learn about its foundational principle, the OSI model. The OSI model breaks down the complex process of networking into different layers. In this blog, we will explore the OSI model in detail, explaining its layers and how they contribute to the overall functioning of computer networks.
Table of Contents
What is the OSI model?
OSI, or open systems interconnection model, is a conceptual model that the International Organization for Standardization (ISO) adopted as an international standard in 1984 when network computing was still in its initial phase.
The OSI model provides standard protocols for diverse communication systems. In simpler words, it provides some basic rules to enable communication among different computer systems. The OSI model can be thought of as the universal language for computer networking and supporting interoperability between different software and products.
Also known as the 7-layer model, the OSI model splits the communication between computing systems into seven different layers. This helps isolate and troubleshoot networking problems.
Different Layers of OSI Model
The seven layers of the OSI model, in order from the lowest to the topmost, are the physical layer, data link layer, network layer, transport layer, session layer, presentation layer, and application layer. Let us learn about these layers of the OSI model and their functions in detail.
1. Physical layer
The physical layer in the OSI Model is the lowest layer. It includes physical equipment, such as switches and cables, required for data transfer. The physical layer transfers unstructured, raw data bits between the physical layers of the sending and receiving devices, either optically or electrically.
The physical layer can also include some specifications such as pin layout, radio frequencies, voltages, cabling, etc., and some physical resources such as repeaters, modems, cabling, network hubs, and network adapters.
In this layer of the OSI Model, information is present as bits. Individual bits of data are transmitted from one node to the next. Data gets converted into strings of 1s and 0s, also known as a bitstream. For this to happen, both devices need to agree on signal conventions so that both devices can distinguish between 1s and 0s.
Some major functions of the physical layer are:
Physical topologies
The physical layer tells us about the arrangement of different nodes or devices in a network.
Bitrate control
The physical layer defines the number of bits that are sent in a second or the rate of transmission.
Transmission mode
It defines how the data flows between two devices. Simple, full-duplex, and half-duplex are some possible transmission modes.
Bit synchronization
The physical layer in the OSI model synchronizes the bits by providing a clock, which controls the sender and the receiver, providing us with synchronization at the bit level.
The next layer in the stack is the data link layer.
2. Data Link Layer
The main responsibility of the data link layer is the node-to-node delivery of a message. This is done by using nodes that are directly connected to each other. In the data link layer, data is packaged into frames. This layer is also responsible for finding and correcting any errors that may have occurred in the physical layer.
The data link layer is further divided into two sublayers. They are:
1. Logical Link Control
Logical link control (LLC) provides us with error control and flow control over the physical medium. It also identifies line protocols.
Media access control (MAC) provides multiplexing for the transmission of devices over a network. It also provides flow control.
The data link layer is basically responsible for intra-network communication, which is the transmission of data between two devices on the same network. This layer also puts the sender’s and receiver’s MAC addresses in the header. In the OSI Model, HDLC is a protocol used in the data link layer. It is used to encapsulate packets from the Network Layer and to provide reliable data transfer between two devices.
Here are some important functions of the data link layer in the OSI model:
Framing
Framing lets the sender transmit a set of bits that are meaningful to the receiver. This is done by attaching special bit patterns to the frame’s beginning and end.
Physical Addressing
The data link layer encapsulates the MAC or physical address of the sender in the header of each frame. The physical address of the receiver is also added in the header.
Access Control
There can be instances when multiple devices are sharing a common communication channel. In such a case, the MAC sub-layer of the data link layer helps you determine which device will have control over the channel at any point in time.
Flow control
Flow control is important to coordinate the amount of data that the sender can send before receiving any acknowledgement from the receiver’s end. This ensures that the data rate is constant on both sides and is not corrupted in the process of data transmission.
Error Control
The data link layer also detects and retransmits bits that were damaged or lost during transmission. In this layer, data packets are broken into smaller pieces, known as frames. Two common data link layer devices are bridges and switches.
After the data link layer, the next layer is the network layer.
3. Network Layer
The network layer facilitates the transfer of data between two separate networks. This is what makes it different from the data link layer. If the two communicating devices are on the same network, then the network layer becomes unnecessary.
The physical, data link and network layers are collectively known as the hardware layers or lower layers.
Let us discuss some of the functions of the network layer.
- The network layer breaks down data segments into smaller units called packets. These packets are formed on the sender’s device and later reassembled at the receiver’s end.
- To give a unique identification to all devices on the internetwork, the network layer defines an addressing scheme. This is called logical addressing. By doing this, all devices can be distinguished uniquely and universally.
- This layer also receives frames from the data link layer and then delivers them to the intended destination. The destination is found by using logical addresses such as internet protocol (IP) addresses.
- One of the biggest responsibilities of the network layer is packet routing; it means examining the routes available for the data to reach their destination and then selecting the best, shortest route from among those. This makes routers a very important device of this layer.
Get 100% Hike!
Master Most in Demand Skills Now!
Let us discuss the next layer in the stack, the transport layer.
4. Transport Layer
The transport layer manages the error checking and delivery of data packets. It keeps track of the sequence, size, and transfer of data between systems.
The transmission control protocol (TCP) is an example of the transport layer.
This layer also handles end-to-end communication between devices. To do this, data must be taken and broken into segments, which are chunks of data. The receiving device’s transport layer then extracts data from these segments.
Another job of the transport layer is flow control. Sometimes, the sender has a fast connection, but the receiver does not, which can cause the receiver to become overwhelmed. Flow control helps determine an optimal speed to ensure that the data received is complete, provides acknowledgement if it is, and requests retransmission if it is not and an error is found.
The services provided by the transport layer in the OSI Model are of two types:
1. Connection-Less Services
This process has only one phase: data transfer. In connection-less services, the receiver does not have to send an acknowledgement after receiving a packet. This makes connection-less services a fast way for two devices to communicate.
2. Connection-Oriented Services
This process is done over three phases. These are:
- Connection establishment
- Data transfer
- Disconnection or termination
Here, the receiver sends an acknowledgement to the sender or source device when receiving packets. This makes connection-oriented services more secure and reliable than connection-less services.
The important functions of the transport layer are:
Service point Addressing
To deliver a message to the correct destination, this layer encapsulates a specific type of address, known as the port address or service point address, in the header. By doing this, the transport layer ensures that the message is delivered to the correct destination.
Segmentation and Reassembly
The transport layer breaks messages into segments, each with a header associated with it. The transport layer then reassembles the message at the receiver’s end. Because of its important responsibilities, the transport layer is also known as the heart of the OSI model. It is operated by the operating system (OS) itself.
The next layers that we will discuss are the software layers of the OSI Model, the first one being the session layer.
5. Session Layer
The main job of the session layer is to control conversations between machines. It takes care of setting up, managing, and terminating sessions between different computers. A session is a time between the opening and closing of communication. To avoid wasting any resources, the session layer in the OSI model makes sure that the session stays open for as long as the data is being transmitted and closes as soon as the transmission is over. Reconnections and authentication are also among the services performed by this fifth layer of the OSI Model.
Here are the functions of the session layer:
1. Dialogue Control
The session layer allows two computers to communicate in simplex, full-duplex, or half-duplex modes.
2. Session
Establishing a session, maintaining, and terminating it.
3. Synchronization
The session layer uses checkpoints to synchronize data transmission. This helps identify errors so that data can be properly re-synchronized.
Let us understand this with an example.
If a file of 50 megabytes is being transferred, the session layer could set checkpoints every five megabytes. Now, if 23 bytes of data have been transferred and a crash or disconnection occurs, the session can be resumed from the previous checkpoint, which is 20 bytes. This means that only 30 more megabytes, not the total 50 megabytes, will have to be transmitted. If we did not have checkpoints, the complete transfer would have to be done again from the very beginning.
The next layer is the presentation layer.
6. Presentation Layer
The presentation layer’s main function is translating or formatting data according to the syntax accepted by the application. For this reason, it is often also referred to as the syntax layer. The presentation layer can also perform encryption and decryption needed by the application layer, which is the seventh layer of the OSI model. Simply put, the primary responsibility of this layer is to make the data presentable for the applications that need it.
The functions of the presentation layer are:
Encryption and Decryption
The process of translating data into a coded form is known as encryption. A key value is used to encrypt the data. Data in encrypted form is known as Ciphertext. The same key value can be used to convert data into plain text. This process is known as decryption. The presentation layer encrypts data on the sender’s end and then decodes or decrypts it on the receiver’s end to make it readable.
Compression
This layer also compresses the data that it receives. This is helpful in improving the efficiency and speed of communication by reducing the amount of data that has to be transmitted.
Translation
Sometimes, the two devices that are communicating with each other might use different methods of encryption. So, the presentation layer in the OSI model translates incoming data into semantics that the receiving device can understand. This layer handles the interoperability between the various methods of encoding data by converting the sender-dependent format into the common format and the common format into the receiver-dependent format. For this reason, the presentation layer is also referred to as the translation layer.
The final and the topmost layer in the stack is the application layer.
7. Application layer
The application layer in the OSI Model is at the very top of the stack. This layer is the only one that interacts with data from the user directly. It is also directly implemented by the network applications.
Most software applications, such as email clients and web browsers, rely on this layer to initiate communication. To clarify the confusion that normally arises, client software applications are not part of this layer. Instead, this layer handles data manipulation, which the software relies on to provide relevant data to the user. The protocols of the application layer include the Simple Mail Transfer Protocol (SMTP), which enables email communications, and the Hypertext Transfer Protocol (HTTP), which lets end-users interact with web resources by transmitting messages between servers and clients.
The application layer is also referred to as the desktop layer.
The session layer, presentation layer, and application layer are all integrated into the TCP/IP model as a single layer, as the application layer. These layers are called the upper layers of software layers.
The following are the functions of the application layer:
- Mail services such as storing and forwarding emails
- Directory services such as distributing database sources
- File Transfer Access and Management (FTAM)
Now that we have learned about the layers of the OSI model in detail let’s discuss why it was developed.
Why was the OSI Model Developed?
The OSI model was developed later than the modern Internet, which is why the Internet does not follow it. However, it is still very useful for troubleshooting network problems, no matter the extent of the issue, whether thousands of people cannot use a website that is down or a single person cannot connect to the Internet, the OSI model helps isolate the source by breaking down the problem.
The OSI model was developed to avoid unnecessary work by narrowing down a problem to a particular layer.
Advantages of the OSI Model
Here is how the OSI model is useful for operators and users
- It troubleshoots by identifying which particular layer is causing a problem and directs all efforts toward that layer.
- It determines the software and hardware that is required to build the network.
- It communicates and understands the processes that are followed by communicating devices on a network.
Difference between OSI and TCP/IP Models
First, let us compare the structure of the OSI and TCP/IP models.
Now, let us understand the differences between the two models.
TCP/IP Model | OSI Model |
It is the older of the two network models. | It is a comparatively newer model. |
It was developed by the US Department of Defense (DoD.) | It was developed by the International Organization of Standardization (ISO.) |
It has four layers. | It has seven layers. |
It is simpler; it combines several layers into one. | It is relatively complex. |
Session, presentation, and application layers of the OSI model are all combined as the application layer. | There are separate session, presentation, and application layers. |
Physical and data link layers of the OSI model are combined as the network access layer. | There are separate physical and data link layers. |
It is a functional model. | It is a conceptual framework. |
Protocols were developed first, and the model was developed later. | The model was developed first, and the protocols were developed later. |
It is based on specific, standard protocols. | It is generic and independent of protocols. |
Most applications use all four layers of the model. | Simpler applications do not need to use all seven layers of the model. |
Conclusion
To better understand networks and communication, everyone must know the functionality of each layer in the OSI model. It helps us fix issues and improve connections. This knowledge is essential for building and managing efficient networks.
Check out this beginner-friendly OSI Model by Intellipaat:
Our Cyber Security Courses Duration and Fees
Cohort starts on 12th Jan 2025
₹85,044
Cohort starts on 26th Jan 2025
₹85,044
Cohort starts on 12th Jan 2025
₹85,044