OSI Model (7 Layers)
The OSI model provides a conceptual framework for how networked systems communicate. While the Internet largely follows TCP/IP, OSI remains a useful reference for layering and responsibilities.
| Layer | Name | Primary Responsibilities | Common Examples |
| 7 | Application | End-user protocols, resource sharing | HTTP, SMTP, DNS, TLS (handshake surface) |
| 6 | Presentation | Data representation, serialization, encryption at message level | JSON, XML, TLS record/serialization |
| 5 | Session | Session management, dialog control | HTTP cookies/sessions, RPC sessioning |
| 4 | Transport | End-to-end transport, reliability, flow control | TCP, UDP, QUIC |
| 3 | Network | Logical addressing, routing | IP, ICMP, routing protocols |
| 2 | Data Link | Framing, MAC addressing, switching | Ethernet (802.3), Wi-Fi (802.11), VLANs (802.1Q) |
| 1 | Physical | Signals, media, connectors, rates | UTP fiber/copper, radio, optics |
ASCII Diagram
+---------------------------+
| 7 Application | HTTP, DNS, SMTP
+---------------------------+
| 6 Presentation | JSON, TLS records
+---------------------------+
| 5 Session | Sessions, dialogs
+---------------------------+
| 4 Transport | TCP, UDP, QUIC
+---------------------------+
| 3 Network | IP, routing
+---------------------------+
| 2 Data Link | Ethernet, Wi-Fi, VLANs
+---------------------------+
| 1 Physical | Copper, fiber, RF
+---------------------------+
Tip: When troubleshooting, move layer-by-layer (physical first). For web issues, inspect DNS (L7/L3), TLS (L6), and HTTP (L7) alongside transport (L4).