Why in a IPV4 packet, checksum is calculated against the IP header and not on the data like transport protocols tcp/udp?
It's a matter of speed: the Internet backbone routers direct millions of packets per second and calculating a checksum over the entire contents would drastically slow down the packet processing.
The IPv6 specification removes even the header checksum to allow routers to route packets even faster. (It's just one of many steps IPv6 has taken to reduce the amount of time routers must inspect every packet. It all adds up.) Discarding corrupted packets is now placed entirely on end nodes.
There are two good reasons for this.
First, all higher-level protocols that encapsulate data in the IPv4 datagram have a checksum field that covers the whole packet. Therefore, the checksum for the IPv4 datagram does not have to check the encapsulated data.
Second, the header of the IPv4 packet changes with each visited router, but the data do not. So the checksum includes only the part that has changed. If the data were included, each router must recalculate the checksum for the whole packet, which means an increase in processing time.
source: Data Communications and Networking by Behrouz A. Forouzan
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With