Ethernet has its own checksum, and it has nothing to to with IP, TCP, or UDP. Neither TCP not IPv6 have anything to do with the UDP checksum. UDP on the source will create the checksum, and UDP on the destination will verify the checksum.
I think you don't really understand the network stack layers.
Layer-2 protocols, e.g. ethernet, Wi-Fi, etc., may use a checksum. In general, layer-2 protocols will drop any layer-2 frame with a bad checksum anywhere along the layer-2 path. For instance, a switch will discard an ethernet frame with a bad checksum. Layer-2 protocols don't care which layer-3 or layer-4 protocols are carried in their frames, nor are they aware of any layer-3 or layer-4 checksums.
In layer-3, IPv4 has a header checksum that layer-3 devices, e.g. routers or hosts, will inspect to verify the integrity of the IPv4 header, discarding any layer-3 packets with a bad header checksum. IPv6 has done away with the IPv4 header checksum. Layer-3 protocols do not care which layer-2 protocol carries their layer-3 packets, nor which layer-4 protocols they carry. Neither are they aware of any layer-2 or layer-4 checksums.
Layer-4 protocols, e.g. TCP, UDP, etc. may have a checksum. In IPv4, the UDP checksum was optional, but it is mandatory with IPv6. A layer-4 protocol will inspect it own checksum, and it will discard any datagrams with bad layer-4 checksums. Layer-4 protocols are unaware of any layer-2 or layer-3 checksums.
To strictly answer the questions:
- Can the checksum itself be corrupted? Certainly, the noise sources have no idea whether they are corrupting data bits or checksum bits
- What happens if only the checksum itself is corrupted? The calculated value by the receiver is certain to fail the match.
- If checksum and data are corrupted, t(as given in the first answer) it's very unlikely to match.
While checksums in general have the characteristic that there are many messages which identical checksums (after all, we're going from perhaps 1Kbyte packet to 16 bits), many real life checksums have surprising good and bad properties. For example, IP checksum is guaranteed to detect all 1-bit errors; but fails to detect byte swaps. Real communications lines have certain errors much more common than others: much more common to get "all bits arrive as 0" for a short period for example, and "bytes are swapped" is more or less impossible.
For a deeper understanding
Hope that's helpful
Jonathan.
Best Answer
One of the ideas around IPv6 was to speed up packet forwarding. To that end, several decisions were made. For example, the IPv6 header was greatly simplified and is a fixed length, unlike the variable length IPv4 header. Also, you cannot fragment IPv6 packets along the path, the way you can for IPv4, because packet fragmentation is resource intensive.
Not having a checksum in the IPv6 header means that an IPv6 router does not need to recalculate the checksum to see if the packet header is corrupt, and recalculate the checksum after decrementing the hop count. That saves processing time and speeds up the packet forwarding. The logic is that the layer-2 and layer-4 protocols each already have a checksum. The layer-2 checksum covers the entire IPv6 packet, and the layer-4 checksum covers the transport datagram.
Where UDP has an optional checksum for IPv4, it is required for IPv6.