tcp – Why does a pure ACK increment the sequence number?

Share post:

It isn’t necessarily the case that the third segment contains no data. From Data Communications and Networking (Forouzan):

Note that the ACK segment does not consume any sequence numbers if it does not carry data, but some implementations allow this third segment in the connection phase to carry the first chunk of data from the client (emphasis mine). In this case, the segment consumes as many sequence numbers as the number of data bytes. An ACK segment, if carrying no data, consumes no sequence number.

I found the answer to your question in Computer Networking: A Top-Down Approach (Kurose and Ross):

Upon receiving the SYNACK segment, the client also allocates buffers and variables to the connection. The client host then sends the server yet another segment; this lasts segment acknowledges the server’s connection-granted segment (the client does so by putting the value server_isn+1 in the acknowledgement field of the TCP segment header). The SYN bit is set to zero, since the connection is established. This third stage of the three-way handshake may carry client-to-server data in the segment payload.

There’s a diagram on the following page that the explanation refers to (the one below isn’t from the book, but the idea is the same):

tcp – Why does a pure ACK increment the sequence number?

Related articles