I cannot figure out why an pure ACK will increment the sequence number of the sending host by 1 when the TCP segment contains only header, such as in the third segment in a three-way handshake for establishing a TCP connection.
For example:
- Host1 sends a SYN segment (seq = ISN(c), options) to Host2.
- Host2 sends a SYN+ACK segment (seq = ISN(s), ACK = ISN(c)+1,
options) back to Host1. - Host1 sends the last ACK segment (seq = ISN(c)
+1
, ACK = ISN(s)+1)
to server to complet the handshake.
But there is no data contained in the 3rd segment, meaning Host1 does not inject more bytes into the communication path. What is being sent is header only. Why would its seq be different from that from segment 1?
Best Answer
It isn't necessarily the case that the third segment contains no data. From Data Communications and Networking (Forouzan):
I found the answer to your question in Computer Networking: A Top-Down Approach (Kurose and Ross):
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):