Open Systems Interconnection (OSI) Model
Overview
The OSI Model (ISO/IEC 7498-1) is a conceptual framework that divides network communication into seven distinct layers. Each layer serves the layer above it and is served by the layer below it.
The 7 Layers (Top to Bottom)
- Layer 7: OSI Layer 7: Application Layer - User-facing network services (HTTP, DNS, SSH, SMTP).
- Layer 6: OSI Layer 6: Presentation Layer - Data formatting, encryption, and compression (TLS, JPEG, ASCII).
- Layer 5: OSI Layer 5: Session Layer - Session establishment, management, and termination (RPC, NetBIOS, SOCKS).
- Layer 4: OSI Layer 4: Transport Layer - End-to-end delivery, reliability, and flow control (TCP, UDP).
- Layer 3: OSI Layer 3: Network Layer - Packet forwarding, logical addressing, and routing (IP, ICMP, BGP).
- Layer 2: OSI Layer 2: Data Link Layer - Node-to-node framing, physical addressing, and error detection (Ethernet, Wi-Fi, MAC).
- Layer 1: OSI Layer 1: Physical Layer - Electrical, optical, or radio signal transmission of raw bitstreams (Cables, Fiber, Hubs).
Data Encapsulation Hierarchy
As data moves down the stack during transmission:
- Data (L7-L5) $\to$ Segment (L4) $\to$ Packet (L3) $\to$ Frame (L2) $\to$ Bits (L1)
Comparison with TCP/IP
While the OSI model is a 7-layer theoretical reference standard, modern internet architecture is built on the practical 4-layer TCP/IP Protocol Suite (Internet Model).