Layered Network Protocol Architectures: OSI and TCP/IP
Protocol architectures organize communication tasks into layers. Each layer handles a specific function, ensuring modularity, easier troubleshooting, and interoperability.
๐น What is a Protocol Stack?
A protocol stack is a collection of network protocols layered to work together. Each layer performs a specific function and interacts with layers directly above and below.
๐น OSI Model (Open Systems Interconnection)
The OSI model is a theoretical model developed by ISO to standardize networking.
๐ผ๏ธ OSI Model Layers (Top to Bottom)
โโโโโโโโโโโโโโโโ 7. Application (e.g., HTTP, FTP)
โ โ
โโโโโโโโโโโโโโโโค 6. Presentation (e.g., Encryption, JPEG)
โ โ
โโโโโโโโโโโโโโโโค 5. Session (e.g., APIs, sockets)
โ โ
โโโโโโโโโโโโโโโโค 4. Transport (e.g., TCP, UDP)
โ โ
โโโโโโโโโโโโโโโโค 3. Network (e.g., IP, ICMP)
โ โ
โโโโโโโโโโโโโโโโค 2. Data Link (e.g., MAC, PPP)
โ โ
โโโโโโโโโโโโโโโโ 1. Physical (e.g., Ethernet cables, signals)
โณ๏ธ Function of Each Layer:
Layer | Function | Example Protocols |
---|---|---|
7. Application | User interface & service | HTTP, FTP, DNS |
6. Presentation | Data formatting, encryption | SSL/TLS, JPEG |
5. Session | Connection setup, sync | NetBIOS, RPC |
4. Transport | Reliable transmission | TCP, UDP |
3. Network | Logical addressing, routing | IP, ICMP |
2. Data Link | MAC addressing, framing | Ethernet, ARP, PPP |
1. Physical | Bits over medium | Cables, Wi-Fi signals |
๐น Mnemonic to Remember
All People Seem To Need Data Processing
๐น TCP/IP Model
The TCP/IP model is the real-world implementation and forms the foundation of the Internet.
๐ผ๏ธ TCP/IP Layers
โโโโโโโโโโโโโโโโโโโโโโโโ 4. Application (HTTP, FTP, SMTP)
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโค 3. Transport (TCP, UDP)
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโค 2. Internet (IP, ICMP)
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโ 1. Network Access / Link (Ethernet, Wi-Fi)
โณ๏ธ TCP/IP vs OSI Layer Mapping
OSI Layer | TCP/IP Layer |
---|---|
Application (7) | |
Presentation (6) | โ Application |
Session (5) | |
Transport (4) | โ Transport |
Network (3) | โ Internet |
Data Link (2) | |
Physical (1) | โ Network Access |
๐ธ TCP/IP merges OSI layers into four practical layers.
๐น Comparison: OSI vs TCP/IP
Feature | OSI Model | TCP/IP Model |
---|---|---|
Developed by | ISO | DoD (Department of Defense) |
Layers | 7 | 4 |
Protocols | Theoretical | Practical/Implemented |
Usage | Reference model | Real-world networking |
Layer separation | Strict | Flexible |
๐น Benefits of Layering
- Modularity: Layers are independent.
- Interoperability: Vendors can create compatible products.
- Troubleshooting: Problems can be isolated per layer.
- Scalability: Easy to upgrade layers without affecting others.
๐น Encapsulation Process
Encapsulation adds headers as data moves down layers (sender). Each layer wraps the data.
[Application Data]
โ
[App Header + Data]
โ
[Transport Header + Data]
โ
[Network Header + Data]
โ
[Data Link Header + Data + Trailer]
โ
[Physical Layer: Bits on wire]
On the receiver side, the reverse happens (decapsulation).
๐ Summary
Both OSI and TCP/IP models define how data is transmitted across networks using layered protocols. While OSI is a conceptual model, TCP/IP is the foundation of real-world networking. Understanding the layered architecture helps in designing, implementing, and troubleshooting network systems.
Next Up: LAN, WAN, MAN, PAN, and LAN Topologies