TCP handshake
Also called: three-way handshake, SYN SYN-ACK ACK
A TCP handshake synchronizes connection state and initial sequence numbers before normal data exchange. The usual three-way opening sends SYN, then SYN plus ACK, then ACK. Each side’s SYN consumes one sequence number; an acknowledgment identifies the next sequence number expected from the peer.
With illustrative starting numbers 1000 and 7000, the exchange is SYN 1000, SYN 7000 with ACK 1001, then ACK 7001. This explains the extra one without counting application bytes. The handshake establishes a transport connection; it does not authenticate a website or negotiate encryption. TLS performs a separate security handshake when used.
- Read first
- TCP
- Related
- Protocol state machine, TLS, TCP
- Further reading
- IETF RFC 9293 — Transmission Control Protocol (TCP)