Question:

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 2, 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.
Hide Solution
collegedunia
Verified By Collegedunia

The Correct Option is A, B, C

Solution and Explanation

Step 1: Client waiting behavior after server crash.
If the server crashes abruptly, no FIN or RST is sent to the client. Since the client is not using TCP keepalive, it has no mechanism to detect the failure and may block indefinitely waiting for data. Hence, option (A) is correct.

Step 2: Server behavior after reboot.
After reboot, the server loses all previous TCP state information. The TCP server application can bind and listen again on port \(P\). Therefore, option (B) is correct.

Step 3: Client sending data after server reboot.
When the client sends a packet corresponding to an old connection, the rebooted server has no record of that connection. TCP responds with a RST (reset) segment to indicate an invalid connection. Hence, option (C) is correct.

Step 4: FIN segment analysis.
A FIN segment is sent only during graceful connection termination. Since the server crashed and lost state, it cannot send FIN for the old connection. Thus, option (D) is incorrect.

Step 5: Conclusion.
The possible behaviors are described by options (A), (B), and (C).

Final Answer: (A), (B), (C)

Was this answer helpful?
0
0

Questions Asked in GATE CS exam

View More Questions