IPv6 header format
The new IPv6 header [RFC2460] is illustrated in Figure 1,
while the IPv4 header is shown in Figure 2 to facilitate comparison between the two protocols.

Figure 1: IPv6 Header
The IPv6 header fields are as follows:
- version (4 bit): Indicates the protocol version, and will thus contain the number 6.
- DS byte (8 bit): This field is used by the source and routers to identify the packets belonging to the same traffic class and thus distinguish between packets with different priorities.
- flow label (20 bit): Label for a data flow
- payload length (16 bit): Indicates the length of the packet data field.
- next header (8 bit): ): Identifies the type of header immediately following the IPv6 header.
- hop limit (8 bit): Decremented by one by each node that forwards the packet. When the hop limit field reaches zero, the packet is discarded.
- source address (128 bit): The address of the originator of the packet.
- destination address ( 128 bit) : The address of the intended recipient of the packet.

Figure 2: IPv4 Header
Compared to IPv4, header format is simpler, which permits better performance.
The decision to eliminate the checksum springs from the fact that it is
already computed at layer 2, which is sufficient in view of the error rate of current
networks. Better performance is thus achieved, as the routers no longer need to
re-compute the checksum for each packet. On the debit side, eliminating
the checksum means that there is no protection against the errors routers
can make in processing packets. However, these errors are not dangerous for the network,
as they cause only the packet itself to be lost if there are fields with invalid values
(e.g., nonexistent addresses).
The hop limit field indicates the maximum number of nodes (hops) that a packet
can cross before reaching destination. In IPv4, this field is expressed in seconds
(TTL: Time To Live), even though it has the same function. The change was
made for two reasons. First, for the sake of simplicity: even in IPv4, in fact,
the routers translate seconds into number of hops, which are then translated back
into seconds. Second, the change ensures freedom from physical network characteristics
such as bandwidth. As the hop limit field consists of 8 bits, the maximum number of nodes
that a packet can cross is 255.
The hop limit field can also serve another purpose: finding the nearest server in
a group of servers that perform the same function. This use is illustrated in the example
shown in Figurere 3. The group will be identified by a multicast address. The host will start
the search by sending a request with hop limit = 1 to this address. The request reaches two
routers before being discarded. After a predetermined time period, the station sends another
request, this time with hop limit = 2. Once again, there is no response to the request.
After another timeout, the host tries again with hop limit = 3. This time, the request
reaches one of the servers - the nearest - which responds. The host thus concludes its search
and the more remote servers are not involved. IPv6 also makes it possible to achieve the same
result in another way, using the anycast addresses.

Figure 3 - Example of using the hop limit field.
In IPv4, the length of the header is variable, so that it is necessary to specify both
the IPv4 header length, and the total length of the packet In IPv6, on the other hand,
the header has a fixed length of 40 byte, so that it is sufficient to indicate the
length of the data field. As the payload length field is 16 bits long, the packet cannot
exceed 64 kb. Though this size also guarantees good performance for the routers
(limited queuing time, 0.06% overhead), this limit is too restrictive for supercomputer
communication. As supercomputers have enormous memories and are generally connected to
each other directly, it would be convenient to have packets much larger than 64 kb.
The jumbogram option was thus introduced to meet the needs of supercomputers.
In this option, the payload length field is set to zero and the packet can exceed
the specified limits.
As mentioned above, IPv6 packet headers have a fixed length. This is because it was decided
to eliminate the options, which are now managed by means of the extension header mechanism
illustrated in the following paragraph. This mechanism also
manages packet fragmentation,
which constitutes a fundamental difference from IPv4. Not only is a simpler header
obtained in this way, but as fragmentation in IPv6 is managed at the ends, the
intermediate nodes can process packets more quickly.
The procedure which made it possible for fragmentation to take place at the ends is
called MTU Discovery, which enables the source to determine the minimum MTU along
the routing path to the destination. The Maximum Transmission Unit (MTU) indicates
the maximum size that a packet can have. While this value is specific to each type of link,
a minimum of 1280 bytes has been established for IPv6. In the worst-case situation where
the smallest link is the last, this new fragmentation mechanism causes as many packets
as there are hops to be wasted. However, it is better than having fragmentation managed by
the routers.
Another change from IPv4 is the introduction of the flow label field, which was added
in order to facilitate identification of data requiring special handling, such as those
involved in real-time applications.
|