Computer Science / Networking
Part of the TCP Three-Way Handshake Learning Experience βWatch the three-way SYN / SYN-ACK / ACK exchange that opens a reliable TCP connection between a client and a server.
Before a client and server can exchange data over TCP, they run a three-segment handshake to agree on a starting point: each side proposes its own initial sequence number and confirms it received the other side's. The client sends SYN (its sequence number). The server replies with a single SYN-ACK segment that both acknowledges the client's number and proposes its own β the two middle steps of a four-step exchange collapsed into one segment, which is why it's a three-way handshake and not four. The client then sends ACK, confirming the server's number. Both sides track two connection states in parallel: the client moves CLOSED β SYN_SENT β ESTABLISHED, while the server moves LISTEN β SYN_RCVD β ESTABLISHED β notice the client reaches ESTABLISHED one full segment before the server does, since it doesn't need to wait for its ACK to be acknowledged. This visualizer shows both lifelines at once, with every segment's flags, sequence number, and acknowledgment number inspectable as it crosses.
The client only needs to know that its SYN was received (confirmed by the SYN-ACK) before it's safe to start sending β it sends the final ACK immediately and doesn't wait for a reply. The server, on the other hand, can't be sure the client received its SYN-ACK until that ACK actually arrives, so it stays in SYN_RCVD one segment longer.
The sequence number is the position, in the byte stream, of the first byte this segment represents β during the handshake it's just each side's randomly chosen starting point (its "initial sequence number"). The acknowledgment number is one more than the highest sequence number the sender has successfully received, i.e. "here's what I'm expecting next."
This visualizer's scope is exactly what its name says β the three segments that open the connection. Once ESTABLISHED, ordinary data segments follow the same sequence/acknowledgment pattern shown here, just carrying payload bytes instead of only flags.