1

How many next-header extensions can an IPv6 packet contain?

I read here that it can contains:

None, one, or more.

which isn't very informative.

Below is a reference to an IPv6 packet I'm looking at in Wireshark.

My reasoning is that, since an IPv6 packet can be, at most 65,535 bytes, it can contain (65,575 - 40) / 8 next-header extensions if the packet were to be made up of no data and entirely headers. What is a "reasonable" upper limit in practice?

enter image description here

  • 1
    There are only a few possible extension headers. The extension header numbers are part of the IANA Protocols Numbers, most of which are already assigned. There are only six extension header numbers assigned today. – Ron Maupin Mar 19 at 23:31
  • "since an IPv6 packet can be, at most 65,535 bytes" That is incorrect. Unlike an IPv4 packet, the length in the header is the payload, not packet, length. A standard IPv6 packet can be 65,575 bytes long (65,535 bytes of payload), and with the Jumbo Payload option, up to 4,294,967,335 bytes long (4,294,967,295 bytes of payload). You should really read the IPv6 RFCs. Simply search for rfc ipv6. – Ron Maupin Mar 19 at 23:39
  • Depends on what you call "reasonable": Most "typical" IPv6 packets don't have extension headers at all. On the other hand you can use codes 253 and 254 to define your own proprietary extension headers. You can define an extension header type that appears 100 times in one packet. – Martin Rosenau Mar 20 at 7:19
  • 1
    The IPv6 payload is limited to 65,535 bytes. The header size itself doesn't actually seem to be limited (in theory), other than by MTU. ;-) – Zac67 Mar 22 at 16:26
7

The absolute limit is that each header can only appear once, except for the Destination Options which can come twice. In practice, you won't ever need all of them.

| improve this answer | |
  • 2
    "n practice, you won't ever need all of them." In practice, probably not any of them. It's a shame that the encryption stuff is not actually used (other than for OSPF) because of tunneling. – Ron Maupin Mar 19 at 23:46
  • @RonMaupin We meet again! – Tee Zad Awk Mar 20 at 1:07
  • @RonMaupin Once IPv4 is shut down and forgotten (in fifty years or so) that may change! ;-) – Zac67 Mar 20 at 7:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.