3

Why does TCP need a checksum, when lower layers do integrity checks anyways (like Ethernet CRC)?

2 Answers 2

13

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.

7
  • 3
  • 1
    If you don't need accuracy or guaranteed delivery you can always use UDP. Oct 4, 2009 at 0:32
  • @Richard Hoskins why did you link to IP over CP (carrier pigeon)? Oct 4, 2009 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, 2009 at 0:37
  • 4
    @quack As an example of protocol that does no error checking. Oct 4, 2009 at 0:51
1

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

You must log in to answer this question.