Encapsulation down the stack
Each layer adds its own header as data moves down the sender's stack, and the receiver strips them in reverse order.
- 1Data
- →2Segment
- →3Packet
- →4Frame
- →5Bits
Port numbers live in the segment, IP addresses in the packet, MAC addresses in the frame. Knowing this answers a whole class of questions.


