Why does the TCP three-way handshake bump the sequence number when acking during the initial handshake? How is that better than just leaving the acknowledgement number equal to the sequence number?
The connection is established with
Client sends SYN,A
Server responds with SYN-ACK,A+1,B
Client confirms with ACK,B+1
How is that better than
Client sends SYN,A
Server responds with SYN-ACK,A,B
Client confirms with ACK,B
That’s because the
ACKfield means this when theACKflag is set:If it is not set to (inital sequence number+1), it would be inconsistently mean both ack’ing the
SYN(bothSYNandACKflags must be set in this packet) and saying it is expecting that sequence number again (i.e. hasn’t received it).