REW

What Is The OSI Protocol Stack?

Published Aug 29, 2025 5 min read
On this page

The OSI (Open Systems Interconnection) protocol stack is a conceptual model that standardizes the functions of a telecommunication or computing system into seven distinct layers.

Developed by the International Organization for Standardization (ISO) in the 1980s, the model provides a universal language for computer networking, allowing different systems to communicate with each other using a set of standard protocols. Though the modern internet primarily relies on the simpler TCP/IP model, the OSI model remains invaluable for learning, troubleshooting, and conceptualizing network architecture.

The 7 layers of the OSI model

The seven layers of the OSI model form a hierarchy, with each layer performing specific functions and communicating only with the layers directly above and below it. As data travels down the stack on the sending device, each layer adds its own header information through a process called encapsulation. At the receiving device, the process is reversed as data moves up the stack and each layer removes its corresponding header, a process known as de-encapsulation.

Layer 7: Application layer

The application layer is the top layer, serving as the interface between the user's software applications and the network services. It provides the protocols that allow applications to exchange data and display information to the user.

  • Key functions:
    • Resource sharing
    • Remote file access
    • Network management
  • Protocols: HTTP (for web browsing), FTP (for file transfers), SMTP (for email), DNS (for domain name resolution).

Layer 6: Presentation layer

The presentation layer, also known as the syntax layer, is responsible for formatting, translating, encrypting, and compressing data from the application layer into a compatible format for transmission over the network.

  • Key functions:
    • Data translation: Converts data into a standard format that is universally understood by different systems.
    • Encryption and decryption: Encrypts outgoing data for security and decrypts incoming data for the receiving application.
    • Data compression: Reduces the size of data to increase transmission speed and efficiency.
  • Protocols and formats: SSL/TLS, JPEG, MPEG, MIDI, and ASCII.

Layer 5: Session layer

The session layer is responsible for establishing, managing, and terminating connections—known as "sessions"—between applications on different devices. It handles the coordination of communication and provides synchronization points for data transfer.

  • Key functions:
    • Dialog control: Manages whether communication is half-duplex (one-way at a time) or full-duplex (two-way simultaneously).
    • Synchronization: Inserts checkpoints into the data stream, allowing a session to be resumed from the last checkpoint if a failure occurs.
    • Session management: Handles user logon/logoff and authentication.
  • Protocols: NetBIOS, RPC, and PPTP.

Layer 4: Transport layer

The transport layer provides reliable end-to-end communication between hosts by ensuring that the entire message arrives intact and in the correct order. It breaks data from the session layer into smaller units called segments for efficient transmission.

  • Key functions:
    • Segmentation and reassembly: Segments data for transmission and reassembles it at the destination.
    • Flow control: Manages the rate of data transmission to prevent the sender from overwhelming the receiver.
    • Error control: Detects and corrects errors or retransmits lost segments to ensure reliable delivery.
  • Protocols:
    • TCP (Transmission Control Protocol): A connection-oriented protocol that guarantees reliable delivery through acknowledgments and retransmissions.
    • UDP (User Datagram Protocol): A connectionless protocol that offers faster but less reliable transmission, suitable for streaming media and online gaming.

Layer 3: Network layer

The network layer is responsible for routing data packets across different networks and determining the optimal path for data delivery. It uses logical addresses (IP addresses) to identify hosts and networks.

  • Key functions:
    • Routing: Uses routing protocols to select the most efficient path for data.
    • Logical addressing: Assigns IP addresses to devices for unique identification across interconnected networks.
    • Packet fragmentation and reassembly: Breaks large packets into smaller ones if needed for the data link layer and reassembles them at the destination.
  • Protocols: IP, ICMP, ARP, and routing protocols like OSPF and BGP.

Layer 2: Data link layer

The data link layer handles node-to-node data transfer within the same network segment. It frames the data into manageable units and provides physical addressing (MAC addresses).

  • Key functions:
    • Framing: Organizes bits from the physical layer into logical groups called frames.
    • Physical addressing: Adds the source and destination MAC addresses to the frame header for local delivery.
    • Error control: Detects and handles errors that occur during physical transmission.
    • Access control: Determines which device has permission to transmit data over a shared medium.
  • Protocols and standards: Ethernet, Wi-Fi (IEEE 802.11), and PPP.

Layer 1: Physical layer

The physical layer is the lowest layer and consists of the physical network components, such as cables, connectors, and network interface cards (NICs). Its primary responsibility is the transmission of unstructured, raw data bits (1s and 0s) over a physical medium.

  • Key functions:
    • Bit rate control: Defines the data transmission rate.
    • Bit synchronization: Synchronizes the sender and receiver at the bit level.
    • Transmission modes: Specifies the direction of data flow (e.g., simplex, half-duplex, or full-duplex).
    • Physical topologies: Defines the network layout, such as bus, star, or mesh.
  • Protocols and technologies: Ethernet, Wi-Fi (IEEE 802.11), and USB.

OSI vs. TCP/IP model

While the OSI model is a comprehensive, conceptual framework, the TCP/IP model is a more practical, protocol-driven model that is the foundation of the modern internet.

Feature OSI Model TCP/IP Model
Layers 7 layers 4 layers
Nature Conceptual and protocol-independent Practical and protocol-specific
Application Layer Layers 5, 6, and 7 are separate Combines presentation, session, and application layers into one
Network Access Layer Layers 1 and 2 are separate Combines physical and data link layers into one
Reliability The transport layer guarantees packet delivery The transport layer, specifically TCP, ensures reliability
Development Developed by ISO in the 1980s Developed by the U.S. Department of Defense in the 1970s
Primary use For education, analysis, and troubleshooting For actual implementation in real-world networks

The importance of the OSI model

Even though it is primarily a conceptual model, the OSI protocol stack remains an essential part of networking education and practice for several reasons.

  • Troubleshooting: Its layered structure allows network professionals to isolate a problem to a specific layer and focus their efforts on finding a solution.
  • Standardization: It provides a universal language for discussing network communication, helping different vendors and developers create interoperable hardware and software.
  • Modularity: The independent layers encourage innovation, allowing developers to improve protocols and technologies at a single layer without overhauling the entire network stack.
  • Logical organization: The model provides a clear structure for understanding how network systems function, from the physical hardware to the user interface.
Enjoyed this article? Share it with a friend.