The OSI Model: Transport to Application
The bottom three layers get a packet to the right machine. But the files box runs several services, Asha's browser has a dozen tabs open, and the data might be a compressed image, an encrypted page or plain text. The top four OSI layers sort out which program, which conversation, which format and which request.
The rule
Transport picks the program, Session the conversation, Presentation the format, Application the request.
Layer 4 — Transport. End-to-end delivery between programs, identified by port numbers. TCP adds handshakes, ordering and resending; UDP just sends. Units are segments (TCP) or datagrams (UDP). Firewalls that filter by port are working at layer 4.
Layer 5 — Session. Opening, keeping and closing a dialogue between two applications, and picking it up again after an interruption — for example, a large upload that resumes from a checkpoint instead of starting over, or a login session kept alive while you work.
Layer 6 — Presentation. How the bytes are represented: character encoding (such as UTF-8), data formats (JPEG, PNG), compression, and encryption and decryption. It lets two systems agree on what the bits mean.
Layer 7 — Application. The network protocols applications use to ask for things: HTTP, DNS, SMTP, IMAP, SSH, FTP. Careful: layer 7 is the protocol a browser speaks, not the browser program itself.
In the real internet, layers 5 to 7 are rarely separate pieces of software; one application or library usually handles all three. TLS, for instance, manages a secure session and encrypts data, so it is often described as spanning layers 5 and 6. The OSI split is still useful for thinking and talking, even where the code blurs it.
The shortcut
For any feature, ask what it is deciding: Which program? → 4. Which conversation, and can it resume? → 5. What do the bytes look like? → 6. What is being asked for? → 7.
Layer 7 — the request
Her browser sends an HTTP
GETfor/photos/logo.png.
The trap is naming "Google Chrome" as a layer-7 thing. The layer is HTTP; Chrome is just a program that speaks it.
Drills
Answer fast — trust the rule.
Which OSI layer uses port numbers to deliver data to the right program?
Converting text to UTF-8 and compressing an image belong to which layer?
A 2 GB upload drops halfway and later resumes from where it stopped. Which layer's idea is that?
Which of these is a layer-7 protocol?
Remember
- Transport picks the program, Session the conversation, Presentation the format, Application the request.
- Layer 7 is the protocol (HTTP, DNS, SMTP), not the app that speaks it.
- In practice, layers 5–7 are usually handled together by one application or library.
