Encapsulation is the process where, as data moves down the stack on transmission, each layer wraps the data unit from the layer above in its own header (and the link layer also adds a trailer), so the higher layer's entire output becomes the lower layer's opaque payload. Concretely: the application hands its data to the transport layer, which prepends a TCP (or UDP) header to form a segment (TCP) or datagram (UDP); the internet layer prepends an IP header to form a packet; the link layer wraps that in a MAC header plus a frame-check trailer to form a frame; and the physical layer transmits it as bits. On receipt the process reverses, each layer strips and reads only its own header and passes the inside up. The key property is that each layer reads only its own header: a router examines the IP header to route a packet but never looks at the TCP or application data, and a switch reads only MAC addresses. The terminology (segment → packet → frame) maps to transport → internet → link and is worth knowing precisely. Encapsulation also explains protocol overhead, since every layer's header consumes bytes.
Networking & IoT · Interview question
What is encapsulation, and what are segments, packets, and frames?
A strong answer
What a weak answer sounds like
You know the answer. Do you know what gets you dinged?
Pro breaks down the answer most candidates actually give to this question — and the specific reason an interviewer marks it down. It’s the difference between sounding correct and sounding senior, on all 472 questions.
From the lesson
OSI vs TCP/IP Model
Why networking is split into stacked layers, how the 7-layer OSI reference maps onto the 4-layer TCP/IP model the internet actually runs on, and how encapsulation wraps your data.