Worked examples — OSI model — 7 layers, responsibilities, PDU names
Before anything else, one word we lean on constantly:

Look at the picture above: the same yellow payload sits at the centre of every box. Each layer only adds a chalk-blue header (and Layer 2 adds a pink trailer on the right). Nothing is ever removed on the way down — that is the single fact that makes all the "size" examples below work.
The scenario matrix
Every OSI exam question is really one of these cells. Our 8 examples below hit all of them.
| Cell | Case class | Covered by |
|---|---|---|
| A | Name→number lookup (which layer does X?) | Ex 1 |
| B | Number→PDU lookup (what is the data called here?) | Ex 2 |
| C | Device→layer mapping (router / switch / hub) | Ex 3 |
| D | Encapsulation direction (down = wrap) | Ex 4 |
| E | De-encapsulation direction (up = unwrap) | Ex 4 |
| F | Size / overhead arithmetic (additive headers) | Ex 5 |
| G | Degenerate input: zero-byte payload | Ex 5 |
| H | Limiting case: MTU exceeded / fragmentation | Ex 6 |
| I | Real-world word problem (browser loads a page) | Ex 7 |
| J | Exam-style trap (the "feels right but wrong" twist) | Ex 8 |
Example 1 — Cell A: name → number
- Identify the job words. "Encryption", "translation", "compression" are the three signature jobs of one specific layer. Why this step? OSI questions are pattern-matching: each verb belongs to exactly one home layer. Learn the verb→layer map and lookups become instant.
- Map to the layer. Those three verbs are the Presentation layer's responsibilities. Why this step? The Application layer (7) is only the door for user programs; the translating/scrambling happens one floor below.
- Convert name to number. Counting from the top (7 = Application, 6 = Presentation), Presentation is Layer 6. Why this step? The question asked for a number, so we finish the translation.
Answer: Layer 6 (Presentation).
Recall Verify
Sanity check with the mnemonic "All People Seem…": the second word (People → Presentation) is the 6th layer counting down from 7. . ✓
Example 2 — Cell B: number → PDU name
- Recall the PDU chain (top→bottom): Data → Data → Data → Segment → Packet → Frame → Bits. Why this step? Layers 7,6,5 all still call it plain "Data"; the name only starts changing at Layer 4. You must know where the first rename happens.
- Pin Layer 4's output. After Transport adds its header (a TCP header, per TCP vs UDP), the unit is a Segment (or Datagram for UDP). Why this step? The Transport header is what earns the new name — no header, no rename.
- Name the layer above (Layer 5, Session). At Layer 5 it was still just Data. Why this step? Confirms the boundary: "Data" ends and "Segment" begins exactly at the 5→4 handoff.
Answer: at Layer 4 it is a Segment (UDP: Datagram); at Layer 5 it was still Data.
Recall Verify
"Big Fat Pandas Sleep Deeply" = Bits, Frames, Packets, Segments, Data (bottom→top). Segment is the 4th word ⇒ Layer 4. ✓
Example 3 — Cell C: device → layer
- Hub → Layer 1. A hub only repeats electrical signals to all ports; it reads no addresses at all. Why this step? If a device never inspects any header, it lives at the Physical layer where there are no addresses — just bits.
- Switch → Layer 2. A switch reads the MAC address in the frame header to forward to the correct port. See MAC Address and ARP. Why this step? Reading MAC = reading the Layer-2 (Data Link) header, so a switch's ceiling is Layer 2.
- Router → Layer 3. A router reads the IP address to choose a path across networks. See IP Addressing and Subnetting. Why this step? IP lives in the Network (Layer 3) header; understanding it makes the router a Layer-3 device.
Answer: Hub (L1) < Switch (L2) < Router (L3). Full comparison in Routers vs Switches vs Hubs.
Recall Verify
Layers used: hub 1, switch 2, router 3 — strictly increasing . ✓
Example 4 — Cells D & E: encapsulation down, de-encapsulation up

