OSI Model (Open Systems Interconnection)
The OSI model is a 7-layer theoretical framework created by the International Organization for Standardization (ISO). It helps standardize the functions of a telecommunication or computing system.
🔢 OSI Layers (from top to bottom):
| Layer | Name | Function |
|---|---|---|
| 7 | Application | Interfaces directly with the user (e.g., browsers, email clients) |
| 6 | Presentation | Translates data formats (encryption, compression, encoding) |
| 5 | Session | Manages sessions/connections between applications |
| 4 | Transport | Ensures reliable delivery (TCP), error detection, and flow control |
| 3 | Network | Handles addressing and routing (e.g., IP addresses) |
| 2 | Data Link | Transfers data between adjacent network nodes (MAC addresses, frames) |
| 1 | Physical | Transmits raw bits over a physical medium (cables, radio waves) |
🖧 2. TCP/IP Model (Transmission Control Protocol/Internet Protocol)
The TCP/IP model is a more practical, 4-layer model used as the foundation of the modern internet. It maps closely to the OSI model but combines some layers.
🔢 TCP/IP Layers:
| Layer | Equivalent OSI Layers | Function |
|---|---|---|
| 4 | Application (OSI 5-7) | Provides network services to applications (HTTP, FTP, SMTP) |
| 3 | Transport (OSI 4) | Ensures end-to-end communication and reliability (TCP/UDP) |
| 2 | Internet (OSI 3) | Routes data packets across networks (IP addressing, routing) |
| 1 | Network Interface (OSI 1-2) | Handles physical transmission and frame formatting |
Key Differences
| OSI Model | TCP/IP Model |
|---|---|
| Theoretical, reference model | Practical, implemented model |
| 7 layers | 4 layers |
| Protocol-independent | Built around standard protocols (TCP/IP) |
| Rarely used in implementation | Used in real-world networking (e.g., internet) |
