OSI Model·Lesson 11 of 12
Functions of Each Layer (Summary)
The Whole Model on One Page
You've now met all seven layers one at a time. This lesson pulls them together into a single reference you can revise from. If you're short on time before an interview, this is the page to read. We'll recap each layer's job, the name of the data at each layer, and the devices and protocols that live there.
The mental model
Read from the bottom up: Layer 1 moves bits, Layer 2 delivers frames locally, Layer 3 routes packets between networks, Layer 4 delivers end-to-end, and Layers 5–7 organize, translate, and serve the data to your apps.
Here's the full stack, top to bottom, with each layer's one-line job and the name of its data unit shown as a pill on the right:
The seven layers, their jobs, and their data units
Application
Network services and protocols for apps
Presentation
Translation, encryption, compression
Session
Open, manage, and close conversations
Transport
End-to-end delivery, reliability, ports
Network
Logical addressing and routing
Data Link
Node-to-node delivery, MAC addressing
Physical
Raw bits as signals on the medium
Every Layer's Job at a Glance
This table is the classic summary interviewers expect you to have in your head — each layer, its main function, its data unit (PDU), and a familiar example:
| Layer | Main function | Data unit | Example |
|---|---|---|---|
| 7 — Application | Network services for apps | Data | HTTP, DNS, SMTP |
| 6 — Presentation | Translate, encrypt, compress | Data | TLS, JPEG, Unicode |
| 5 — Session | Open, manage, close sessions | Data | Session setup, RPC |
| 4 — Transport | End-to-end delivery | Segment | TCP, UDP |
| 3 — Network | Routing across networks | Packet | IP, routers |
| 2 — Data Link | Node-to-node delivery | Frame | Ethernet, switches |
| 1 — Physical | Raw bits as signals | Bit | Cables, hubs |
Addressing and Devices by Layer
A second angle that trips people up: which layer uses which kind of address, and which devices operate where. Only three layers do addressing, and the classic devices sit in the bottom three layers:
| Layer | Address used | Devices / protocols |
|---|---|---|
| 7 — Application | None (names like URLs) | HTTP, DNS, SMTP, FTP |
| 6 — Presentation | None | TLS, JPEG, ASCII/Unicode |
| 5 — Session | None | RPC, NetBIOS |
| 4 — Transport | Port number | TCP, UDP |
| 3 — Network | IP address (logical) | Router, IP |
| 2 — Data Link | MAC address (physical) | Switch, bridge |
| 1 — Physical | None | Hub, repeater, cables |
The three-address rule
Only three layers address data, and they climb in scope: Layer 2 uses the MAC address (this device on the local network), Layer 3 uses the IP address (which network to route to), and Layer 4 uses the port number (which program on the device).
Remembering the Order
Finally, the memory aids. Take the first letter of each layer and turn it into a sentence — whichever direction you find easier to recall:
Mnemonics for the layer order
- Top to bottom (7 to 1): "All People Seem To Need Data Processing" — Application, Presentation, Session, Transport, Network, Data Link, Physical
- Bottom to top (1 to 7): "Please Do Not Throw Sausage Pizza Away" — Physical, Data Link, Network, Transport, Session, Presentation, Application
Q:Quick-fire: name each OSI layer and its data unit, top to bottom.
A: Application (data), Presentation (data), Session (data), Transport (segment), Network (packet), Data Link (frame), Physical (bit). Addressing: Transport uses ports, Network uses IP addresses, Data Link uses MAC addresses. Devices: routers at Layer 3, switches at Layer 2, hubs and repeaters at Layer 1.
Quick Revision Cheat Sheet
7 Application: Services for apps — HTTP, DNS, SMTP (data)
6 Presentation: Translate, encrypt, compress — TLS (data)
5 Session: Open/manage/close sessions (data)
4 Transport: End-to-end delivery — TCP/UDP, ports (segment)
3 Network: Routing — IP, routers (packet)
2 Data Link: Local delivery — MAC, switches (frame)
1 Physical: Bits as signals — cables, hubs (bit)