previous | start | next

TCP Operation

When a segment is received correct and intact at its destination, an acknowledgment (ACK) segment is returned to the sending TCP. This ACK contains the sequence number of the last byte correctly received, incremented by 1[3]. ACKs are cumulative -- a single ACK can be sent for several segments if, for example, they all arrive within a short period of time.
Normal TCP segment delivery and acknowledgement
The network service can fail to deliver a segment. If the sending TCP waits for too long[4] for an acknowledgment, it times out and resends the segment, on the assumption that the datagram has been lost.
Timeout and resend of lost TCP segment
In addition, the network can potentially deliver duplicated segments, and can deliver segments out of order. TCP buffers or discards out of order or duplicated segments appropriately, using the byte count for identification.
 
[3] In effect, the acknowledging TCP is saying: "I have received all bytes up to and including byte x: I expect that the next byte I received from you will be numbered x+1"
 
[4] The TCP timeout algorithm uses observed round trip times, and measures of their variability, to calculate a continuously updated best estimate of when to resend. See the tutorial for a discussion on this.
Lecture 11: Reliable Transport -- TCP Copyright © 2005 P.Scott, La Trobe University Bendigo.


previous | start | next