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 of which has a specific role. The model is vendor-neutral and serves as a reference for understanding how protocols interact.
The 7 Layers
| # | Name | Key Responsibility | Protocols and Standards |
|---|---|---|---|
| 7 | Application | User-facing protocols and services | HTTP, HTTPS, DNS, DHCP, FTP, SMTP, SSH |
| 6 | Presentation | Data formatting, encoding, encryption | TLS/SSL, JSON, XML, JPEG, MPEG |
| 5 | Session | Session management between applications | NetBIOS, RPC |
| 4 | Transport | End-to-end delivery between processes | TCP, UDP |
| 3 | Network | Logical addressing and routing | IPv4, IPv6, ICMP, IPsec |
| 2 | Data Link | Frame delivery within a local network | Ethernet (802.3), Wi-Fi (802.11), ARP |
| 1 | Physical | Raw bit transmission over a medium | Ethernet (copper, fiber), DSL, Bluetooth radio |
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.
Devices: Hubs, repeaters
Layer 2 – Data Link
Packages bits into frames, handles delivery within a single network segment using MAC addresses, and detects transmission errors via CRC.
Sublayers: LLC (Logical Link Control) and MAC (Media Access Control)
Devices: Switches
Layer 3 – Network
Handles logical addressing (IP) and routing of packets across multiple networks. Determines the best path from source to destination.
Devices: 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, data unit segment
- UDP: Connectionless, faster, no delivery guarantee, data unit datagram
Layer 5 – Session
Establishes, manages, and terminates sessions (logical connections) between applications. Supports synchronization and checkpointing for long data transfers.
Layer 6 – Presentation
Translates data between the application and network format. Handles encoding, serialization, compression, and encryption.
Layer 7 – Application
Forms the layer closest to the user and provides network services directly to applications. Does not refer to the applications themselves, but to the protocols they use.
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