CS FundamentalsModerateGATE CS · Product company CS fundamentals

In a TCP connection the client calls close() first and the server closes later. Which sequence of states does the SERVER go through from ESTABLISHED?

  1. A. CLOSE_WAIT → LAST_ACK → CLOSED
  2. B. FIN_WAIT_1 → FIN_WAIT_2 → TIME_WAIT → CLOSED
  3. C. CLOSE_WAIT → TIME_WAIT → CLOSED
  4. D. LAST_ACK → CLOSE_WAIT → CLOSED

Correct answer: A. CLOSE_WAIT → LAST_ACK → CLOSED

The passive closer receives FIN and enters CLOSE_WAIT; when its application closes it sends its own FIN and waits in LAST_ACK for the ACK, then goes to CLOSED. FIN_WAIT_1/2 and TIME_WAIT belong to the active closer (the client here).

More Computer Networks questions

Exams that ask this topic