The IP options defined for IPv4 headers are primarily intended to carry additional network layer information. But the presence of IP options in IPv4 will end up punting the packet to CPU and thereby introducing performance issues due to the slow path packet forwarding. In IPv6, extension headers are proposed to encode such control plane information as a separate flexible header without increasing the sizing of the IPv6 header. The IPv6 extension header is positioned between the IPv6 header and the transport layer header in a packet, and the presence of an IPv6 extension header is identified by setting the next header to the relevant value.
Here are a few commonly used IPv6 extension headers:
Protocol number (IPv6 NH Value) |
Extension header name |
Description |
Reference |
0 |
IPv6 hop-by-hop option |
Optional extension header used to carry additional information that may be processed by every node along the path. This may require the packet to be punted to CPU on all nodes. |
RFC 8200 |
44 |
Fragment header for IPv6 |
Used by source to send packet larger than Path MTU. |
RFC 8200 |
50 |
Encapsulation security payload |
Used to carry security information to provide confidentiality, authentication, integrity, and more. |
RFC 4303 |
60 |
Destination header |
Used by source to carry information intended only for the ultimate destination. |
RFC 8200 |
Here is the IPv6 packet format with extension headers:
The following is a sample capture: