3

After reading Why do we need a 3-way handshake? Why not just 2-way? I understand that We need ACK otherwise the Server has no idea if the client ever received the SYN, and it's important that the client receives that. Once that ACK gets through, now the server knows that it can send packets to the client. It also knows that the client knows this, so it can start sending data right away. The handshake is complete. We have a good channel.

But I want to know If the final ACK segment (third step) is never sent by the client. What server will do then? Is it run out of memory or something else because as far as I know When a client sends a SYN segment to the server, the server reserves memory to keep state information? What server will do with this state information If there is no ACK from client?

1 Answers1

5

the server will periodically retransmit the syn-ack and eventually timeout and abandon the connection entry if the final ack is not received.

This does consume some RAM and is the subject of DoS attacks. However there are operating system mitigations available - in linux minisocks are used to keep the footprint down and after a certain point you can transition to syncookies which don't require any server side state during this period. (but they have downsides).

Patrick McManus
  • 307
  • 1
  • 2