Reliability

The most often touted TCP service is reliability, with TCP’s virtual circuit design practically guaranteeing that data will get delivered intact. Using this design, TCP will do everything it can to get data to the proper destination, if at all possible. If this is not possible—perhaps due to a failure in the network or some other catastrophic event—then naturally TCP won’t be able to deliver the data. However, as long as the network and hosts are operational, TCP will make sure that the data is delivered intact.

TCP’s reliability service takes many forms, employing many different technologies and techniques. Indeed, RFC 793 states that TCP must be able to “recover from data that is damaged, lost, duplicated, or delivered out of order.” This is a broad range of service, and as such TCP’s reliability mechanisms tend to be somewhat complex.

The most basic form of reliability comes from the use of checksums. TCP checksums are used to validate segments (including the TCP headers and any associated data). Furthermore, checksums are mandatory with TCP (as opposed to being optional as they are with UDP), requiring that the sender compute them, and that the recipient compare them to segments received. This provides a simple validation mechanism that lets a receiver test for corrupt data before handing the data off to the destination application.

Although checksums are useful for validating data, they aren’t of any use if they never arrive. Therefore, TCP also has to provide delivery ...

Get Internet Core Protocols: The Definitive Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.