Question types seen repeatedly in past papers. More stars means more frequent.
★★★
Congestion window after k RTTs with a timeout
Apply slow start up to ssthresh, then +1 per RTT; reset on timeout.
★★★
Sequence-number bits or wrap-around time
bytes sent in MSL = B × MSL, then log2.
★★★
Handshake / teardown: flags, seq and ack numbers, states
Which flags are set in P1, P2, P3; ack = seq + 1.
★★★
TCP vs UDP facts, crashes and resets
Server crash gives RST; ISNs are random; FIN-WAIT-2 state.
Ratings are approximate, based on recurring patterns in past GATE CSE papers.
Previous year questions
11 real questions from the official GATE CSE papers (2014 to 2025), newest first, each with the official answer key and a worked solution. Questions are the property of the GATE organising institutes; this copy is for your personal study.
11 questions · 0 correct of 0 attempted · marks 0 / 17
Year:
GATE 2025 CS1 · Q22MSQ1 mark
Consider the 3-way handshaking protocol for TCP connection establishment. Let the three packets exchanged during the connection establishment be denoted as P1, P2, and P3, in order. Which of the following option(s) is/are TRUE with respect to TCP header flags that are set in the packets?
One or more options may be correct. Select all that apply, then submit.
GATE 2024 CS1 · Q29MSQ1 mark
TCP client P successfully establishes a connection to TCP server Q. Let NP denote the sequence number in the SYN sent from P to Q. Let NQ denote the acknowledgement number in the SYN ACK from Q to P. Which of the following statements is/are CORRECT?
One or more options may be correct. Select all that apply, then submit.
GATE 2024 CS2 · Q54NAT2 marks
Consider a TCP connection operating at a point of time with the congestion window of size 12 MSS (Maximum Segment Size), when a timeout occurs due to packet loss. Assuming that all the segments transmitted in the next two RTTs (Round Trip Time) are acknowledged correctly, the congestion window size (in MSS) during the third RTT will be ______.
GATE 2023 · Q50MSQ2 marks
Suppose you are asked to design a new reliable byte-stream transport protocol like TCP. This protocol, named myTCP, runs over a 100 Mbps network with Round Trip Time of 150 milliseconds and the maximum segment lifetime of 2 minutes. Which of the following is/are valid lengths of the Sequence Number field in the myTCP header?
One or more options may be correct. Select all that apply, then submit.
GATE 2022 · Q60NAT2 marks
Consider the data transfer using TCP over a 1 Gbps link. Assuming that the maximum segment lifetime (MSL) is set to 60 seconds, the minimum number of bits required for the sequence number field of the TCP header, to prevent the sequence number space from wrapping around during the MSL is ______.
GATE 2021 Set 1 · Q44MSQ2 marks
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?
One or more options may be correct. Select all that apply, then submit.
GATE 2020 · Q55NAT2 marks
Consider a TCP connection between a client and a server with the following specifications: the round trip time is 6 ms, the size of the receiver advertised window is 50 KB, slow-start threshold at the client is 32 KB, and the maximum segment size is 2 KB. The connection is established at time t = 0. Assume that there are no timeouts and errors during transmission. Then the size of the congestion window (in KB) at time t + 60 ms after all acknowledgements are processed is ______.
GATE 2018 · Q14MCQ1 mark
Consider the following statements regarding the slow start phase of the TCP congestion control algorithm. Note that cwnd stands for the TCP congestion window and MSS denotes the Maximum Segment Size. (i) The cwnd increases by 2 MSS on every successful acknowledgment. (ii) The cwnd approximately doubles on every successful acknowledgment. (iii) The cwnd increases by 1 MSS every round trip time. (iv) The cwnd approximately doubles every round trip time. Which one of the following is correct?
GATE 2018 · Q25NAT1 mark
Consider a long-lived TCP session with an end-to-end bandwidth of 1 Gbps (= 109 bits-per-second). The session starts with a sequence number of 1234. The minimum time (in seconds, rounded to the closest integer) before this sequence number can be used again is ______.
GATE 2017 Set 1 · Q14MCQ1 mark
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?
GATE 2014 Set 1 · Q27NAT2 marks
Let the size of congestion window of a TCP connection be 32 KB when a timeout occurs. The round trip time of the connection is 100 msec and the maximum segment size used is 2 KB. The time taken (in msec) by the TCP connection to get back to 32 KB congestion window is ______.
Common traps
Slow start doubles per RTT, even though cwnd grows by 1 per ACK.
After a timeout ssthresh is half of the cwnd at the time of loss, not half of the old ssthresh.
The ack number is the next byte expected: ISN + 1 for the SYN.
The sequence number counts bytes, not segments.
SYN+ACK: both SYN and ACK flags are set; the first SYN has ACK = 0.