- Sender goes DOWN (encapsulation = wrapping). Data (L7-5) → +Transport header → Segment (L4) → +IP header → Packet (L3) → +MAC header/trailer → Frame (L2) → serialized to Bits (L1). Why this step? Going down, each layer prepends its own header, so the unit only grows and gets a new name. This is the mechanism the size examples depend on.
- Signal crosses the wire as raw bits. Why this step? Layer 1 is the only place actual physics (voltage/light/radio) happens; every layer above is bookkeeping.
- Receiver goes UP (de-encapsulation = unwrapping). Bits (L1) → assemble → Frame (L2) → strip MAC → Packet (L3) → strip IP → Segment (L4) → strip Transport → Data (L5-7). Why this step? Each layer removes exactly the header its peer added. Symmetry is the whole point of a layered model — a layer only ever talks to the same layer on the other machine.
Answer: Down: Data→Segment→Packet→Frame→Bits. Up: Bits→Frame→Packet→Segment→Data. Perfect mirror.
Recall Verify
Reversing the down-sequence [Data, Segment, Packet, Frame, Bits] gives [Bits, Frame, Packet, Segment, Data], exactly the up-sequence. ✓ (checked in VERIFY)
Example 5 — Cells F & G: overhead arithmetic + zero-byte payload
- Add every header and trailer to the payload. Encapsulation is purely additive (nothing is removed going down), so: Why this step? From Ex 4, each layer only adds. So total size is just a sum — no subtraction anywhere.
- Plug in for (a). Why this step? Direct substitution; this is the number that actually travels.
- Overhead for (b). Overhead bytes . As a fraction of the whole frame: Why this step? "Overhead" means the bytes you're forced to send that aren't your actual message — a real cost, explained in the parent note.
- Degenerate case (c): . The payload vanishes but the headers/trailer do not: Why this step? This proves headers exist independently of data — a zero-byte frame (like a bare TCP ACK) is still B of pure overhead ().
Answers: (a) B, (b) , (c) B (all overhead).
Recall Verify
Payload + overhead = = frame size. ✓ And ✓ Zero-payload frame B. ✓
Example 6 — Cell H: limiting case (MTU exceeded → fragmentation)
- Define the ceiling. MTU is the biggest chunk one frame is allowed to carry. Here B. Why this step? At the limit, the additive model of Ex 5 hits a wall — you cannot just keep growing one frame forever; the medium caps it.
- Compare demand to ceiling. We need to move B but each packet holds at most B. Since , a single packet is impossible. Why this step? This is the "limiting case" — the exact moment the clean one-frame story breaks and the Network layer must act.
- Fragment. Layer 3 splits the data into ceiling-sized pieces: Why this step? The ceiling function rounds up because a leftover B still needs its own whole packet — you can't send two-thirds of a frame.
- Check the split. . ✓ The third packet is a partial B. Why this step? Confirms no data is lost and the last fragment absorbs the remainder.
Answer: 3 packets (1500 + 1500 + 1000 B). The receiver's Layer 3 reassembles them.
Recall Verify
and . ✓
Example 7 — Cell I: real-world word problem
- (i) HTTP request → Layer 7 (Application). The browser is a user program; HTTP is its "door" into the network. Why this step? Application is where human-facing protocols live — the request is born here.
- (ii) TLS encryption → Layer 6 (Presentation). Classic OSI puts encryption/translation at Presentation. Why this step? Encryption is a format transformation, the Presentation layer's signature job (Ex 1).
- (iii) Port 443 → Layer 4 (Transport). Ports steer data to the right process on the machine. See Ports and Sockets. Why this step? IP finds the machine; the port finds the program (443 = the web server), which is Transport's job.
- (iv) Destination IP → Layer 3 (Network). IP is the logical address for routing across networks. Why this step? To leave your LAN and cross the Internet you need a Layer-3 address a router understands.
- (v) Destination MAC → Layer 2 (Data Link). MAC delivers to the correct device on the local link. Why this step? The very next hop is a physical neighbour identified by MAC, not IP — hence the lowest addressing layer.
Answer: (i) L7, (ii) L6, (iii) L4, (iv) L3, (v) L2 — a clean top-to-bottom descent.
Recall Verify
The five layer numbers in order are — strictly decreasing, matching a downward pass through the stack (we skip L5 Session and L1 Physical, which do no addressing here). ✓
Example 8 — Cell J: the exam trap
- Spot why it feels true. "Transport" sounds like "moving things over distance", so learners assign it the long-haul routing job. Why this step? Naming the trap out loud is how you disarm it — the exam is testing this exact confusion.
- Recall Transport's real job. Transport is end-to-end: ports, reliability (TCP), flow/error control. It does not know the path. Why this step? Transport treats the network as an abstract pipe — "give this to app X on machine Y, reliably" — and delegates how to lower layers.
- Assign routing correctly. Choosing a path across networks is Layer 3 (Network) — the router's layer. Why this step? Routing = IP addresses + forwarding decisions, which are Layer-3 concepts (Ex 3).
Answer: FALSE. Routing (path selection) is Layer 3 (Network). Transport (Layer 4) does end-to-end delivery to the right port/process, reliability, and flow control — never path choice.
Recall Verify
Routing layer , Transport layer , and , so the two jobs live on different layers ⇒ statement is false. ✓