Network Engineer Silver - Packet Structure & Header Format

All IP packets start with a short Packet Header (or in the case of IPv6, possibly a chain of Packet Headers).

The IPv4 Packet Header is 20 bytes long, with possible options (rarely if ever seen in the wild). All but one bit of that is already in use. There is no Packet Extension Header mechanism in IPv4, but the IPsec AH and ESP protocols use something much like the IPv6 Extension Headers. The IPv4 Header is followed by an ICMPv4 or Transport Layer Header, which is then followed by Data.

The IPv6 Packet Header is a fixed 40 bytes long, but may be followed by zero or more Extension Headers in a chain, which is followed by an ICMPv6 or Transport Layer Header. This is usually followed by Data, although it is possible to have the final "Next Header" indicate that there is no following information (everything is communicated in the Packet Header and Extension Headers). The IPv6 Packet Header is actually simpler (and contains fewer fields) than the IPv4 Packet Header, but is twice the size because of the giant 128 bit Source and Destination IP addresses.

III. Packet Structure and Header Syntax