IPv6 has several different extension headers available to use for transmitting packets. IETF recommends using the following order of extension headers when more than one extension header is used in the same packet:
- IPv6 header
- Hop-by-Hop Options header
- Destination Options header
- Routing header
- Fragmentation header
- Authentication header
- Encapsulating Security Payload (ESP) header
- upper-layer header
The Hop-by-Hop Options header allows the options to be handled by every node or router along the packet's path, and uses a Next Header value of zero in the IPv6 header. The Destination Options header uses options that are examined at the first destination listed in the Destination Address field, as well as any subsequent addresses listed in the Routing header. The Routing header is loose-source routing, used to list intermediate nodes used en route to the packet's destination. The Fragmentation header is used to fragment packets that are too large for the MTU. The Authentication and ESP headers define the authentication and encapsulation of headers. The extension headers should only occur once, with the exception of the Destination Options header, which can occur twice: once before a Routing header and once before the upper-layer header.
IPv6 does have an option of No Next Header (value 59), which indicates that there is nothing following the IPv6 header. In the instance that octets are present after a value 59, those octets will be ignored.
There are issues in IPv6 with packet size. If a packet MTU is greater than 1280 octets, IPv6 requires fragmentation. If the packet is configurable, such as PPP links, encapsulation could assist with MTUs greater than 1280 octets. Path MTU Discovery is another option to locate path MTUs greater than 1280 octets.
The IPv6 extension headers should be monitored to determine network health. There are instances that could allow IPv6 to send malicious headers, which could corrupt normal operations and possibly affect the system behavior or create a denial of service condition.