The Open Systems Interconnection (OSI) model describes seven levels i.e Physical, Data Link, Network, Transport, Session, Presentation, and Application that computer systems employ to interact over a network.
In this blog, we will discuss the OSI model in computer networks. We will look at the characteristics, pros & cons of the OSI model. We will also look at its layers and the different protocols used at each layer.
What is the OSI Model?
The OSI Model is a logical and conceptual model that describes network communication for systems that are open to interconnection and communication. The Open System Interconnection (OSI Model) also defines a logical network and uses multiple layers of protocols to transfer computer packets efficiently. Basically, the OSI model can be considered a standard language for computer networking. Data flow in the communication system is divided into seven layers.
7 Layers of OSI Model
The top three layers (application, presentation, session) are software layers and the bottom three layers(physical, data link, network) are hardware layers. There is a total of seven layers in the OSI model. They are as follows:
As we have already learned about the OSI model. Now let us see all the layers of the OSI model in detail. Let us get started with the Application Layer. End-user applications like web browsers and email clients operate at the application layer. It offers protocols that let computer programs transmit and receive data and give consumers useful information. The only layer that works directly with user data is this one. The application layer is required for communication initiation by software programs like web browsers and email clients. The Hypertext Transfer Protocol (HTTP), File Transfer Protocol (FTP), Post Office Protocol (POP), Simple Mail Transfer Protocol (SMTP), and Domain Name System are a few examples of application layer protocols (DNS).
Functions of Application Layer
There are several functions of the application layer:
It provides network services to the user applications.
It also includes protocols for specific applications. These protocols are HTTP for web browsing, SMTP for email, FTP for file transfer, etc.
It supports user interaction and communication with the network.
6. Presentation Layer
The primary duty of this layer is to prepare data for usage by the application layer. In other words, layer 6 prepares the data for consumption by applications. Data translation, encryption, and compression are handled by the presentation layer. Any data transmitted by the application layer is processed by the presentation layer before being delivered via the session layer.
Functions of Presentation Layer
There are several functions of the presentation layer:
It helps to handle data formatting and conversion to ensure compatibility between different systems.
It also manages data encryption, compression, and encryption for secure and efficient communication.
It gives a common representation of data between different systems.
5. Session Layer
The session layer establishes sessions, or channels of communication, between devices. It is in charge of starting sessions, making sure they are active and open while data is being exchanged, and shutting them down once communication is complete. In order to minimise wasting resources, the session layer makes sure that the session is open for as long as necessary to send all of the data being transferred.
Functions of Session Layer
There are several functions of the session layer:
It manages and coordinates communication sessions between applications.
It also establishes, maintains, and terminates connections between applications.
This synchronizes dialogue between communicating entities.
4. Transport Layer
Data transferred in the session layer is divided into "segments" by the transport layer at the receiving end. The two devices' end-to-end communication is handled by Layer 4. On the receiving end, it is in charge of putting the segments back together in order to create data that the session layer may use. The control of flow and errors also falls under the purview of the transport layer.
Functions of Transport Layer
There are several functions of the transport layer:
It provides reliable and transparent transfer of data between end systems.
Segments and reassembles data into smaller units called segments.
It also helps to handle flow control, error recovery, and congestion control.
You can read related articles such as Congestion Control in Computer Networks here.
3. Network Layer
The network layer serves two primary purposes. One is dividing segments into network packets, which are then put back together at the other end. On the sending device, the network layer divides transport layer segments into smaller pieces, known as packets, and reassembles these packets on the receiving device. Routing is the process by which the network layer determines the optimum physical route for the data to take to get to its destination.
Functions of Network Layer
There are several functions of the network layer:
It builds and maintains logical connections between different networks.
It performs routing by determining the optimal path for data packets to reach their destination.
It helps to handle logical addressing and packet forwarding.
2. Data Link Layer
The data link layer creates and breaks connections between two network nodes that are physically close to one another. Frames are created from packets, which are then sent from source to destination. The data link layer is in charge of flow control and error control in intra-network communication, just like the network layer.
Functions of Data Link Layer
There are several functions of the data link layer:
It provides reliable and error-free transmission of data frames between adjacent nodes.
It handles framing, flow control, error detection, and correction.
It divides the data into manageable units called frames.
1. Physical Layer
The physical layer is in charge of the wired or wireless connections that physically connect network nodes. It describes the hardware—the connector, the wired or wireless connection between the devices. This layer is also where the data is transformed into a bit stream, or a series of ones and zeros.
Functions of Physical Layer
There are several functions of the session layer:
Transmission and reception of raw bit streams over a physical medium.
It defines electrical, mechanical, and procedural specifications for the physical connection between devices.
Characteristics of OSI Model
It is a conceptual model that allows various communication systems to communicate via a network.
It is divided into seven layers, and each layer performs different tasks.
Each layer performs its function independently.
But each layer depends on the data from the previous layer to perform its primitive functions. Each layer provides services to the next higher layer.
The top three layers generally deal with system-related problems and are implemented in software only.
The bottom three layers handle data transmission. They are implemented in both software and hardware.
The full form of OSI is Oper Systems Interconnection.
TCP/IP refers to the Transmission Control Protocol.
Transport layer is only connection-oriented.
Transport layer is both connectionless and connection-oriented.
The minimum size of the header is 5 bytes.
The minimum size of the header is 20 bytes.
The data link layer and physical layer are two separate layers.
The physical and data link layers are combined to make a single host-to-network layer.
Session and presentation layers are present in the OSI model
There is are no session & presentation in TCP/IP model.
The network layer is used for defining routing standards and protocols
Only the internet layer is used in TCP/IP model.
Frequently Asked Questions
What is the OSI Model?
For systems that are open to interconnection and communication, the OSI Model is a logical and conceptual paradigm that explains network communication. The seven distinct abstraction layers are physical, data link, network, transport, session, presentation, and application.
What is the 7 layers of the OSI model?
The seven distinct abstraction layers that make up the OSI reference model's division of communications between computing systems are Physical, Data Link, Network, Transport, Session, Presentation, and Application Layer. Each layer independently carries out its specific task.
What is OSI model used for?
The OSI model consists of 7 layers: Physical, Data Link, Network, Transport, Session, Presentation, and Application. TCP/IP model comprises 4 layers: Network Interface, Internet, Transport, and Application. Both models aid network communication by defining protocols and functions at different levels.
What is the difference between OSI Model vs TCP IP?
TCP/IP is a useful concept that uses standardised protocols to solve particular communication problems. OSI, on the other hand, acts as a thorough, protocol-neutral framework intended to include multiple network communication techniques.
Conclusion
In this article, we discussed the OSI model in computer networks. We have discussed each layer of the OSI model. We also compared the OSI model with TCP/IP model and also discussed the pros & cons of the OSI model.
Do check out The Interview guide for Product Based Companies as well as some of the Popular Interview Problems from Top companies like Amazon, Adobe, Google, etc. on Studio.