Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

share|improve this question
add comment

2 Answers

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.

share|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
show 2 more comments

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
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.