When a packet arrives at its destination, each layer needs to extract and process its own header, then pass the remaining data up to the next layer. Without decapsulation, the receiving application would get raw bits with no structure.
The process of removing layer-specific headers (and trailers) as data moves up the protocol stack from the physical layer to the application.
- Physical layer receives bits and passes to link layer
- Link layer processes frame header and trailer, extracts IP packet, passes up
- Network layer processes IP header, extracts transport segment, passes up
- Transport layer processes TCP/UDP header, extracts application data, passes to application
- Application receives the original data
- Reverse of encapsulation
- Each layer processes and removes its header
- Passes payload to next higher layer
- Errors detected at each layer (if error checking exists)
- Contrasts with: Encapsulation — unwrapping vs wrapping
- Built from: Layered Model — decapsulation happens between layers
- Related: Protocol Header — what gets removed
- Related: Error Detection — often checked during decapsulation
- If a layer detects an error (bad checksum), it may discard the packet
- Some layers may not have a header to remove (e.g., physical layer)
- Tunneling requires recursive decapsulation (decapsulate inner packet)