2

I was reading about IPv6. It says the header is of a fixed size i.e. 40 bytes, then how come is it able to accommodate extension headers. Doesn't this alter the size of headers.

Please help, cant find anywhere

1

3 Answers 3

5

The IPv6 packet header is a fixed size (40 octets). The extension headers are also payload to be delivered to the destination host, and are not processed by the intermediate routers (except for the Hop-by-Hop Options Header, which is rarely used and often not supported by routers).

However, it is to be expected that high-performance routers will either ignore it or assign packets containing it to a slow processing path. Designers planning to use a hop-by-hop option need to be aware of this likely behaviour.

The idea is that it takes less processing in a router for IPv6 packets than for IPv4 packets, which could have variable header sizes, and the router must figure out the header size and have logic to process the variable-length IPv4 header, including the Header Checksum, which IPv6 has eliminated.

All the other IPv6 extension headers are meant only for the destination host.

See RFC 7045, Transmission and Processing of IPv6 Extension Headers.

3

The total header length increases with each extension. Extension headers are chained using the next header field. Depending on its value, it indicates the upper layer payload or the next next header entry preceding each extension header. The last next header entry always points to the payload.

2
  • So, if the header length is variable in ipv6, what is its benefit in this term against ipv4 ? Commented May 6, 2019 at 5:10
  • @GauravPant The IPv6 base header is always larger than the IPv4 one, due to increased address sizes. IPv4 also supports options and its header size is variable as well.
    – Zac67
    Commented May 6, 2019 at 5:18
1

The IPv6 header has a fixed length. Extension headers appear immediately following the IP header, so technically they are part of the payload and included in the packet length.

However, extension headers are stripped off before being passed up the protocol stack so they are transparent to higher protocol layers, which means that in any real sense they are not part of the payload.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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