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
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.
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.
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.