Pebellslearn by building
0%
RoadmapsMatrixCoursesSandboxSign in
The OSI and TCP/IP Models  ›  Lesson

The OSI Model: Transport to Application

Transport 14 minThe top four OSI layers decide which program receives data, how a conversation is managed, how data is represented, and what the application is asking for.

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.

Asha downloads a photo over HTTPSStep 1 of 4
  1. Layer 7 — the request

    Her browser sends an HTTP GET for /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.

quick drill

Which OSI layer uses port numbers to deliver data to the right program?

quick drill

Converting text to UTF-8 and compressing an image belong to which layer?

quick drill

A 2 GB upload drops halfway and later resumes from where it stopped. Which layer's idea is that?

quick drill

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.

Practice — level up

0/1 solved

Write your answer, then compare it with a rubric and a model answer.

ExplainPlace the pieces

Asha downloads a PNG image over HTTPS. Place each of these at an OSI layer and explain why: the HTTP GET request, the PNG format and TLS encryption, the resumable secure session, and TCP on port 443.