Question:medium

A TCP server application is programmed to listen on port number \(P\) on host \(S\). A TCP client is connected to the TCP server over the network. Consider that while the TCP connection was active, the server machine \(S\) crashed and rebooted. Assume that the client does not use the TCP keepalive timer. Which of the following behaviors is/are possible?

Show Hint

A TCP reset (RST) is used to abruptly terminate invalid or unknown connections, especially after crashes or reboots.
Updated On: Jan 30, 2026
  • If the client was waiting to receive a packet, it may wait indefinitely.
  • The TCP server application on \(S\) can listen on \(P\) after reboot.
  • If the client sends a packet after the server reboot, it will receive a RST segment.
  • If the client sends a packet after the server reboot, it will receive a FIN segment.
Show Solution

The Correct Option is A, B, C

Solution and Explanation

Step 1: Effect of abrupt server crash on client.
When the server crashes unexpectedly, it does not get a chance to send either a FIN or RST segment.

Since the client has not enabled TCP keepalive, it receives no indication of failure and continues waiting for data on the existing connection.

Therefore, the client may block indefinitely, making statement (A) correct.


Step 2: TCP state after server reboot.
A reboot clears all in-memory TCP connection state maintained by the server.

After restarting, the server is free to bind again to port P and listen for new incoming connections.

Hence, statement (B) is correct.


Step 3: Handling of packets from an old connection.
If the client sends data belonging to the previous connection, the rebooted server finds no matching connection entry.

According to TCP rules, such unexpected segments are answered with a RST (reset) to indicate an invalid or nonexistent connection.

Thus, statement (C) is correct.


Step 4: Possibility of FIN transmission.
A FIN is generated only during orderly connection termination when the TCP state is intact.

Because the server crashed and lost all connection information, it cannot send a FIN for the old session.

Therefore, statement (D) is incorrect.


Final Answer:
The correct options are (A), (B), and (C).

Was this answer helpful?
0