Section 9.1. UDPTCP

9.1. UDP/TCP

Checksumming is done on different layers. Remember, the IPv6 header does not have a checksum. But a checksum is important on the transport layer to determine packet delivery problems. Other upper-layer protocols may use a checksum, too. All checksum calculations that include the IP address in the calculation must be modified for IPv6 to accommodate the new 128-bit address.

Transport protocols such as UDP and TCP attach checksums to their packets. A checksum is generated using a pseudoheader. The TCP and UDP pseudoheader for IPv6 contains fields for Source and Destination address, payload length, and Next Header value (RFC 2460). If the IPv6 packet contains a routing header, the Destination address used in the pseudoheader is the address of the final destination. If the Source or Destination address was changed in transit, the value of the pseudoheader at the destination will not match the value of the initial packet, which causes checksum calculation failure and an error report.

Because the IPv6 address is so much longer than the IPv4 address, the IPv6 specification includes a new version of the pseudoheader. The IPv6 pseudoheader specification takes into account that an unknown number of extension headers can be present before the UDP or TCP layer, which is essential when calculating the payload length for the pseudoheader. With IPv4, a checksum in the UDP header was optional. With IPv6, the computation of a checksum is mandatory for UDP. IPv6 nodes that receive a UDP packet with a value of 0 in the checksum field should discard the packet and log the error.

The source node calculates and stores the checksum, and the destination node verifies it. Figure 9-1 shows the format of the pseudoheader that is built and used to calculate TCP and UDP checksums.

Figure 9-1. Format of the pseudoheader

The following list describes each of the fields:

Source Address (16 bytes)

The Source address of the IPv6 packet.

Destination Address (16 bytes)

The Destination address of the IPv6 packet. If there is a routing header in the packet, the address of the final destination is used for the checksum calculation. On the first node, this address is the last address in the list of the routing header. At the final destination, this is the Destination address in the IPv6 header.

Upper Layer Packet Length (4 bytes)

This field contains the length of the Upper-Layer Protocol header plus data.

Next Header (1 byte)

The Next Header field identifies the type of the header using the values listed in Table 2-1.

The same algorithm used with IPv4 is used to calculate the checksum with IPv6. The 16-bit checksum is computed over the entire pseudoheader. By including the source and Destination addresses in the checksum calculation, any alteration of the addresses en route would be detected.

IPv6 Essentials
IPv6 Essentials
ISBN: 0596100582
EAN: 2147483647
Year: 2004
Pages: 156
Authors: Silvia Hagen

Similar book on Amazon © 2008-2017.
If you may any questions please contact us: