The ACK flag is a TCP control bit that indicates the acknowledgment-number field is valid. When set to 1, it confirms received data or control messages and supports TCP's reliable, connection-oriented communication. section 22.2.1
The ACK flag appears in several important TCP exchanges:
- During the three-way handshake, the server responds with SYN-ACK, and the client completes establishment with ACK. section 22.2.1 section 22.3
- During data exchange, receivers acknowledge segments by using an acknowledgment number that identifies the next sequence number expected. section 22.3
- During connection termination, hosts acknowledge FIN segments with ACK segments, commonly producing a FIN-ACK-FIN-ACK exchange. section 22.2.1 section 22.3
- If an expected acknowledgment does not arrive before the retransmission timeout, the sender retransmits the segment. section 22.2.1 section 22.3
Three-way handshake
PC1 sends a TCP segment with SYN. SRV1 replies with SYN and ACK. PC1 then sends ACK, completing connection establishment before data exchange begins.
