The first segment is a SYN from the client. It carries the client's initial sequence number and starts the state change toward an open connection.

highlighted = computed this step

Why the client speaks first

The opening SYN declares the client's starting sequence number. It asks the server to acknowledge that starting point before data appears.

seq=1000\text{seq}=1000
Opening SYNA TCP handshake timeline recomputed from exact sequence and acknowledgment numbers.Opening SYNClientCLOSED to SYN-SENTServerLISTENSYN seq=1000 SYN

The SYN segment

The client sends SYN with sequence number 1000. There is no acknowledgment yet. These starting numbers are illustrative; a real stack picks each initial sequence number randomly, which matters for security.

SYN seq=1000\text{SYN seq}=1000
Opening SYNA TCP handshake timeline recomputed from exact sequence and acknowledgment numbers.Opening SYNClientCLOSED to SYN-SENTServerLISTENSYN seq=1000 SYN

Why the client state changes

After sending the SYN, the client has left CLOSED and is waiting for the server's reply. The server lane is still listening for a connection request.

ack=\text{ack}=\varnothing
Opening SYNA TCP handshake timeline recomputed from exact sequence and acknowledgment numbers.Opening SYNClientCLOSED to SYN-SENTServerLISTENSYN seq=1000 SYN

Summary

The first segment pins the client's initial sequence number and starts the ordering. Connection setup ordering and exact sequence numbers only; timing, retransmission, and round-trip time are not modeled here.

seq=1000\text{seq}=1000
Opening SYNA TCP handshake timeline recomputed from exact sequence and acknowledgment numbers.Opening SYNClientCLOSED to SYN-SENTServerLISTENSYN seq=1000 SYN