GateAI

GATE CSE TCP Flow and Congestion Control PYQs

Medium yield16.7% of Computer Networks

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.

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, 2014

    Calculations 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, 2018

    Calculating 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, 2017

    Analyzing 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, 2015

    True/false evaluations of protocol rules including byte-stream numbering vs packet numbering, dynamic rwnd vs static buffers, retransmission timeout bounds (RTO≥RTTRTO \ge RTT), piggybacking capability, and half-open socket behavior on remote host reboot.

  • System Call Function and State Transition

    OccasionalMCQ1 marks2014

    Identifying the specific socket API call responsible for altering socket state (e.g., active vs. passive socket roles, listening state).

  • Server-Side Execution Sequence

    OccasionalMCQ1 marks2015

    Determining 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 marks2017

    Evaluating 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 marks2026

    Evaluation 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, 2012

    Tracing 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 marks2016

    Calculating 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 marks2021

    Identifying 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 marks2015

    A 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

cwndk=2k×MSSorcwndnew=cwndold+1 MSS per ACK\text{cwnd}_{k} = 2^k \times \text{MSS} \quad \text{or} \quad \text{cwnd}_{\text{new}} = \text{cwnd}_{\text{old}} + 1 \text{ MSS per ACK}

Used to compute congestion window size at round kk during Slow Start before reaching ssthresh.

Cumulative Packets Sent in Slow Start

Total Segments=∑i=1k2i−1=2k−1\text{Total Segments} = \sum_{i=1}^k 2^{i-1} = 2^k - 1

Used to determine which transmission round or time interval contains a specific segment sequence number.

Congestion Avoidance Window Growth

cwndk+1=cwndk+1 MSS per RTT\text{cwnd}_{k+1} = \text{cwnd}_k + 1\text{ MSS per RTT}

Used when cwnd has reached or exceeded ssthresh to track linear additive increase.

Timeout Parameter Reset

ssthresh=max⁡(2 MSS,cwnd2),cwnd=1 MSS\text{ssthresh} = \max\left(2\text{ MSS}, \frac{\text{cwnd}}{2}\right), \quad \text{cwnd} = 1\text{ MSS}

Used immediately upon encountering a retransmission timeout (Tahoe/Reno base behavior).

Sequence Number Wrap-Around Time

Twrap=2N bytesBandwidth in bytes/sec=2N×8RbpsT_{\text{wrap}} = \frac{2^N \text{ bytes}}{\text{Bandwidth in bytes/sec}} = \frac{2^N \times 8}{R_{\text{bps}}}

Used to find time before a 32-bit (or NN-bit) sequence space exhausts at link rate RR.

Minimum Sequence Number Bits to Avoid Wrap in MSL

2N≥RBps×MSL  ⟹  N=⌈log⁡2(Data Transmitted in MSL)⌉2^N \ge R_{\text{Bps}} \times \text{MSL} \implies N = \lceil \log_2(\text{Data Transmitted in MSL}) \rceil

Used when sizing the sequence number field in custom or standard transport protocols over high-speed links.

Slow-Start Threshold Update on Timeout

ssthresh=max⁡(2,⌊cwnd2⌋)\text{ssthresh} = \max\left(2, \left\lfloor \frac{\text{cwnd}}{2} \right\rfloor\right)

Used immediately when a packet loss or retransmission timeout (RTO) occurs to adjust the threshold before resetting cwnd.

Slow-Start Window Growth per RTT

cwndi+1=2×cwndi(for cwnd<ssthresh)\text{cwnd}_{i+1} = 2 \times \text{cwnd}_i \quad (\text{for } \text{cwnd} < \text{ssthresh})

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

cwndi+1=cwndi+1 MSS(for cwnd≥ssthresh)\text{cwnd}_{i+1} = \text{cwnd}_i + 1\text{ MSS} \quad (\text{for } \text{cwnd} \ge \text{ssthresh})

Used to compute additive increase of the congestion window per RTT once ssthresh is reached or exceeded.

Token Bucket Maximum Burst Duration

tb=CM−Rt_b = \frac{C}{M - R}

Used when a full bucket of capacity CC discharges at peak rate MM while receiving new tokens at sustained rate RR.

Total Transmission Time with Token Bucket

T=tb+D−(M⋅tb)RT = t_b + \frac{D - (M \cdot t_b)}{R}

Used to calculate minimum time to send total data DD 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.