Skip to main content

OSI Model

Overview

The OSI (Open Systems Interconnection) model is a conceptual framework that standardizes how different network systems communicate with each other. It divides communication into 7 layers, each with a specific role. The model is vendor-neutral and serves as a reference for understanding how protocols interact.

The 7 Layers

#NameKey Responsibility
7ApplicationUser-facing protocols and services
6PresentationData formatting, encoding, encryption
5SessionSession management between applications
4TransportEnd-to-end delivery between processes
3NetworkLogical addressing and routing
2Data LinkFrame delivery within a local network
1PhysicalRaw bit transmission over a medium

Layer Details

Layer 1 – Physical

Transmits raw bits over a physical medium (cables, radio, fiber). Defines voltage levels, pin layouts, and bit timing. Has no concept of addressing.

Examples: Ethernet cables, Wi-Fi radio signals, fiber optics, hubs, repeaters

Packages bits into frames and handles delivery within a single network segment using MAC addresses. Also detects transmission errors via CRC.

Sublayers: LLC (Logical Link Control) and MAC (Media Access Control)

Examples: Ethernet, Wi-Fi (802.11), ARP, switches

Layer 3 – Network

Handles logical addressing (IP) and routing of packets across multiple networks. Determines the best path from source to destination.

Examples: IP (IPv4, IPv6), ICMP, routers

Layer 4 – Transport

Provides end-to-end communication between processes. Manages segmentation, reassembly, flow control, and error recovery.

  • TCP: connection-oriented, reliable, ordered delivery
  • UDP: connectionless, faster, no delivery guarantee

Examples: TCP, UDP, port numbers

Layer 5 – Session

Establishes, manages, and terminates sessions (logical connections) between applications. Supports synchronization and checkpointing for long data transfers.

Examples: NetBIOS, RPC, session tokens

Layer 6 – Presentation

Translates data between the application and network format. Handles encoding, serialization, compression, and encryption.

Examples: TLS/SSL (encryption), JSON, XML, JPEG, MPEG

Layer 7 – Application

The layer closest to the user. Provides network services directly to applications. Does not refer to the applications themselves, but to the protocols they use.

Examples: HTTP, HTTPS, FTP, SMTP, DNS, SSH

Mnemonic

To remember the layers from bottom (1) to top (7):

Please Do Not Throw Sausage Pizza Away`

Physical, Data Link, Network, Transport, Session, Presentation, Application