How do TCP and UDP detect transmission errors?

I want to know how these protocols can detect that an error occurred during data transfer? thank

+3
source share
3 answers

There are various errors:

  • Invalid packet order
  • Packet loss
  • Corrupt data inside the package
  • Phantom packets (the receiver receives packets that were never sent)

UDP provides only a mechanism to prevent data corruption (which is an optional feature in IPv4, mandatory for IPv6).

Data corruption

UDP , . , (, IP-), 16- - UDP.

TCP .

TCP . , , " 102", , 102 . . , 10 , Ack 112, " , , 112". , , ( ), ( ), phantom ( ). , , - ( TCP).

. , , , .

. , ;)

+4

IP- ( UDP, TDP) , , . , .

(, ) , . ( , IP-).

+3

, . UDP ( , ) 100% . (, -), . ​​TCP ( , ), UDP , .

, , , , , , , . , , , ( , , , ). , , , , . , , . , .

+1
source

Source: https://habr.com/ru/post/1782059/


All Articles