Unit content
Sequence numbers, acknowledgements and retransmission
A network can lose, duplicate or reorder packets. A reliable transport therefore needs a way to identify transmitted data and determine what the receiver has successfully obtained.
Sequence numbers label positions or units in the transmitted data. Acknowledgements (ACKs) report received progress. If acknowledged progress does not arrive, the sender can retransmit missing data.
Suppose a sender transmits segments beginning at byte 0 and byte 1000. If the receiver acknowledges data through byte 999 but the next segment is lost, the sender eventually retransmits the missing range rather than treating the later bytes as a new message.
Sequence numbers also let a receiver reject duplicates and restore order when packets arrive out of sequence.
These mechanisms are not uniquely TCP concepts: they are general ingredients for constructing reliable communication over an unreliable packet service.