Code360 powered by Coding Ninjas X Naukri.com. Code360 powered by Coding Ninjas X Naukri.com
Table of contents
1.
Introduction
2.
What is the OSI Model?
3.
7 Layers of OSI Model
4.
7. Application Layer
4.1.
Functions of Application Layer
5.
6. Presentation Layer
5.1.
Functions of Presentation Layer
6.
5. Session Layer
6.1.
Functions of Session Layer
7.
4. Transport Layer
7.1.
Functions of Transport Layer
8.
3. Network Layer
8.1.
Functions of Network Layer
9.
2. Data Link Layer
9.1.
Functions of Data Link Layer
10.
1. Physical Layer
10.1.
Functions of Physical Layer
11.
Characteristics of OSI Model
12.
Advantages of OSI Model
13.
Disadvantages of OSI Model
14.
OSI Model in a Nutshell
15.
Difference between OSI and TCP/IP Model
16.
Frequently Asked Questions
16.1.
What is the OSI Model?
16.2.
What is the 7 layers of the OSI model?
16.3.
What is OSI model used for?
16.4.
What is the difference between OSI Model vs TCP IP?
17.
Conclusion
Last Updated: Mar 27, 2024
Medium

OSI Model

Author Anant Dhakad
0 upvote

Introduction

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.

OSI Model

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:

7 Layers of OSI Model

Also see,  Personal Area Network

7. Application Layer

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.

 

(Also, see TCP/IP Model)

Advantages of OSI Model

  • Each layer in the OSI model is independent. Therefore changes in one layer do not affect the other layers.
  • It has the flexibility to adapt to different protocols.
  • It supports both connectionless and connection-oriented services.
  • It reduces complexity and divides complex functions into simpler & smaller parts.
  • In computer networking, it is a standard model.

Disadvantages of OSI Model

  • In the OSI model, layers cannot work parallelly because each needs to wait to obtain data from the previous layer.
  • This model is very slow, costly, and complex to implement.
  • It can only be used as a reference model.
  • It doesn’t have a fixed protocol.
  • In this model, some functionalities are implemented in more than one layer, such as the transport and data link layer.

OSI Model in a Nutshell

Layer

Name

Supported Protocols

7.

Application

SMTP, HTTP, FTP, POP3, SNMP

6.

Presentation

MPEG, ASCH, SSL, TLS

5.

Session

NetBIOS, SAP

4.

Transport

TCP, UDP

3.

Network

IPV5, IPV6, ICMP, IPSEC, ARP, MPLS

2.

Data link

RAPA, PPP, Frame Relay, ATM, Fiber Cable

1.

Physical

RS232, 100BaseTX, ISDN, 11

Also read, Message Switching in Computer Networks.

Difference between OSI and TCP/IP Model

OSI model

TCP/IP model

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.

 

Difference between OSI and 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.

Recommended Readings:

 

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.

Also check out some of the Guided Paths on topics such as Data Structure and Algorithms, Competitive Programming, Operating Systems, Computer Networks, etc. as well as some Contests, Test Series, Interview Bundles, and some Interview Experiences curated by top Industry Experts only on Studio.

Live masterclass