In: Computer Science
In IP, the checksum covers only the header and not the data. Why do you suppose this design was chosen?
IP header uses the 16-bit checksum and it is used to detect the error in the header of the IP protocol message.
Let us suppose we are not using the checksum for the header. If the destination address of IP header corrupted or modified then we need to drop this message but without checksum how we know that this header is corrupted.
We use the checksum or some other technique like CRC to detect the error for the data as well. These error detection mechanisms are used at different layer and header checksum ensure that the IP header is correct and checksum for data ensure that the data is correct.
The checksum is a simple method and not so complex to detect an error but the probability to detect error is low as compare to the CRC method. We want the size of the header as small as possible. So, the checksum is more suitable for the IP header as compare to other methods.
To detect data error, we use the CRC method mostly because the probability of error detection is very high but this method is a quick complex method as compared to the checksum method.