Protocols
Saved & recent

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)
client server SYN seq=1000 SYN + ACK seq=7000 ack=1001 ACK seq=1001 ack=7001 connection established ordinary opening · no data
Ordinary opening without application data. Starting numbers are illustrative; each SYN advances its sender’s sequence space by one.

View in the full Protocols collection