2.1.2. Layer 4-7: The Service Layers
These layers handle end-to-end communication and application services:
| Layer | Name | Function | Key Protocols |
|---|---|---|---|
| 4 | Transport | End-to-end delivery, segmentation | TCP, UDP |
| 5 | Session | Connection management | NetBIOS, RPC |
| 6 | Presentation | Data formatting, encryption | SSL/TLS, JPEG, ASCII |
| 7 | Application | User interface, network services | HTTP, DNS, SMTP, FTP |
Layer 4 (Transport): The critical distinction is TCP vs. UDP. TCP provides reliability (sequencing, acknowledgments, retransmission, flow control) at the cost of overhead. UDP provides speed without guarantees. Port numbers at this layer identify which application receives data.
Layers 5-7: In practice, these often blend. Modern applications handle session management, data formatting, and protocols as integrated functions. The exam focuses more on Layer 4 distinctions than Layers 5-6 specifics, but know that TLS encryption is Layer 6 and HTTP is Layer 7.
⚠️ Exam Pattern: "Which layer" questions are common. DNS is Layer 7 (application protocol). TLS is Layer 6 (presentation/encryption). TCP is Layer 4 (transport). A firewall blocking a port operates at Layer 4. A firewall inspecting HTTP content operates at Layer 7.