The OSI (Open Systems Interconnection) reference model is a seven-layer framework from ISO that splits network communication into layers. Each layer serves the one above it and uses the one below, so each can be designed and changed independently. Data travels down the layers at the sender (each adds its header: encapsulation) and up at the receiver.
| Layer | Function | Data unit / examples |
| 7 Application | Network services for user applications | Data — HTTP, FTP, SMTP, DNS |
| 6 Presentation | Translation, encryption, compression | Data — TLS, JPEG, ASCII |
| 5 Session | Opens, manages and closes sessions; checkpoints | Data — RPC, NetBIOS |
| 4 Transport | End-to-end delivery, segmentation, flow and error control, ports | Segment — TCP, UDP |
| 3 Network | Logical (IP) addressing and routing between networks | Packet — IP, ICMP; router |
| 2 Data Link | Framing, MAC addressing, error detection on one link | Frame — Ethernet; switch |
| 1 Physical | Sends raw bits over the medium: voltages, cables, signals | Bit — cables, hub |
Memory aid (layer 7 down): All People Seem To Need Data Processing.
Why it matters: standard interfaces let vendors interoperate, and troubleshooting can be done layer by layer. (The Internet uses the simpler 4-layer TCP/IP model, which merges layers 5–7 into Application and 1–2 into Link.)
— rhs