Protocol Header Cheatsheets

A set of cheatsheets for Ethernet, IPv4, UDP, TCP and ICMP protocol headers.

Ethernet Frame Header

Ethernet Frame

Notes

Summary

Description Value Explanation
Basic frame size 64 bytes up to 1,518 bytes 1,538 bytes on the wire
Q-tagged (802.1q) frame size 64 bytes up to 1,522 bytes 1,542 bytes on the wire
Envelope frame size 64 bytes up to 2,000 bytes  
Maximum frame payload without fragmentation 1,500 bytes  
Minimum frame payload 46 bytes  
Minimum frame payload with 802.Q tag 42 bytes  

IPv4 Header

IPv4 Header

Notes

Summary

Description Value Explanation
Maximum IPv4 payload size without fragmentation 1,480 bytes Maximum Ethernet frame size at 1,500 bytes minus IPv4 header at 20 bytes
Maximum legal IPv4 payload size 65,515 bytes Maximum IPv4 packet size at 65,535 bytes (x0FFFF) minus IPv4 header at 20 bytes

TCP Header

TCP Header

Notes

Summary

Description Value Explanation
Maximum TCP payload size without fragmentation 1,460 bytes Maximum Ethernet frame size at 1,500 bytes minus IPv4 header at 20 bytes minus TCP header at 20 bytes
Maximum legal TCP payload size 65,495 bytes Maximum IPv4 packet size at 65,535 bytes (x0FFFF) minus IPv4 header at 20 bytes minus TCP header at 20 bytes

UDP Header

UDP Header

Notes

A UDP datagram is carried in a single IP packet and is hence limited to a maximum payload of 65,507 bytes for IPv4 and 65,527 bytes for IPv6.

Summary

Description Value Explanation
Maximum UDP payload size without fragmentation 1,472 bytes Maximum Ethernet frame size at 1,500 bytes minus IPv4 header at 20 bytes minus UDP header at 8 bytes
Maximum legal UDP payload size 65,507 bytes Maximum IPv4 packet size at 65,535 bytes (x0FFFF) minus IPv4 header at 20 bytes minus UDP header at 8 bytes

ICMP Header

ICMP Header

Notes

Summary

Description Value Explanation
Maximum ICMP payload size without fragmentation 1,472 bytes Maximum single Ethernet frame at 1,500 bytes minus IPv4 header at 20 bytes minus ICMP header at 8 bytes
Maximum legal ICMP payload size 65,507 bytes Maximum IPv4 packet size at 65,535 bytes (x0FFFF) minus IPv4 header at 20 bytes minus ICMP header at 8 bytes

Protocol Frames Cheatsheet - A3 Wall Poster

Protocol Frames Cheatsheet A3 Poster


Source code and licence

Original drawings and source at https://github.com/pingfu/ethernet-cheatsheet. Content licensed under CC-BY 3.0, code licensed under MIT. Diagrams created using the excellent https://www.draw.io/

comments powered by Disqus