While the OSI model is excellent for academic understanding, the TCP/IP model (or Internet Protocol Suite) is what actually runs the internet. It condenses functionality into four practical layers, prioritizing implementation over rigid separation.
1. The Four Layers
- Application Layer: Defines protocols for node-to-node application processes and handles user-interface specifications. Examples: HTTP, DNS, SSH, MQTT.
- Transport Layer: Provides host-to-host communication services. It handles data flow control, reliability, and multiplexing (ports). Examples: TCP, UDP.
- Internet Layer: Responsible for logical addressing, routing, and packet forwarding across network boundaries. Examples: IPv4, IPv6, ICMP.
- Link Layer (Network Access): Handles the physical transmission of data between devices on the same network. Examples: Ethernet, Wi-Fi, ARP.
2. IP Packet Structure
At the Internet layer, data is encapsulated into packets. Understanding the IP header is crucial for debugging routing and firewall issues.
- Version (4 bits): Usually 4 (IPv4) or 6 (IPv6).
- IHL (4 bits): Internet Header Length.
- TTL (8 bits): Time To Live. Decremented by 1 at every router. Prevents infinite loops.
- Protocol (8 bits): Defines the payload type (e.g., 6 for TCP, 17 for UDP, 1 for ICMP).
- Source & Destination IP: 32-bit addresses.
3. Practical Inspection
As a senior engineer, you should be comfortable inspecting these layers directly.
Layer 2/3 (Link/Internet): Check interfaces and routing.