Quick Guide: Understanding the OSI Model and Network Protocols

Saurav JhaSaurav Jha
5 min read

The OSI Model helps standardize the way computer systems send information to each other. In this article, you will learn about the seven layers of the OSI Model, their purposes, and the network protocols used by the model to send and receive data across different devices.

What is OSI Model ?

OSI Model consists of 7 layers

Here layer means way of categorizing different functionalities of a network.

In OSI model this layers are categorized based on most tangible(Physical) to least tangible, All the details and inner workings of all the other layers are hidden from the end user.

How to remember all the names of the layers? Easy 😎

  • Please: Physical Layer

  • Don't: Data Link Layer

  • Nag: Network Layer

  • The: Transport Layer

  • Smart: Session Layer

  • Pretty: Presentation Layer

  • Aunt: Application Layer

Physical Layer

The Physical Layer is like the foundation of a building. It’s responsible for the basic connection between devices, whether using cables, wires, or wireless signals like Wi-Fi. It works with data in its simplest form—tiny bits (0s and 1s).

When sending data, this layer ensures the bits travel from one device to another. When receiving data, it takes the signals (like light, electricity, or radio waves), turns them into bits, and passes them to the next layer to make sense of it. Devices like hubs, repeaters, modems, and cables work at this layer to keep the connection going.

This Layer defines how data is formatted for transmission, how much data can flow between nodes, for how long, and what to do when errors are detected in this flow. Ok making it more simpler first it defines the format of how the data will be send to the next layer ensuring its error free below the flowchart that would clear you the concept

This flowchart appears to represent how data flows between two devices in a network using the OSI model .Here's a explanation of what is happening:

  1. Data Flow (Left to Right):

    • H2 (Header): This represents additional information added to the data by the current layer before passing it to the next layer. For instance, the Transport Layer might add port numbers, and the Network Layer might add IP addresses.

    • Data: This is the actual content or payload being transmitted.

    • T2 (Trailer): This is added information, usually at the end of the data, for things like error checking or ensuring proper delivery.

  2. Sending Side (Left):
    The process starts at the top layer and moves down through the layers. Each layer may add its own H2 (Header) and T2 (Trailer) to the data as it prepares it for transmission.

  3. Receiving Side (Right):
    When the data reaches the receiving device, it moves upward through the layers. Each layer processes the data, removes its H2 (Header) and T2 (Trailer), and passes the cleaned data to the next layer until it reaches the top layer.

Headers and trailers are like envelopes for data. They carry instructions or metadata needed to ensure proper delivery.

Network Layer

This layer determine which route is suitable from source to destination. This function of the network layer is known as routing ,It acts like a GPS for data, determining the best route for it to travel across different networks using routers. It assigns unique IP addresses (logical addressing) to ensure data reaches the correct destination. The layer breaks data into packets, adds headers with source and destination IPs, and handles errors like packet loss to ensure successful delivery.

Transport Layer

The Transport Layer ensures reliable data transfer between devices. It breaks data into segments, manages flow control to prevent overload, and provides error detection and correction. Protocols like TCP ensure reliability through 3 way handshake, while UDP focuses on faster, connectionless communication.

Session Layer

Communication in Session Layer

The Session Layer is like meeting organizer. It is responsible for setting up, managing , and ending communication sessions between devices.

Key Functions:

  • Establishes Sessions: Starts a session for communication between devices.

  • Maintains Sessions: Keeps the session active and handles interruptions.

  • Ends Sessions: Closes the session once the communication is complete.

  • Synchronization: Adds checkpoints during data transfer so it can resume from the last point in case of interruptions.

Think of it like a phone call. The session starts when you dial and connect, stays active while you talk, and ends when you hang up.

Presentation Layer

The Presentation Layer functions as a translator, ensuring smooth communication between systems by formatting data into standard formats like text or images. It secures transmissions through encryption and decryption while also compressing data to improve transmission speed and efficiency. These functions enable compatibility and optimized communication across different systems.

Application Layer

The Application Layer is the user-facing layer where communication starts. It provides services like file transfer, email, and web browsing.

Key Functions:

  • Network Services: Interfaces with applications like browsers or email clients.

  • User Interaction: Enables users to send or receive data.

Examples:
HTTP (web browsing), FTP (file transfer), SMTP (email).

It’s like the apps on your phone—your direct way of interacting with the system and the network.

List of protocols for each OSI layer:

  1. Physical Layer: Ethernet, USB, Bluetooth, DSL.

  2. Data Link Layer: MAC, ARP, PPP, Wi-Fi (IEEE 802.11).

  3. Network Layer: IP (IPv4/IPv6), ICMP, IGMP.

  4. Transport Layer: TCP, UDP.

  5. Session Layer: NetBIOS, PPTP, RPC.

  6. Presentation Layer: SSL/TLS, JPEG, MPEG.

  7. Application Layer: HTTP, FTP, SMTP, DNS, POP3.

Conclusion

If you have reached here that means now you have understood how each OSI layer plays a unique role in this process, from physical transmission to application services, creating an efficient and secure system for data exchange. Understanding these protocols helps in building and maintaining reliable networks.

If you liked my content, do give it a like ❤️ and share it with your friends! 🚀

Connect with Me 👇

Github

LinkedIn

10
Subscribe to my newsletter

Read articles from Saurav Jha directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Saurav Jha
Saurav Jha

Software Developer | Full Stack | Testing | API Documentation