Skip to content
GATEiit

GATE CSE 2017 Session 1 Q24: TCP client state while waiting for the server's FIN

Syllabus topic: TCP: flow control and congestion control; socket API

Question

Consider a TCP client and a TCP server running on two different machines. After completing data transfer, the TCP client calls close to terminate the connection and a FIN segment is sent to the TCP server. Server-side TCP responds by sending an ACK, which is received by the client-side TCP. As per the TCP connection state diagram (RFC 793), in which state does the client-side TCP connection wait for the FIN from the server-side TCP?

Try it: multiple choice: exactly one correct option

Select one option
Wrong answer costs 1/3 mark in GATE.
Show answer and explanation

Answer: D (official GATE 2017 final answer key)

Concept used: TCP active close: ESTABLISHED → FIN-WAIT-1 (FIN sent) → FIN-WAIT-2 (ACK of FIN received) → TIME-WAIT (peer's FIN received).

Concept notes

Loading notes…

First step: Follow the active-close path of the RFC 793 state diagram and note which transition the ACK of the client's FIN triggers.

Full step-by-step solution

Loading…

Answer from the official final answer key. Found a mistake? Use Report issue and we will fix it.

More questions on TCP: flow control and congestion control; socket API

Every PYQ on this topic →

Share this question

WhatsAppDownload image

Source: official GATE 2017 Session 1 CS question paper and final answer key, organised by IIT Roorkee. Question paper · Answer key