The client (192.168.1.50:51234) sends a segment with the SYN flag set and a randomly chosen Initial Sequence Number (ISN) — randomized specifically so an attacker can't predict it and inject or hijack the session.
SYNThe server (93.184.216.34:443) receives the SYN and allocates a small amount of memory in its SYN backlog for this specific pending connection — before it has any confirmation the client actually exists and will complete the handshake.
BacklogThe server replies with its own SYN flag and its own randomized ISN, plus an ACK acknowledging the client's ISN+1. This is exactly why it's a three-way handshake, not two — each direction needs its own sequence number established and acknowledged independently.
SYN-ACKRight now the server has committed backlog memory for a connection it hasn't fully confirmed. This transient state is completely normal under regular network latency — but it's also precisely the resource a SYN flood attack exploits: send many SYNs, never complete any of them, and exhaust the server's backlog until legitimate connections can't get a slot.
CheckpointThe client receives the SYN-ACK and replies with an ACK acknowledging the server's ISN+1. This packet typically carries no data.
ACKThe server receives the ACK, moves the connection from the half-open backlog into its accept queue, and the application's accept() call can now return this socket. Both sides have synchronized sequence numbers; data can flow in either direction.
Now the actual question: the client's ACK never reaches the server — dropped in transit, or the client crashed the instant after sending SYN. From the server's side, these two causes are indistinguishable; all it knows is it's still waiting.
LossAfter a retransmission timeout (RTO) — dynamically calculated from measured round-trip time, commonly starting around 1 second — the server assumes its own SYN-ACK might have been lost and retransmits it, still holding the half-open state.
RetransmitIf still no ACK arrives, the server retries a limited number of times (commonly 5 on Linux by default), doubling the wait between each attempt. After the final retry fails, the server gives up, tears down the half-open connection, and frees the backlog slot.
BackoffIf the client genuinely did receive the SYN-ACK and believes the connection is already established (only its outbound ACK was lost), it may start sending real data immediately. If that data arrives at the server carrying the correct acknowledgment number, many TCP stacks accept it as implicit confirmation and finalize the connection anyway — the handshake can self-heal without ever needing a bare, standalone ACK retransmission.
Self-HealBecause SYN flood attacks abuse exactly the half-open state from step 4, the standard defense is SYN cookies: instead of allocating real backlog memory on receiving a SYN, the server encodes the connection's necessary state into the SYN-ACK's own sequence number and allocates nothing until a valid ACK actually returns — eliminating the exhaustible resource the attack targets.
SYN Cookiesaccept() and start using them. A connection moves from one queue to the other exactly at the moment its final ACK is received.| Term | Meaning |
|---|---|
| ISN | Initial Sequence Number — randomized per connection to prevent prediction-based attacks |
| Half-Open Connection | A connection where SYN-ACK was sent but the final ACK hasn't been received yet |
| SYN Backlog | The queue of half-open connections a server holds pending state for |
| Accept Queue | The queue of fully-established connections waiting for the application to accept them |
| RTO | Retransmission Timeout — dynamically calculated from measured RTT, governs when to resend |
| Exponential Backoff | Doubling the wait time between successive retransmission attempts |
| SYN Flood | A DoS technique exhausting the SYN backlog by never completing handshakes |
| SYN Cookies | A defense encoding connection state into the SYN-ACK sequence number instead of allocating real backlog memory |
| TCP Fast Open | An optimization allowing data in the initial SYN for previously-seen connections |
| RFC 6528 | The specification governing secure, randomized TCP initial sequence number generation |