The OSI Model
Last updated:
The OSI model is the shared vocabulary of networking. Nobody deploys "an OSI network" — real stacks follow TCP/IP — but every conversation about where something breaks ("that's a layer 2 problem") uses these seven layers.
The model as a mind map
Drag to pan, scroll to zoom, and click a branch to collapse it:
Layer-by-layer reference
| # | Layer | PDU | Addressing | Typical devices | Example protocols |
|---|---|---|---|---|---|
| 7 | Application | Data | — | — | HTTP, DNS, SMTP |
| 6 | Presentation | Data | — | — | TLS, MIME |
| 5 | Session | Data | — | — | RPC, PPTP |
| 4 | Transport | Segment | Port numbers | Firewalls (L4) | TCP, UDP, QUIC |
| 3 | Network | Packet | IP addresses | Routers, L3 switches | IPv4, IPv6, ICMP |
| 2 | Data Link | Frame | MAC addresses | Switches, APs | Ethernet, 802.11, ARP |
| 1 | Physical | Bits | — | Cables, transceivers | 1000BASE-T, DWDM |
Mnemonics to remember the layers
Top-down (7 → 1): All People Seem To Need Data Processing
Bottom-up (1 → 7): Please Do Not Throw Sausage Pizza Away
Pick one direction and stick with it — mixing them is how you end up putting TCP at layer 3 in an interview.
Why it still matters
- Troubleshooting is elimination by layer. Link light (L1) → ARP entry (L2) → ping the gateway (L3) → telnet to the port (L4) → then blame the app.
- Encapsulation order explains overhead. Each layer wraps the one above:
Frame [ Packet [ Segment [ Data ] ] ]— which is why MTU math matters. - The model is a map, not the territory. TLS straddles 5–6, ARP sits awkwardly between 2 and 3. That's fine; use the layers as coordinates, not commandments.
Where to go next
The TCP Three-Way Handshake shows layer 4 in action, packet by packet.