Computer Networks · Module 3 — Layered Models
Encapsulation, headers and PDU names
Every layer needs control information to do its job.
Sign in to track your score
You put a letter in an envelope, and the envelope in a courier bag. The courier reads the bag. The post office reads the envelope. Only your friend reads the letter.
Why & what
Why each layer adds its own label. Every layer needs control information to do its job.
- Transport needs to know the port.
- Network needs the IP addresses.
- Data Link needs the MAC addresses and an error check.
You could put all of that in one big label at the front. But then a switch, which only cares about MAC addresses, would have to read and understand port numbers and IP addresses too. Every device would need to understand everything.
So each layer adds only its own label, right in front of whatever it received from above.
What the words mean.
- Header : the label a layer adds in front of the data.
- Trailer : — a label added at the end. Only the Data Link layer adds one: the FCS (Frame Check Sequence), used to spot damage.
- Payload : everything handed down from the layer above. To this layer, it is just data. It does not look inside.
- Encapsulation : — wrapping the payload with your header as it goes down.
- Decapsulation : stripping your header off as it goes up.
PDU names. PDU means Protocol Data Unit: the name for the bundle at each layer.
Interviewers ask this directly.
| Layer | What it is called |
|---|---|
| Application | Data |
| Transport | Segment (TCP) or Datagram (UDP) |
| Network | Packet |
| Data Link | Frame |
| Physical | Bits |
How it works
Aisha's request going down, with the name changing at each step.
- The browser produces the request. At this point it is just data.
- Transport adds a TCP header with the ports — source 51520, destination 443. Now it is a segment.
- Network adds an IP header from 192.168.1.42, to 203.0.113.10. Now it is a packet.
- Data Link adds a frame header with MAC addresses, plus the FCS trailer at the end. Now it is a frame.
- Physical sends it out as bits — radio for Wi-Fi, light for fibre.
At the far end, the same five steps run backwards. Each layer removes only the header it recognises and passes the rest up.

Common confusion
Students think each device opens the whole packet to see what is inside. Actually, every device reads only the header for its own layer and ignores the rest.
The hostel switch reads the frame header, sees Rahul's MAC address, forwards it, and never looks at the IP header. The router reads the IP header, picks a route, and never looks at your HTTP request. This is why HTTPS works at all the routers in between move your data without being able to read it.
Interview angle
Asked as: "What is encapsulation?" or "What is the PDU at the network layer?" The PDU table is a favourite because it is easy to grade.
Model answer:
Encapsulation is the process of each layer adding its own header, and sometimes a trailer, to the data it receives from the layer above, as data moves down the stack. The names change as it goes. At the application layer it is data. Transport adds ports and it becomes a segment for TCP, a datagram for UDP. The network layer adds IP addresses and it becomes a packet. The data link layer adds MAC addresses and an FCS trailer and it becomes a frame. The physical layer transmits it as bits. On the receiving side, decapsulation happens in reverse: each layer strips only its own header and passes the payload up. Each device only reads the header for the layer it works at.
- 1.
The PDU at the network layer is called a
- 2.
Which layer adds a trailer as well as a header?
- 3.
A switch forwarding Aisha's frame reads
- 4.
Decapsulation happens when data moves