Why does TCP need a checksum, when lower layers do integrity checks anyways (like Ethernet CRC)?
The TCP protocol guarantees accurate delivery regardless of underlying mechanisms. There is no guarantee that every protocol that it might run over will do any sort of integrity checking. SLIP, for example, has no error detection.
Because it is a protocol that roots in the early 1970s. The Layer Model of communication was not common sense yet back then.
I personally think of it as just that, a relict of the early years of protocol design.
Here is why I think this checksum is nuts:
- it is too weak to deliver meaningful protection
- still painful to calculate (especially on microcontrollers. It's a waste of cycles)
- it does not protect against manipulation (because it's so easy to fix)
- many implementations ignore it anyway