Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

TCP provides reliable, in-order delivery by having the communicating endpoints track byte positions, acknowledge received data, detect damaged segments, and retransmit data that has not been acknowledged. It does not make the IP network infallible. The title’s “never trusts the network” is a metaphor: TCP reliability depends on explicit checks and recovery, not on a promise that packets will arrive or that a connection will stay alive.

What TCP reliability means

The Internet Engineering Task Force’s TCP standard, RFC 9293, describes TCP as providing applications with a reliable, in-order byte stream. Applications write and read a stream of bytes; TCP carries that data in segments, which travel inside IP datagrams. The network may lose, duplicate, damage, or reorder those datagrams, so TCP’s endpoints track what has arrived and reconstruct the stream in order.

This service is about delivery of the stream between TCP endpoints while the connection and endpoints can continue operating. It does not mean every network path is dependable, nor does it mean an application-level task—such as saving a file or completing a payment—has succeeded.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

How TCP tracks the stream

Sequence numbers identify byte positions

TCP assigns sequence numbers to data bytes. A segment carries a range of byte positions, not merely a packet number. This distinction matters when a segment is lost: TCP can identify which part of the stream is missing and which bytes have already been accounted for.

RFC 9293 defines a 32-bit sequence-number space, from 0 to 232 − 1. Sequence-number arithmetic wraps modulo 232, so the values eventually begin again at zero. The numbers track positions in the stream; they are not permanent, globally unique identifiers for packets.

Cumulative acknowledgments report progress

An acknowledgment (ACK) tells the sender what data the receiver has accepted in order. If the ACK number is X, the receiver has received all bytes before X and is expecting byte X next. Because acknowledgments are cumulative, one ACK can confirm a continuous range of earlier bytes rather than listing every segment separately.

That feedback helps the sender distinguish acknowledged progress from data that may still need attention. If a segment is retransmitted and the receiver sees bytes it already accepted, sequence numbers let it recognize the duplicate instead of treating those bytes as new stream data.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What happens when TCP data is damaged or lost?

Checksums detect errors

Each TCP segment has a checksum. The receiver checks it to detect corruption; a segment that fails the check is not accepted as correct stream data. The checksum helps TCP detect errors, but it does not repair them by itself.

Retransmission recovers unacknowledged data

If the sender does not receive acknowledgment for data, TCP can retransmit it. The retransmission timeout is computed dynamically rather than set as one universal wait, because network conditions and uses vary. Once the receiver gets valid data and the sender receives acknowledgment, the endpoints can advance their view of the stream.

In short, sequence numbers expose gaps, checksums expose damaged segments, acknowledgments report accepted progress, and retransmission attempts to fill gaps. These mechanisms are the basis of TCP reliability described in RFC 9293.

What TCP does not guarantee

TCP is connection-oriented, but it does not inherently detect whether the remote application is still alive. A connection can become unavailable, an endpoint can stop operating, or the network can remain unable to deliver data. TCP does not promise that connectivity will eventually return.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Not continuous availability: TCP cannot ensure that a connection remains usable at all times.
  • Not proof of application success: Receiving bytes at the remote TCP endpoint does not establish that the remote application processed them or completed the requested operation.
  • Not a guarantee against permanent failure: Retransmission is a recovery mechanism, not a promise that lost data will eventually arrive if the connection or endpoints cannot continue operating.

Applications that need to know whether a peer is responsive or whether a particular operation completed need appropriate application-level behavior; TCP’s ordered byte-stream service does not answer those questions on its own.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Where to read more

For the protocol’s current normative specification, see RFC 9293: Transmission Control Protocol (TCP), published by the RFC Editor in August 2022. Readers who want a book-length treatment can consult the publisher listing for TCP/IP Illustrated, Volume 1: The Protocols, which describes coverage including connection establishment, timeouts, and retransmission. The listing is for the first edition; current edition and availability may vary.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.