When an IPv4 datagram comes to a router for forwarding, does it always update the value of the header checksum field?
2 Answers
Since the router changes the IPv4 header (it decrements the TTL), it needs to calculate a new value for the checksum, otherwise subsequent devices receiving the packet will think it is damaged.
This only applies to IPv4. IPv6 has eliminated the checksum, instead it relies on protocols above and below it to do any error checking.
Yes. From RFC 791:
Header Checksum: 16 bits
A checksum on the header only. Since some header fields change (e.g., time to live), this is recomputed and verified at each point that the internet header is processed.