Computer Network
The OSI (Open Systems Interconnection) model splits network communication into 7 layers. Each layer serves the layer above it. Mnemonic (top → bottom): All People Seem To Need Data Processing.
OSI layers, example protocols, PDU names and the matching TCP/IP layers
| Layer | Job | Device |
|---|---|---|
| Application | Network services to the user (web, mail) | Gateway |
| Presentation | Translation, encryption, compression | — |
| Session | Open, manage and close sessions | — |
| Transport | End-to-end delivery, ports, segmentation, flow and error control | Firewall |
| Network | Logical addressing (IP) and routing | Router |
| Data Link | Physical addressing (MAC), framing, error detection | Switch, Bridge |
| Physical | Transmit raw bits over the medium | Hub, Repeater, Cable |
Q & A
- What is encapsulation?
Each layer adds its own header while data goes down (data → segment → packet → frame → bits). The receiver removes them going up (decapsulation).