OSI Model

Open Systems Interconnection — a conceptual framework that standardises the functions of a networking system into seven distinct layers.

7 Layers Sender → Receiver PDU: Protocol Data Unit ISO / IEC 7498

What is the OSI Model?

The OSI (Open Systems Interconnection) model is a reference model that describes how data travels from an application on one device to an application on another device over a network.

  • Developed by ISO in 1984
  • Divides network communication into 7 layers
  • Each layer has a specific function
  • Helps troubleshoot and design networks

How It Works

Data is passed down the layers at the sender side (encapsulation) and up the layers at the receiver side (de-encapsulation).

  • Sender: Application → Physical
  • Receiver: Physical → Application
  • Each layer adds its own header (PDU)
  • Peer layers communicate logically
7 Application Data
6 Presentation Data
5 Session Data
4 Transport Segment
3 Network Packet
2 Data Link Frame
1 Physical Bits

Click a layer

Select any layer from the stack to see its role, functions, and examples.

Application Layer

Layer 7 · User interaction

The Application layer is the closest to the end-user. It provides network services directly to applications, enabling user communication and data exchange.

  • Provides interfaces for applications
  • Protocols: HTTP, FTP, SMTP, DNS, Telnet
  • Handles resource sharing & remote access
Example: A web browser (Chrome) using HTTP to request a webpage from a server.

Presentation Layer

Layer 6 · Data formatting & encryption

The Presentation layer translates data between the application and the network. It ensures that data is readable by the receiving system.

  • Data encryption & decryption
  • Compression & decompression
  • Character encoding (ASCII, Unicode, EBCDIC)
Example: SSL/TLS encryption for secure data transmission, or JPEG/MPEG compression.

Session Layer

Layer 5 · Connection management

The Session layer establishes, manages, and terminates communication sessions between two devices.

  • Session setup, maintenance & teardown
  • Dialog control (half-duplex / full-duplex)
  • Checkpointing / recovery
Example: An RPC (Remote Procedure Call) session or a NetBIOS name service.

Transport Layer

Layer 4 · End-to-end delivery

The Transport layer ensures complete data transfer with error recovery and flow control. It segments data and reassembles it at the destination.

  • Segmentation & reassembly
  • Error detection & recovery
  • Flow control & congestion control
  • Protocols: TCP (reliable), UDP (unreliable)
Example: TCP establishes a connection (3-way handshake) and ensures all segments arrive correctly.

Network Layer

Layer 3 · Routing & addressing

The Network layer is responsible for logical addressing and routing data across multiple networks.

  • Logical addressing (IP addresses)
  • Routing (path determination)
  • Packet forwarding
  • Protocols: IP, ICMP, OSPF, BGP
Example: A router uses IP addresses to forward packets from source to destination network.

Data Link Layer

Layer 2 · Node-to-node delivery

The Data Link layer handles the transmission of data between adjacent network nodes. It frames packets and manages error detection.

  • Framing & media access control (MAC)
  • Physical addressing (MAC addresses)
  • Error detection (CRC) & flow control
  • Sub-layers: LLC & MAC
  • Trailer added: Frame Check Sequence (FCS) for error detection
Example: Ethernet switches use MAC addresses to forward frames within a local network.

Physical Layer

Layer 1 · Raw bit transmission

The Physical layer is the lowest layer. It transmits raw bits over a physical medium — cables, radio waves, or optical fibres.

  • Bit representation (voltage, light, frequency)
  • Data rate & synchronization
  • Transmission mode (simplex, half-duplex, full-duplex)
  • Hardware: hubs, repeaters, cables, NICs
Example: An Ethernet cable transmitting electrical signals that represent 1s and 0s.

Sender vs Receiver — Data Flow

Sender (Encapsulation)

  • Application — User data generated (e.g., email, file)
  • Presentation — Data formatted & encrypted
  • Session — Session established with receiver
  • Transport — Data segmented into Segments
  • Network — Segments packed into Packets (IP)
  • Data Link — Packets framed into Frames (MAC) + Trailer (FCS)
  • Physical — Frames converted to Bits & transmitted

Each layer adds a header (Layer 2 also adds a trailer) — this is encapsulation.

Receiver (Decapsulation)

  • Physical — Bits received & converted to frames
  • Data Link — Frame header + trailer removed → Packets
  • Network — Packet headers removed → Segments
  • Transport — Segments reassembled into data
  • Session — Session management & sync
  • Presentation — Decryption & formatting
  • Application — Data delivered to the user application

Each layer removes its corresponding header (and trailer) — this is decapsulation.

OSI Model Reference · Click any layer to explore · Includes TCP/IP mapping, devices, mnemonics & peer logic