Appearance
PDU Names (Segment / Packet / Frame / Bit)
A PDU (Protocol Data Unit) is the name given to data at each layer. As data travels down the layers, each layer wraps it and the "chunk" gets a new name.
| OSI Layer | TCP/IP Layer | PDU Name |
|---|---|---|
| Application (L7), Presentation (L6), Session (L5) | Application | Message / Data |
| Transport (L4) | Transport | Segment (TCP) / Datagram (UDP) |
| Network (L3) | Internet | Packet |
| Data Link (L2), Physical (L1) | Network Access | Frame / Bits |
What's Inside Each PDU? (Russian Nesting Dolls)
BITS
└── FRAME [L2 Header + L2 Trailer]
└── PACKET [L3 Header]
└── SEGMENT [L4 Header]
└── DATA (actual payload)Segment: [ Source Port | Dest Port | Seq No. | Ack No. | Flags | Data ]
Packet: [ Source IP | Dest IP | TTL | Protocol | Segment ]
Frame: [ Dest MAC | Src MAC | Type | Packet | FCS ]Breaking Down Each PDU
Message / Data (L5–L7)
- The raw application data.
- Example: an HTTP request like
GET /index.html. - No network headers yet — just pure content.
Segment (L4 — TCP)
- Adds port numbers (who's talking to whom on a device).
- Adds sequence numbers (for ordering and reassembly).
- TCP specific — if UDP, it's called a Datagram (much smaller header).
Packet (L3)
- Adds IP addresses (where it's coming from, where it's going).
- TTL (Time To Live) — decrements at each router, dies at 0 (prevents infinite loops).
- Protocol field says what's inside (TCP=6, UDP=17, ICMP=1).
Frame (L2)
- Adds MAC addresses (local delivery within a network).
- FCS (Frame Check Sequence) — trailer for error detection.
- Only valid for the current network hop — gets replaced at every router.
Bits (L1)
- Frame converted to electrical signals / light pulses / radio waves.
- Just 0s and 1s flying across the wire.
★ Important Interview Point — Frame is Hop-to-Hop, Packet is End-to-End
Path: Laptop → Router1 → Router2 → Server| Packet (L3) | Frame (L2) | |
|---|---|---|
| Source IP | Your laptop's IP | Changes at each hop |
| Dest IP | Server's IP | Changes at each hop |
| Source MAC | — | Your laptop → R1 → R2 |
| Dest MAC | — | R1 → R2 → Server |
- Packet stays the SAME end-to-end (IPs don't change).
- Frame is RECREATED at every hop (MACs change each time).
This is why routers need both L2 and L3 — they strip the old frame, read the packet's destination IP, then create a brand new frame for the next hop.
Mnemonic: Do Some People Fear Birthdays? → Data → Segment → Packet → Frame → Bits