OSI Model¶
Open System Interconnection Reference Model (OSI) is a conceptual model proposed by the International Organization for Standardization (ISO). It is a standard framework that attempts to interconnect various computers worldwide.
According to recommendation X.200, OSI divides the computer network architecture into seven layers, labeled 1 to 7, with Layer 1 at the bottom.
Hierarchy¶
- Layer 7: Application Layer
- Layer 6: Presentation Layer
- Layer 5: Session Layer
- Layer 4: Transport Layer
- Layer 3: Network Layer
- Layer 2: Data Link Layer
- Layer 1: Physical Layer
Layer 7: Application Layer¶
The Application Layer provides interfaces for application software to establish communication with other applications. Examples include: HTTP, HTTPS, FTP, Telnet, SSH, SMTP, POP3, etc.
Layer 6: Presentation Layer¶
The Presentation Layer converts data into formats compatible with the recipient's system, making it suitable for transmission (e.g., encoding, encryption, compression).
Layer 5: Session Layer¶
The Session Layer is responsible for establishing, managing, and terminating communication sessions between two computers on a network.
Layer 4: Transport Layer¶
The Transport Layer adds a transport header (TH) to the data to form packets. It manages end-to-end transmission, error recovery, and flow control. Examples include: TCP and UDP.
Layer 3: Network Layer¶
The Network Layer handles routing and packet forwarding, adding network headers (NH) to data to form datagrams. Examples include: IP, ICMP, etc.
Layer 2: Data Link Layer¶
The Data Link Layer handles physical addressing, error detection, and synchronization. It packages packets into data frames. It is divided into two sub-layers: Logical Link Control (LLC) and Media Access Control (MAC). Examples include: Ethernet, Wi-Fi, GPRS, etc.
Layer 1: Physical Layer¶
The Physical Layer transmits raw bit streams over physical media (voltage, pin specifications, cables, hubs, network adapters, etc.).