First page Back Continue Last page Overview Graphics
One’s Compliment Checksum
IP, like many protocols, uses a checksum to detect loss of packet integrity
- Packets can have accidentally flipped bits, be truncated, or maliciously changed
The type of checksum used by IP and a number of other Internet protocols is called one’s compliment
- If you’ve studied one’s compliment math before, you’ll realize soon that the one’s compliment used by IP is different
- IP protocols use 16-bit chunks for the calculations
The IP one’s compliment checksum process
- Add together the array of 16-bit values “carrying over the one” when the sum spills into the 17th bit
- Once the addition is complete, invert the result