GATE CSE TCP Flow and Congestion Control PYQs
GATE CS tests TCP across three primary areas: congestion control dynamics (window growth phases, timeout recovery, and round-by-round segment tracking), sequenc… Read the guide
- Questions
- 23
- Asked
- since 2012
- Total marks
- 33
- Marks / paper
- 1.3
23 GATE CSE TCP Flow and Congestion Control PYQs with solutions, from Computer Networks. Browse all GATE CSE PYQs.
Questions
Every official paper that asked this topic, newest first.
- GATE CSE 2026 Set 1 · Q18With respect to a TCP connection between a client and a server, which one of the following statements is true?MCQ1 markEasySolve
- GATE CSE 2026 Set 1 · Q44A TCP sender successfully establishes a connection with a TCP receiver and starts the transmission of segments. The TCP congestion control mechanism’s slow-start threshold is set to 10000 segments. Assume that the round-trip time is fixed at 1 millisecond. Assume that the sender always has data to send, the segments…MCQ2 marksMediumSolve
- GATE CSE 2026 Set 2 · Q58Consider a new TCP connection between a sender and a receiver. The receiver advertised window is constant at 48 KB, the maximum segment size (MSS) is 2 KB, and the slow start threshold for TCP congestion control is 16 KB. Assume that there are no timeouts or duplicate acknowledgements. The number of rounds of…NAT2 marksMediumSolve
- GATE CSE 2025 Set 1 · Q22Consider 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?MSQ1 markEasySolve
- GATE CSE 2025 Set 2 · Q16Consider the following statements: (i) Address Resolution Protocol (ARP) provides a mapping from an IP address to the corresponding hardware (link-layer) address. (ii) A single TCP segment from a sender S to a receiver R cannot carry both data from S to R and acknowledgement for a segment from R to S. Which ONE of…MCQ1 markEasySolve
- GATE CSE 2024 Set 1 · Q29TCP client P successfully establishes a connection to TCP server Q. Let denote the sequence number in the SYN sent from P to Q. Let denote the acknowledgement number in the SYN ACK from Q to P. Which of the following statements is/are CORRECT?MSQ1 markEasySolve
- GATE CSE 2024 Set 2 · Q54Consider 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 ()…NAT2 marksMediumSolve
- GATE CSE 2023 · Q50Suppose 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…MSQ2 marksMediumSolve
- GATE CSE 2022 · Q60Consider 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 _________.NAT2 marksMediumSolve
- GATE CSE 2021 Set 1 · Q44A TCP server application is programmed to listen on port number on host . A TCP client is connected to the TCP server over the network. Consider that while the TCP connection was active, the server machine crashed and rebooted. Assume that the client does not use the TCP keepalive timer. Which of the…MSQ2 marksMediumSolve
- GATE CSE 2021 Set 2 · Q7Consider the three-way handshake mechanism followed during TCP connection establishment between hosts P and Q. Let X and Y be two random 32-bit starting sequence numbers chosen by P and Q respectively. Suppose P sends a TCP connection request message to Q with a TCP segment having SYN bit = 1, SEQ number = X, and ACK…MCQ1 markEasySolve
- GATE CSE 2020 · Q55Consider 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 . Assume that…NAT2 marksMediumSolve
- GATE CSE 2018 · Q14Consider the following statements regarding the slow start phase of the TCP congestion control algorithm. Note that stands for the TCP congestion window and MSS denotes the Maximum Segment Size. (i) The increases by 2 MSS on every successful acknowledgment. (ii) The approximately doubles on…MCQ1 markEasySolve
- GATE CSE 2018 · Q25Consider a long-lived TCP session with an end-to-end bandwidth of 1 Gbps ( 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 _______.NAT1 markMediumSolve
- GATE CSE 2017 Set 1 · Q14Consider a TCP client and a TCP server running on two different machines. After completing data transfer, the TCP client calls
closeto 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…MCQ1 markEasySolve - GATE CSE 2017 Set 2 · Q18Consider socket API on a Linux machine that supports connected UDP sockets. A connected UDP socket is a UDP socket on which
connectfunction has already been called. Which of the following statements is/are CORRECT? I. A connected UDP socket can be used to communicate with multiple peers simultaneously.…MCQ1 markMediumSolve - GATE CSE 2016 Set 1 · Q54For a host machine that uses the token bucket algorithm for congestion control, the token bucket has a capacity of 1 megabyte and the maximum output rate is 20 megabytes per second. Tokens arrive at a rate to sustain output at a rate of 10 megabytes per second. The token bucket is currently full and the machine needs…NAT2 marksMediumSolve
- GATE CSE 2015 Set 1 · Q19Suppose two hosts use a TCP connection to transfer a large file. Which of the following statements is/are FALSE with respect to the TCP connection? I. If the sequence number of a segment is , then the sequence number of the subsequent segment is always . II. If the estimated round trip time at any given…MCQ1 markMediumSolve
- GATE CSE 2015 Set 2 · Q20Identify the correct order in which a server process must invoke the function calls
accept,bind,listen, andrecvaccording to UNIX socket API.MCQ1 markEasySolve - GATE CSE 2015 Set 3 · Q22Consider the following statements. I. TCP connections are full duplex II. TCP has no option for selective acknowledgement III. TCP connections are message streamsMCQ1 markEasySolve
- GATE CSE 2014 Set 1 · Q27Let 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 _________.NAT2 marksMediumSolve
- GATE CSE 2014 Set 2 · Q24Which one of the following socket API functions converts an unconnected active TCP socket into a passive socket?MCQ1 markEasySolve
- GATE CSE 2012 · Q45Consider an instance of TCP's Additive Increase Multiplicative Decrease (AIMD) algorithm where the window size at the start of the slow start phase is 2 MSS and the threshold at the start of the first transmission is 8 MSS. Assume that a timeout occurs during the fifth transmission. Find the congestion window size at…MCQ2 marksMediumSolve
What GATE tests in TCP Flow and Congestion Control
Concepts, patterns, formulas and traps distilled from past papers.
GATE CS tests TCP across three primary areas: congestion control dynamics (window growth phases, timeout recovery, and round-by-round segment tracking), sequence number wrap-around time and bit-budget calculations against MSL, and connection lifecycle mechanics (3-way handshake flags, state transitions during active/passive close, and crash recovery with RST segments). Questions are balanced between computational NATs involving RTTs and discrete bit math, and conceptual MSQ/MCQs focusing on byte-stream mechanics, piggybacking, and RFC 793 protocol invariants.
Core concepts
- Slow Start vs Congestion Avoidance threshold transitions
- Timeout handling and ssthresh reduction
- TCP byte-stream sequence numbering vs segment numbering
- 32-bit Sequence Number space wrap-around and MSL constraints
- TCP 3-way handshake (SYN, SYN+ACK, ACK) and ISN randomization
- Connection termination states (FIN-WAIT-1, FIN-WAIT-2, TIME-WAIT, LAST-ACK)
- Flow control receiver advertised window (rwnd) vs sender cwnd
- TCP Reset (RST) generation on non-existent connections after server reboot
- Full-duplex piggybacking of ACK on data segments
- Retransmission Timeout (RTO) relationship to smoothed RTT
- BSD/UNIX Socket API lifecycle (socket, bind, listen, accept, connect, recv, send, close)
- Active sockets vs. Passive (listening) sockets
- TCP server-side calling workflow: socket -> bind -> listen -> accept -> recv/send
- Connected UDP sockets vs. Unconnected UDP sockets
- Multiple invocations and uncoupling of connect() on UDP sockets (AFUNSPEC)
- Three-way handshake connection establishment (SYN, SYN-ACK, ACK)
- Four-way and simultaneous connection teardown (FIN, ACK)
- Full-duplex communication model
- Symmetry of client-server roles during connection release
- TCP finite state machine transitions (e.g., CLOSING, TIMEWAIT)
- Slow Start Phase and Exponential Window Growth
- Congestion Avoidance Phase and Additive Increase (AIMD)
- Slow-start Threshold (ssthresh) Halving on Loss/Timeout
- Timeout (RTO) Handling and cwnd Reset to 1 MSS
- Token Bucket Algorithm (Capacity, Token Generation Rate, Maximum Burst Rate)
- TCP Three-Way Handshake (SYN, ACK bits, Sequence Numbers X, Y, Acknowledgement Numbers X+1)
- TCP full-duplex communication model
- TCP byte stream vs message stream semantics
- TCP Selective Acknowledgement (SACK) option
Recurring question patterns
Congestion Window Evolution and Round Tracing
Commonmixed2 marks2026, 2020, 2014Calculations tracking cwnd size, round index, or cumulative segments transmitted across Slow Start (exponential growth by doubling per RTT) and Congestion Avoidance (linear growth by 1 MSS per RTT), taking into account ssthresh and timeout events.
Sequence Number Wrap-Around and Header Field Sizing
Commonmixed2 marks2023, 2022, 2018Calculating the minimum time to wrap around the 32-bit sequence number space at a given line rate, or determining the minimum bit-width required to avoid sequence number re-use within the Maximum Segment Lifetime (MSL).
TCP Connection Establishment, Teardown, and State Diagram
CommonMSQ1 marks2025, 2024, 2021, 2017Analyzing flag combinations (SYN, ACK, FIN, RST) in connection handshake/teardown, sequence/acknowledgement number increments across SYN/FIN consumption, and exact RFC 793 state transitions (e.g., FIN-WAIT-1 to FIN-WAIT-2).
TCP Protocol Invariants and Socket Behavior
OccasionalMCQ1 marks2025, 2021, 2018, 2015True/false evaluations of protocol rules including byte-stream numbering vs packet numbering, dynamic rwnd vs static buffers, retransmission timeout bounds (), piggybacking capability, and half-open socket behavior on remote host reboot.
System Call Function and State Transition
OccasionalMCQ1 marks2014Identifying the specific socket API call responsible for altering socket state (e.g., active vs. passive socket roles, listening state).
Server-Side Execution Sequence
OccasionalMCQ1 marks2015Determining the mandatory chronological order of socket system calls invoked by a TCP server process during connection establishment and data transfer.
Protocol-Specific Socket Semantics
OccasionalMCQ1 marks2017Evaluating true/false statements regarding nuanced socket behavior across transport protocols, such as calling
connect()on a UDP socket.TCP Connection Lifecycle and Property Verification
RareMCQ1 marks2026Evaluation of true/false conceptual statements regarding TCP connection establishment (3-way handshake), duplex mode (full-duplex), and symmetry of connection teardown (including simultaneous close).
TCP Congestion Window Tracing
CommonNAT2 marks2024, 2012Tracing the evolution of cwnd and ssthresh across multiple RTTs or transmission rounds, including slow start exponential doubling, additive increase during congestion avoidance, and reset behaviors upon timeout or packet loss.
Token Bucket / Traffic Shaping Time Calculation
OccasionalNAT2 marks2016Calculating the total time or burst duration required to transmit a given volume of data through a token bucket shaper having a specified burst capacity, maximum transmission rate, and sustained token arrival rate.
TCP Connection Control & Handshake Signaling
OccasionalMCQ1 marks2021Identifying the exact header flag settings (SYN, ACK, FIN) and sequence/acknowledgement numbers during TCP three-way handshake connection establishment or four-way teardown.
Protocol Property Verification
OccasionalMCQ1 marks2015A set of numbered statements asserting specific architectural characteristics of transport protocols (such as duplexity, byte-stream vs message-stream orientation, and options like SACK) are evaluated for correctness.
Formulas GATE uses
Slow Start Window Growth
Used to compute congestion window size at round during Slow Start before reaching ssthresh.
Cumulative Packets Sent in Slow Start
Used to determine which transmission round or time interval contains a specific segment sequence number.
Congestion Avoidance Window Growth
Used when cwnd has reached or exceeded ssthresh to track linear additive increase.
Timeout Parameter Reset
Used immediately upon encountering a retransmission timeout (Tahoe/Reno base behavior).
Sequence Number Wrap-Around Time
Used to find time before a 32-bit (or -bit) sequence space exhausts at link rate .
Minimum Sequence Number Bits to Avoid Wrap in MSL
Used when sizing the sequence number field in custom or standard transport protocols over high-speed links.
Slow-Start Threshold Update on Timeout
Used immediately when a packet loss or retransmission timeout (RTO) occurs to adjust the threshold before resetting cwnd.
Slow-Start Window Growth per RTT
Used to compute congestion window growth during the slow-start phase when all transmitted segments in an RTT are acknowledged.
Congestion Avoidance Growth per RTT
Used to compute additive increase of the congestion window per RTT once ssthresh is reached or exceeded.
Token Bucket Maximum Burst Duration
Used when a full bucket of capacity discharges at peak rate while receiving new tokens at sustained rate .
Total Transmission Time with Token Bucket
Used to calculate minimum time to send total data exceeding initial bucket capacity under token bucket rate limiting.
Examiner traps in TCP Flow and Congestion Control
- Increment confusion: Forgetting that cwnd increases by 1 MSS per ACK in Slow Start (doubling per RTT), whereas in Congestion Avoidance it increases by 1 MSS per RTT (or 1/cwnd per ACK).
- Byte vs Bit rate unit conversion error: Forgetting to divide bandwidth in bps by 8 to get bytes/second when computing wrap-around against a byte-oriented sequence space.
- Off-by-one in handshake acknowledgement: Forgetting that a SYN or FIN consumes exactly 1 sequence number space despite having 0 data bytes, so ACK is NP + 1.
- Counting start time vs completion time: Confusing round k start time (k-1) × RTT with completion time k × RTT.
- rwnd capping: Ignoring that the actual transmission window is min(cwnd, rwnd), though cwnd itself may continue evolving.
- Assuming sequence numbers reset to 0: Assuming initial sequence numbers (ISNs) start at 0 instead of being chosen randomly per connection.
- Confusing `bind()` with `listen()`: `bind()` assigns an address/port to a socket, while `listen()` transforms an active socket into a passive socket ready to queue connections.
- Swapping the order of `listen()` and `accept()` in TCP server workflows.
- Assuming `connect()` performs a 3-way handshake on UDP sockets or that UDP sockets cannot call `connect()` more than once.
- Believing a connected UDP socket can broadcast or communicate with multiple remote peers simultaneously without reconnecting.
- Assuming connection termination must strictly be client-initiated or sequential rather than recognizing simultaneous close.
- Confusing TCP 3-way handshake with 2-way handshake connection models.
- Mistaking TCP's full-duplex communication for half-duplex communication.
- Confusing 'during the N-th RTT' with 'at the end of the N-th RTT' (window size during transmission vs after receiving the ACKs).
- Resetting cwnd to 0 instead of 1 MSS (or the specified initial slow-start window) upon a timeout.
- Failing to cap slow-start doubling at ssthresh or switching immediately from doubling to +1 without checking if doubling exceeds ssthresh.
- Forgetting that SYN and FIN control segments consume exactly 1 sequence number in TCP acknowledgements.
- Assuming the token bucket empties in C/M seconds rather than accounting for tokens continuously arriving during the burst at rate R (C/(M-R)).
- Confusing TCP byte-stream service with UDP/application message-stream or record-oriented delivery
- Believing TCP only supports cumulative acknowledgements without knowing about the Selective Acknowledgement (SACK) option
How questions are asked
- Window progression tracing over N RTTs to find cwnd (NAT/MCQ)
- Cumulative segment count interval mapping for packet K (MCQ)
- Bit-budget / wrap-around time numeric calculations given Bandwidth and MSL (NAT/MSQ)
- Identification of valid flag configurations and state transitions (MCQ/MSQ)
- Multi-statement correctness on flow control and protocol invariants (MCQ/MSQ)
- Identification of function purpose or state change
- Ordering/sequencing of server API calls
- Multi-statement correctness evaluation (Statement I/II)
- Qualitative statement verification on TCP connection management
- RTT-by-RTT step trace of TCP cwnd and ssthresh
- Burst vs sustained time arithmetic calculation for traffic shapers
- Protocol header field matching for connection state handshakes
- Multi-statement correctness evaluation
Paper trends
Introduction of multi-select questions (MSQs) testing multi-scenario connection handling such as server crashes, half-open connections, and valid range of header field widths.
2025, 2024, 2023, 2021
Shift from simple timeout-recovery tracking to cumulative packet-index interval mapping and discrete transmission round counting.
2026, 2020
Increasing granularity in testing header flag patterns (SYN, ACK) and 1-sequence-number logical consumption for control flags.
2025, 2024
Shifted from direct recall of TCP function roles and standard server sequences to deeper, subtle behavioral mechanics of socket calls under UDP.
2017, 2015, 2014
Focus on precise protocol edge behaviors such as simultaneous close alongside standard handshake and full-duplex definitions in 1-mark conceptual MCQs.
2026
Shift from multiple-choice ambiguity-prone tracing questions to precise Numerical Answer Type (NAT) questions specifying exact RTT boundaries and initial conditions.
2024, 2012
Focus on discrete state transitions after packet loss (timeout resetting cwnd to 1 MSS vs threshold halving) as high-yield 2-mark NAT problems.
2024
Concept-checking 1-mark MCQs evaluate precise RFC standard behaviors and definitions of TCP against common protocol misconceptions.
2015
Difficulty notes
Easy items (1 mark) test standard 3-way handshake flag settings, state machine names (FIN-WAIT-2), or basic growth rates (slow start doubles per RTT). Medium items (2 marks) require multi-step tracking: computing the exact RTT when cwnd crosses ssthresh and reaches a target KB, finding sequence number field bit boundaries against MSL, or determining socket behavior when an unannounced reboot triggers an RST segment.