A server application is programmed to listen on port number on host . A client is connected to the server over the network.
Consider that while the connection was active, the server machine crashed and rebooted. Assume that the client does not use the keepalive timer. Which of the following behaviors is/are possible?
View worked solution
Answer: A;B;C
When the server machine crashes and reboots, all active TCP connection states stored in its volatile memory (kernel space) are lost. However, the client machine is unaware of this crash unless it attempts to communicate or has a mechanism to detect inactivity.
Let's analyze each option based on this scenario:
- Option A is correct: Since the client does not use a TCP keepalive timer, it has no active mechanism to probe the status of the connection. If the client is in a passive state waiting to receive data from the server, it will never receive any data and will continue to wait indefinitely.
- Option B is correct: After the server machine reboots, the operating system starts afresh. The TCP server application can be restarted and can successfully bind to and listen on port again to accept new incoming connection requests.
- Option C is correct: If the client sends a packet (such as data) to the server after the reboot, the server's TCP stack receives a segment belonging to a connection for which it has no record (due to state loss during the crash). According to the TCP protocol specification (RFC 793), receiving a segment for a non-existent connection triggers the receiver to respond with a RST (Reset) segment to force-close the connection at the client side.
- Option D is incorrect: A FIN segment is used for a graceful, cooperative connection teardown initiated by an active connection endpoint. Since the server has lost all connection state, it cannot perform a graceful shutdown for this non-existent connection and will send a RST segment instead of a FIN segment.
Thus, the possible behaviors are A, B, and C.
Free practice · Your answers on this page are not saved.
