Hubbry Logo
search
logo

Internet checksum

logo
Community Hub0 Subscribers
Write something...
Be the first to start a discussion here.
Be the first to start a discussion here.
See all
Internet checksum

The Internet checksum, also called the IPv4 header checksum is a checksum used in version 4 of the Internet Protocol (IPv4) to detect corruption in the header of IPv4 packets. It is carried in the IPv4 packet header, and represents the 16-bit result of the summation of the header words.

The IPv6 protocol does not use header checksums. Its designers considered that the whole-packet link layer checksumming provided in protocols, such as PPP and Ethernet, combined with the use of checksums in upper layer protocols such as TCP and UDP, are sufficient. Thus, IPv6 routers are relieved of the task of recomputing the checksum whenever the packet changes, for instance by the lowering of the hop limit counter on every hop.

The Internet checksum is mandatory to detect errors in IPv6 UDP packets (including data payload).

The Internet checksum is used to detect errors in ICMP packets (including data payload).

The checksum calculation is defined as follows:

The checksum field is the 16 bit one's complement of the one's complement sum of all 16 bit words in the header. For purposes of computing the checksum, the value of the checksum field is zero.

If there is no corruption, the result of summing the entire IP header, including checksum, and then taking its one's complement should be zero. At each hop, the checksum is verified. Packets with checksum mismatch are discarded. The router must adjust the checksum if it changes the IP header (such as when decrementing the TTL).

The procedure is explained in detail in RFC 1071 "Computing the Internet Checksum". Optimizations are presented in RFC 1624 "Computation of the Internet Checksum via Incremental Update", to cover the case in routers that need to recompute the header checksum during packet forwarding when only a single field has changed.

See all
User Avatar
No comments yet.