Why Is "Reliable" TCP So Unrealiable

ViRGE

Elite Member, Moderator Emeritus
Oct 9, 1999
31,516
167
106
Ok, so this one is short and sweet: TCP is a reliable protocol, so all the data transmitted with it should end up on the other end correctly, right? So why is it that we still need PAR(Parity) files and recovery records and checksums for downloaded files, especially large ones? Most people that have used Newsgroups for example have experienced a download where they needed a parity file to fix it, but if TCP is reliable, why is it broken in the first place?
 

Matthias99

Diamond Member
Oct 7, 2003
8,808
0
0
Originally posted by: ViRGE
Ok, so this one is short and sweet: TCP is a reliable protocol, so all the data transmitted with it should end up on the other end correctly, right? So why is it that we still need PAR(Parity) files and recovery records and checksums for downloaded files, especially large ones? Most people that have used Newsgroups for example have experienced a download where they needed a parity file to fix it, but if TCP is reliable, why is it broken in the first place?

TCP is 'reliable', but only up to a point, and only if all the hardware involved is working properly. If the parity calculations at any point between you and the server are broken, and a transmission error occurs at that hop, you'll get a corrupted file. It's also possible (although very unlikely) that a packet could be corrupted in a way that the parity calculations built into TCP/IP cannot detect. Any error-detection mechanism that is transmitted along with the data cannot be 100% reliable, since you're reliant on the same hardware being used to transmit the data.

That said, I can't remember the last time I downloaded a file via TCP/IP and found it to be corrupted. Most often, the problem is on the receiving end (a system that is slightly unstable, or a bad NIC, that sort of thing).
 

SmoiL

Member
Aug 31, 2002
45
0
0
In regards to newsgroups I generally find most of the incomplete file errors are due to the newsgroup provider dropping messages.
 

VirtualLarry

No Lifer
Aug 25, 2001
56,453
10,121
126
Originally posted by: SmoiL
In regards to newsgroups I generally find most of the incomplete file errors are due to the newsgroup provider dropping messages.

Ding! We have a winner. Also, I sometimes use RAR + PAR for archiving data on CD/DVD that I really care about. That way, if the disc degrades, and one of the file segments is unreadable, I can use the PAR to re-construct them.

But in general, when you have a data-transmission, protected by a checksum of N bits, then there is a 1/(2^N) chance that the contents could get corrupted en-route, and result in an identical checksum. Kind of like how a stopped clock is still right, twice a day. (Speaking of analog clocks with dials, here.)
 

Aves

Lifer
Feb 7, 2001
12,232
29
101
Originally posted by: SmoiL
In regards to newsgroups I generally find most of the incomplete file errors are due to the newsgroup provider dropping messages.

Exactly. TCP isn't the problem here.
 

uOpt

Golden Member
Oct 19, 2004
1,628
0
0
In failed downloads the data as actually went through TCP is fine.

The most common problem is truncated files due to the server aborting or timing out a TCP connection.

The next class of errors are truncated and corrupted files, which are usually caused by the TCP client screwing up on a permaturly terminated connection and writing unitialized buffers, or writes a previous buffer again etc.

The rest of file broken on the server's harddrive already.

I don't think I have ever seen a corrupted, not truncated in transfer, file which wouldn't be the same corrupted file on retransmit.
 

glugglug

Diamond Member
Jun 9, 2002
5,340
1
81
TCP checksum is only 16 bits. So theoretically, one out of every 65,536 errors will make it through. I believe the IP header has a checksum as well though, so the chance of the error getting through BOTH checksums is more slim.

As others have said though, most bad downloads are from incomplete transfers (the end of the file was never received due to connection loss), not from data errors getting through.
 
sale-70-410-exam    | Exam-200-125-pdf    | we-sale-70-410-exam    | hot-sale-70-410-exam    | Latest-exam-700-603-Dumps    | Dumps-98-363-exams-date    | Certs-200-125-date    | Dumps-300-075-exams-date    | hot-sale-book-C8010-726-book    | Hot-Sale-200-310-Exam    | Exam-Description-200-310-dumps?    | hot-sale-book-200-125-book    | Latest-Updated-300-209-Exam    | Dumps-210-260-exams-date    | Download-200-125-Exam-PDF    | Exam-Description-300-101-dumps    | Certs-300-101-date    | Hot-Sale-300-075-Exam    | Latest-exam-200-125-Dumps    | Exam-Description-200-125-dumps    | Latest-Updated-300-075-Exam    | hot-sale-book-210-260-book    | Dumps-200-901-exams-date    | Certs-200-901-date    | Latest-exam-1Z0-062-Dumps    | Hot-Sale-1Z0-062-Exam    | Certs-CSSLP-date    | 100%-Pass-70-383-Exams    | Latest-JN0-360-real-exam-questions    | 100%-Pass-4A0-100-Real-Exam-Questions    | Dumps-300-135-exams-date    | Passed-200-105-Tech-Exams    | Latest-Updated-200-310-Exam    | Download-300-070-Exam-PDF    | Hot-Sale-JN0-360-Exam    | 100%-Pass-JN0-360-Exams    | 100%-Pass-JN0-360-Real-Exam-Questions    | Dumps-JN0-360-exams-date    | Exam-Description-1Z0-876-dumps    | Latest-exam-1Z0-876-Dumps    | Dumps-HPE0-Y53-exams-date    | 2017-Latest-HPE0-Y53-Exam    | 100%-Pass-HPE0-Y53-Real-Exam-Questions    | Pass-4A0-100-Exam    | Latest-4A0-100-Questions    | Dumps-98-365-exams-date    | 2017-Latest-98-365-Exam    | 100%-Pass-VCS-254-Exams    | 2017-Latest-VCS-273-Exam    | Dumps-200-355-exams-date    | 2017-Latest-300-320-Exam    | Pass-300-101-Exam    | 100%-Pass-300-115-Exams    |
http://www.portvapes.co.uk/    | http://www.portvapes.co.uk/    |