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.

|improve this answer|||||
  • 3
  • 1
    If you don't need accuracy or guaranteed delivery you can always use UDP. – quack quixote Oct 4 '09 at 0:32
  • @Richard Hoskins why did you link to IP over CP (carrier pigeon)? – quack quixote Oct 4 '09 at 0:34
  • 4
    Pigeons are notorious for dropping "packets". Thanks, I'll be here all week. Please tip your waitstaff. Try the veal. – wfaulk Oct 4 '09 at 0:37
  • 4
    @quack As an example of protocol that does no error checking. – Richard Hoskins Oct 4 '09 at 0:51

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:

  1. it is too weak to deliver meaningful protection
  2. still painful to calculate (especially on microcontrollers. It's a waste of cycles)
  3. it does not protect against manipulation (because it's so easy to fix)
  4. many implementations ignore it anyway
|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy