Rationale behind ACKs and SEQs?

network-programming, network-protocols, networking, tcp

Solution

This is because the first byte of sequence number space corresponds to the SYN flag, not to a data byte. (The FIN flag at the end also consumes a byte of sequence number space itself.)

Problem

I am not sure if people find this obvious but I have two questions: - During the 3-way handshake, why is ACK = SEQ + 1 i.e. why am I ACKing for the next byte that I am expecting from the sender? - After the handshake, my ACK = SEQ + len. Why is this different from the handshake? Why not just ACK for the next byte I am expecting as well (the same as during the handshake)? I know I must've missed out a basic point somewhere. Can someone clarify this?

Original source