Between The Two Fins

A client calls close() first. The connection walks through these states:

step segment client server
1 client sends FIN FIN-WAIT-1 ESTABLISHED
2 server ACKs the FIN FIN-WAIT-2 CLOSE-WAIT
3 server's app calls close(), sends FIN TIME-WAIT LAST-ACK
4 client ACKs TIME-WAIT CLOSED

The server sits in CLOSE-WAIT for 30 seconds before step 3. What is true of that window, and of the client's TIME-WAIT?

A

The client entered TIME-WAIT at step 1 and leaves after one MSL, which is long enough for the final ACK to make one trip.

B

The server may keep sending data for the whole 30 seconds and the client must keep reading it; the client then holds TIME-WAIT for 2*MSL so late duplicates cannot land on a new connection reusing the port pair.

C

The connection is finished at step 2, so anything the server sends is discarded; TIME-WAIT is a fixed 60 seconds required by the RFC.

D

The server is required to send its FIN as soon as it receives one, and the 30-second delay means the server's TCP stack is broken.