Each network layer needs to add its own control information (headers) to data as it passes down the protocol stack. Without encapsulation, there would be no way to distinguish which layer a particular piece of information belongs to.
The process of wrapping data with layer-specific headers (and sometimes trailers) as it moves down the protocol stack from the application to the physical layer.
- Application data is passed to the transport layer
- Transport layer adds its header (e.g., TCP or UDP header) — now a segment/datagram
- Network layer adds its header (IP header) — now a packet
- Link layer adds its header and trailer (frame header + FCS trailer) — now a frame
- Physical layer converts to bits for transmission
- Each layer adds its own header
- Headers contain layer-specific control information
- Reverse process (decapsulation) happens at receiver
- Enables layering and protocol independence
- Built from: Layered Model — encapsulation happens between layers
- Contrasts with: Decapsulation — wrapping vs unwrapping
- Related: Protocol Header — what gets added
- Related: TCP Segment — example of encapsulated unit
- Overhead: each layer adds bytes, reducing effective payload size
- MTU limits: encapsulated packet must fit link-layer MTU (may require fragmentation)
- Tunneling: encapsulation can nest (e.g., PPPoE encapsulates PPP in Ethernet)