Skip to content

GATE CS 2021 Set 1 Q44 — Transport Layer: Flow Control, Congestion Control, UDP, TCP, Sockets

Explain with AI

A TCP\text{TCP} server application is programmed to listen on port number PP on host SS. A TCP\text{TCP} client is connected to the TCP\text{TCP} server over the network.

Consider that while the TCP\text{TCP} connection was active, the server machine SS crashed and rebooted. Assume that the client does not use the TCP\text{TCP} keepalive timer. Which of the following behaviors is/are possible?

Select all correct options
View worked solution

Answer: A;B;C

When the server machine SS 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 SS reboots, the operating system starts afresh. The TCP server application can be restarted and can successfully bind to and listen on port PP 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.

Published
Report a correction
Keep exploringMore Transport Layer: Flow Control, Congestion Control, UDP, TCP, Sockets questions