Data Encapsulation Workbench
Build and inspect protocol data units as application data moves down and back up the network stack
animation
networking
encapsulation
osi-model
protocols
iot
Interactive data encapsulation animation for learning protocol data units, header and trailer overhead, decapsulation, MTU pressure, and IoT header-compression tradeoffs.
Animation
OSI and TCP/IP
Header Overhead
IoT Links
Data Encapsulation Workbench
Watch an application message become a transport segment, network packet, link frame, and physical bit stream. Then reverse the path to see what the receiver strips during decapsulation.
100 B
Application payload
158 B
Final frame bytes
63%
Useful payload ratio
Frame
Current PDU view
Application Data
Stage 1 of 5The sender starts with the application message before protocol headers are added.
Layer Path
Current Byte Layout
Diagnosis
Packet Trace
Quick Reference
PDU Names
Application message, transport segment/datagram, IP packet, link frame, physical bits.
Common Header Sizes
UDP 8 B, TCP base 20 B, IPv4 minimum 20 B, IPv6 base 40 B, Ethernet header 14 B plus 4 B FCS.
Payload Efficiency
Useful payload ratio = application bytes divided by the final transmitted frame bytes.
MTU Pressure
Large headers can force fragmentation or adaptation-layer work before the packet can cross a small radio link.
Decapsulation
The receiver validates and removes each lower-layer wrapper before passing the remaining payload upward.
IoT Design Hint
CoAP/UDP, header compression, and careful payload sizing are common ways to keep constrained traffic efficient.
How to Read the Workbench
Layer Path
Green layers have already handled the PDU. The orange layer is the layer currently adding or removing its fields.
Byte Layout
Each colored block is a protocol field group. The application data block should stay visible as headers accumulate around it.
Diagnosis
Use the efficiency and MTU messages to decide whether the selected stack is sensible for a constrained IoT link.
Technical Accuracy Notes
IPv4 and TCP
The workbench uses minimum IPv4 and TCP base headers. Options can increase both values.
IPv6 and Extension Headers
The IPv6 base header is 40 B; extension headers are separate and are not included unless a scenario explicitly adds them.
6LoWPAN Example
The compressed case is an educational example. Real compressed sizes depend on addressing mode, context, hop limit, ports, and mesh/security fields.
Link-Layer Variability
IEEE 802.15.4 frame overhead changes with addressing and security fields. This page uses a small representative frame to show MTU pressure.
Ethernet Wire Detail
The frame byte total includes Ethernet header and FCS. Preamble and inter-frame gap are physical-layer timing overhead and are kept out of the frame byte count.
Layer Models
The display maps practical TCP/IP behavior onto OSI-style names so learners can connect both vocabularies.
Source Links
UDP Header
RFC 768 - User Datagram Protocol
IPv4 Header
RFC 791 - Internet Protocol
IPv6 Header
RFC 8200 - IPv6 Specification
TCP Header
RFC 9293 - Transmission Control Protocol
6LoWPAN Compression
RFC 6282 - IPv6 Header Compression
IEEE 802.15.4 Overview
IEEE 802.15.4-2020 standard page