GATE / CS ARCHIVE

SUBJECT COLLECTION

Computer Networks · Transport, Congestion Control & Traffic Shaping

35 questions, newest first

GATE CSE has asked 35 questions on Transport, Congestion Control & Traffic Shaping (Computer Networks) from 2003 to 2026, in 26 of the 46 papers; the most recent is in GATE CSE 2026 Set 2. In the last five years it carried 1.9 marks per 100-mark paper on average, against 1.4 since 2003. Since 2014 the questions have been 11 MCQ, 8 NAT and 4 MSQ. 6 groups of questions here are solved the same way; “One per method” keeps the newest of each.

Browse topics
1 mark · MCQ
Report issue

TCP establishment and simultaneous close

Transport, Congestion Control & Traffic Shaping

Question 18, GATE 2026: Choose the true TCP statement: A establishment uses a two-way handshake; B only the client may initiate closing; C TCP is half-duplex; D client and server may initiate closing simultaneously.
Tap to enlarge
Your answer
Answer & solution

Official answer: D

Givens and goal

Choose the true TCP statement: A establishment uses a two-way handshake; B only the client may initiate closing; C TCP is half-duplex; D client and server may initiate closing simultaneously.

Approach

Distinguish connection establishment, directional data flow, and each endpoint’s independent ability to send FIN.

Step-by-step solution

1. Ordinary TCP establishment uses SYN, SYN+ACK and ACK, a three-way handshake. Therefore A’s two-way-handshake description is incorrect.
2. A TCP connection supports data in both directions independently. Either endpoint may transmit while receiving, so it is full-duplex rather than half-duplex; C is false.
3. Either endpoint can initiate closing its sending direction by sending FIN. The server need not wait for the client to begin, so B is false.
4. Both endpoints may independently send FIN before receiving the other endpoint’s FIN. TCP handles this simultaneous close by acknowledging each FIN and completing the state transitions. Thus D is true.
5. Closing is not a rule that only a designated “client side” may invoke: client and server describe connection establishment roles, not permanent ownership of shutdown.

Original paper, page 15 · Answer key

2 marks · MCQ
Report issue

TCP slow start and an omitted initial window

Transport, Congestion Control & Traffic Shaping

Question 44, GATE 2026: A TCP connection has slow-start threshold 10000 segments, fixed RTT 1 ms, unlimited queued data, no losses, and segment numbering from 1. Find the interval when segment 2000 begins: A [9,10), B [10,11), C [11,12), D [12,13) ms. The initial congestion window and precise time origin are not explicitly stated.
Tap to enlarge
Your answer
Answer & solution

Official answer: B

Our answer: B under the implicit initial-window=1 convention; otherwise under-specified.

Givens and goal

A TCP connection has slow-start threshold 10000 segments, fixed RTT 1 ms, unlimited queued data, no losses, and segment numbering from 1. Find the interval when segment 2000 begins: A [9,10), B [10,11), C [11,12), D [12,13) ms. The initial congestion window and precise time origin are not explicitly stated.

Approach

Derive the official result under the usual one-segment, idealized-round convention, then identify which missing assumptions it uses.

Step-by-step solution

1. Assume the first segment starts at time 0, the initial congestion window is one segment, and each RTT doubles the allowed batch during slow start. The sending windows are 1,2,4,8,… .
2. Number rounds from r=0. Round r starts at r milliseconds and sends 2r segments. Through the end of round r the cumulative number is 1+2+…+2r=2r+1−1.
3. Through round 9 the cumulative count is 210−1=1023. Round 10 has window 1024 and covers segment numbers 1024 through 2047. Therefore segment 2000 belongs to the sending interval [10,11) ms, giving official option B.
4. The slow-start threshold does not change this calculation because the relevant window, 1024, is well below 10000.
5. The initial window is material. If it were ten segments, cumulative counts would be 10(2r+1−1). Through round 6 this is 1270; round 7 reaches 2550. The same segment would then begin in [7,8) under the same idealized batch convention.

CS-2026-S1-Q44-IW. Official B depends on initial window 1, the chosen post-establishment time origin, and the textbook round model. The stated parameters alone do not uniquely determine the interval. This is not a claim that a revised official key exists.

Original paper, page 33 · Answer key

2 marks · NAT
Report issue

Slow-start rounds and the initial-window convention

Transport, Congestion Control & Traffic Shaping

Question 58, GATE 2026: A new TCP connection has constant receive window 48 KB, MSS 2 KB, and slow-start threshold 16 KB, with no timeouts or duplicate ACKs. How many transmission rounds are needed to reach congestion avoidance? The initial congestion window and round-count convention are not explicitly stated.
Tap to enlarge
Answer & solution

Official answer: 4

Givens and goal

A new TCP connection has constant receive window 48 KB, MSS 2 KB, and slow-start threshold 16 KB, with no timeouts or duplicate ACKs. How many transmission rounds are needed to reach congestion avoidance? The initial congestion window and round-count convention are not explicitly stated.

Approach

Use the textbook one-MSS start for the published answer and explain the dependency on that assumption.

Step-by-step solution

1. Under the conventional exercise assumption, the initial congestion window is one MSS=2 KB. In idealized slow start, one successful round doubles the window because acknowledgements increase the congestion window for the next round.
2. The sending-window sequence is round 1:2 KB, round 2:4 KB, round 3:8 KB, round 4:16 KB. The threshold 16 KB is first reached in the fourth sending round.
3. The receive window is 48 KB, larger than every window in this sequence, so it never limits the growth before the threshold. Using the threshold-round index gives the official answer 4.
4. However, only three completed doubling rounds separate the initial 2 KB window from 16 KB. Counting completed slow-start rounds instead of labeling the first threshold sending round changes the wording of the answer by one.
5. Moreover the initial congestion window is not specified; starting at 4 KB would give sending windows 4,8,16 and an index of 3. Modern TCP implementation defaults need not be one MSS. Therefore retain 4 as the published scoring answer with these implicit assumptions, rather than asserting an implementation-independent fact.

Original paper, page 40 · Answer key

2 marks · NAT
Report issue

Sequence-number space for a full-rate link

Transport, Congestion Control & Traffic Shaping

Question 65, GATE 2026: Two hosts use a lossless 3000 km link of bandwidth 10⁸ bits/s and propagation delay 5 ns/m. Every data byte gets a sequence number. Find the minimum sequence-field width N so numbers do not wrap before 60 s and full utilization is possible.
Tap to enlarge
Answer & solution

Official answer: 30

Givens and goal

Two hosts use a lossless 3000 km link of bandwidth 10⁸ bits/s and propagation delay 5 ns/m. Every data byte gets a sequence number. Find the minimum sequence-field width N so numbers do not wrap before 60 s and full utilization is possible.

Approach

Compare the long-term no-wrap requirement with the in-flight window requirement.

Step-by-step solution

1. At full rate the byte rate is 10⁸/8=12.5×10⁶ bytes/s. In 60 seconds the sender transmits 60×12.5×10⁶=750,000,000 bytes, requiring at least that many distinct sequence numbers before reuse.
2. An N-bit field has 2N possible values. Since 2²⁹=536,870,912<750,000,000 and 2³⁰=1,073,741,824≥750,000,000, the no-wrap condition requires N≥30.
3. Convert the link length to 3,000,000 m. One-way propagation is 3,000,000×5 ns=15 ms, so propagation round trip is 30 ms when other delays are ignored.
4. The bandwidth-delay product for that round trip is 12.5×10⁶×0.030=375,000 bytes. A window supporting that many outstanding bytes can keep the link busy. Even a selective-repeat-style sequence-space requirement of twice that window is only 750,000 values, far below 2³⁰.
5. Thus the 60-second nonwrapping condition dominates and N=30. This uses the question’s idealized data rate and ignores unspecified header, acknowledgement-transmission, and processing overhead; those details are not needed to overturn the much larger no-wrap bound.

Original paper, page 42 · Answer key

1 mark · MSQ
Report issue

Reading flags in the TCP handshake

Transport, Congestion Control & Traffic Shaping

Question 22, GATE 2025: Let P1,P2,P3 be the three successive packets of the ordinary TCP connection-establishment handshake. Select true claims: A P3 has SYN=1,ACK=1; B P2 has SYN=1,ACK=1; C P2 has SYN=0,ACK=1; D P1 has SYN=1.
Tap to enlarge
Select all that apply
Answer & solution

Official answer: B, D

Approach: Separate the request to synchronize sequence numbers from the acknowledgment of the peer’s request.
P1 is the initiating SYN: it starts synchronization with SYN=1 and, in the ordinary initial handshake, ACK=0. Hence D is true.
P2 both acknowledges the first SYN and announces the responding endpoint’s own initial sequence number. Its flags are SYN=1 and ACK=1. This makes B true and C false.
P3 acknowledges the responder’s SYN. It is an ACK with SYN=0,ACK=1, so A is false. The correct selection is B and D.
The ACK flag indicates that the acknowledgment-number field is valid; it is not merely a generic statement that a packet arrived. This question is about the standard three-way establishment sequence, not simultaneous open or later connection teardown.

Original paper, page 22 · Answer key

1 mark · MSQ
Report issue

TCP SYN sequence-space accounting

Transport, Congestion Control & Traffic Shaping

Question 29, GATE 2024: Client P successfully connects to TCP server Q. NP is the sequence number in P's SYN; NQ is the acknowledgment number in Q's SYN-ACK. Which claims are correct? A NP is randomly chosen by P. B NP is always 0 for a new connection. C NQ=NP. D NQ=NP+1.
Tap to enlarge
Select all that apply
Answer & solution

Official answer: A, D

Approach: Separate the choice of the initial sequence number from the rule for acknowledging a SYN.
1. A new TCP connection does not always begin at sequence number zero. The initial sequence number is chosen by the endpoint using a scheme intended to make it difficult to predict and to separate old connection traffic from new traffic. This is the randomized or pseudorandom selection described by A; B is false.
2. TCP acknowledgment numbers identify the next sequence number expected from the peer. A SYN consumes one position in sequence space even though it is not an ordinary payload byte.
3. After receiving a SYN with sequence NP, Q therefore acknowledges NP+1, with arithmetic modulo 2³². This makes D true and C false.
Answer: A and D. Actual initial-sequence algorithms may combine a clock with a keyed pseudorandom function; the key's “randomly” should not be read as requiring a fresh independent uniform draw.

Original paper, page 19 · Answer key

2 marks · NAT
Report issue

Window size in the third RTT after a timeout

Transport, Congestion Control & Traffic Shaping

Question 54, GATE 2024: A TCP connection has congestion window 12 MSS when a timeout occurs. All segments in the next two RTTs are acknowledged successfully. Under textbook timeout slow start, what is the congestion window during the third RTT, in MSS?
Tap to enlarge
Answer & solution

Official answer: 4

Step through it (4 steps)

Approach: Distinguish the window used during an RTT from its value after that RTT’s acknowledgements.

1. Derivation. Under the standard timeout slow-start model, a timeout sets ssthresh to half the old congestion window, 6MSS, and resets cwnd to 1MSS. The first subsequent RTT uses 1 and its successful ACKs grow cwnd to 2; the second uses 2 and grows it to 4. Thus during the third RTT cwnd is 4MSS, still below the threshold. This assumes the textbook one-MSS post-timeout reset and per-round doubling.

2. Explanation and checks. The timeout halves the threshold, not the new sending window: ssthresh becomes 6 while cwnd restarts at 1. Thus the three rounds begin with windows 1,2,4 respectively. Doubling the third round’s window to 8 would describe a later update, and would also require handling the threshold transition. The requested third round begins below ssthresh, so that boundary detail does not affect the answer. This is the stipulated textbook congestion-control model, not a universal statement about every modern TCP implementation.

Original paper, page 37 · Answer key

2 marks · MSQ
Report issue

Transport, Congestion Control & Traffic Shaping

Question 50, GATE 2023: A TCP-like byte-stream protocol runs at 100 Mbps, RTT 150 ms, and maximum segment lifetime 2 minutes. Which sequence-number field lengths prevent reuse within a segment lifetime at full rate? A 30 bits; B 32; C 34; D 36.
Tap to enlarge
Select all that apply
Answer & solution

Official answer: B, C, D

At100Mbps a byte-stream consumes 100×10⁶/8=12.5×10⁶ sequence numbers per second. During the 120-second maximum segment lifetime it can send 1.5×10⁹ bytes. The sequence space must exceed that count to avoid wraparound while old data can still exist. Since2³⁰≈1.074×10⁹ is too small and 2³¹≈2.147×10⁹ is sufficient, the listed 32-, 34-, 36-bit fields work, but 30 bits does not. Thus B, C, D. RTT affects window sizing, not this lifetime wraparound bound.

Teaching detail. Sequence numbers label bytes, not bits or whole packets, so the conversion from 100 megabits/second to bytes/second is essential. For b bits, wrap time is 2b/(12.5×106) seconds; it must exceed 120 seconds in the intended model. A 30-bit space wraps in about 85.9 seconds, whereas 32 bits lasts about 343.6 seconds. The mathematical minimum is 31 bits, which is absent from the offered choices; that does not make 32 the sole valid answer, because larger listed fields also work.

Original paper, page 53 · Answer key

2 marks · NAT
Report issue

Transport, Congestion Control & Traffic Shaping

Question 60, GATE 2022: TCP sends over 1 Gbps with maximum segment lifetime 60 seconds. What minimum sequence-number bit width avoids wrapping during that lifetime?
Tap to enlarge
Answer & solution

Official answer: 33

TCP sequence numbers identify bytes. At 109 bits per second, the stream uses 109/8=125000000 sequence numbers per second and 7500000000 in 60 seconds. A nonwrapping sequence space must accommodate that many distinct bytes during the MSL. Since 232=4294967296 is too small but 233=8589934592 is enough, 33 bits are required.

The bound is 2b≥rate_in_bytes_per_second×MSL. Taking a ceiling gives b=ceil(log2(7.5×109))=33. Counting bits rather than bytes would give the wrong sequence-space requirement because TCP increments sequence numbers per payload byte.

Original paper, page 39 · Answer key

2 marks · MSQ
Report issue

Transport, Congestion Control & Traffic Shaping

Question 44, GATE 2021: A TCP server listens on port P of host S and has an active client connection. S crashes and reboots. The client uses no TCP keepalive timer. Select possible behaviors: A a client waiting for a packet may wait indefinitely; B the restarted server can listen again on P; C a client packet after reboot receives RST; D a client packet after reboot receives FIN.
Tap to enlarge
Select all that apply
Answer & solution

Official answer: A; B; C

A passive client with no keepalive, no pending retransmission and no application timeout can wait indefinitely after a silent server crash, so A is possible. After reboot the server can bind and listen on the same port again, so B is possible. The old established connection state is gone; a segment from that old connection can elicit a reset, not an orderly FIN, giving C rather than D. This is the standard reachable-server TCP response model; actual delivery can still be affected by packet loss or filtering, and a listening socket does not restore the lost connection.

A crash does not perform an orderly TCP close, so no reliable FIN is sent merely because the old connection disappeared. After reboot the endpoint has no matching established-connection state. A valid arriving old-connection segment is therefore rejected/reset in the standard reachable-host model rather than resuming that connection. Waiting indefinitely is a possibility, not a promise: an application timeout, retransmission timeout, keepalive, or network error could instead terminate a particular client's wait.

Original paper, page 36 · Answer key

1 mark · MCQ
Report issue

Transport, Congestion Control & Traffic Shaping

Question 7, GATE 2021: TCP hosts P,Q choose initial sequence numbers X,Y. P sends SYN=1,SEQ=X,ACK=0; Q accepts. Select Q's response (SYN,SEQ,ACK,ACKnumber,FIN): A (1,X+1,0,Y,0); B (0,X+1,0,Y,1); C (1,Y,1,X+1,0); D (1,Y,1,X,0).
Tap to enlarge
Your answer
Answer & solution

Official answer: C

Q sends SYN+ACK using its own initial sequence Y and acknowledging X+1 because SYN consumes one sequence number. Thus SYN=1, SEQ=Y, ACK=1, ACKnumber=X+1, FIN=0, C; sequence arithmetic is modulo 2³².

TCP sequence spaces are independent in the two directions. Q must announce Y, not X+1, as its own sequence number. The acknowledgment X+1 says that P's SYN was consumed and the next expected sequence is X+1. FIN is zero because the response establishes rather than closes the connection.

Original paper, page 58 · Answer key

2 marks · NAT
Report issue

Transport, Congestion Control & Traffic Shaping

Question 55, GATE 2020: TCP is established at t=0, RTT=6 ms, receiver advertised window=50 KB, client slow-start threshold=32 KB, MSS=2 KB, no errors or timeouts. Find congestion window after all ACKs at t=60 ms. Initial cwnd and ACK growth convention are not stated; give the intended classic-model answer with that caveat.
Tap to enlarge
Answer & solution

Official answer: 44

Our answer: 44 under classic one-MSS initial window

Worked explanation

There are 60/6=10 completed RTT rounds. In the intended one-MSS initial model the window in MSS after rounds 0…10 is 1,2,4,8,16,17,18,19,20,21,22. Multiply by 2 KB to get 2,4,8,16,32,34,36,38,40,42,44 KB at times 0,6,…,60 ms. The threshold 32 KB is reached after round 4, leaving six additive-increase rounds, not ten. The advertised receiver window limits allowed outstanding data to min(cwnd,rwnd), but here 44<50, so it does not bind. This table is conditional on the classic RTT-based growth and stated initial-window assumption; it is not a claim that all compliant TCP implementations must start at 2 KB.

Derivation and answer

In the classic round-based model, start cwnd at one MSS=2KB when t=0. After RTTs at 6, 12, 18, 24ms, slow start gives 4, 8, 16, 32KB. Then congestion avoidance adds one MSS=2KB per RTT; the next six acknowledgments rounds through 60ms give 34, 36, 38, 40, 42, 44KB. The50KB receiver window does not bind. Thus official 44KB follows. The initial congestion window and ACK growth convention are not explicitly specified; modern larger initial windows or different ACK accounting can change the result. Retain44 as the intended historical model, not a universal TCP outcome.

Original paper, page 16 · Answer key

1 mark · MCQ
Report issue

TCP slow start per ACK and per RTT

Transport, Congestion Control & Traffic Shaping

Question 14, GATE 2018: During textbook slow start consider: i cwnd increases by 2 MSS per ACK; ii doubles per ACK; iii increases by 1 MSS per RTT; iv approximately doubles per RTT. Choose A ii,iii; B i,iii; C iv only; D i,iv.
Tap to enlarge
Your answer
Answer & solution

Official answer: C

Method

Suppose cwnd is w MSS at the start of a round, so approximately w full segments are sent. Each successful ACK adds roughly one MSS, and the w acknowledgments add w MSS in total. The next round therefore starts near 2w MSS. This is exponential growth by rounds, not by individual ACKs. A one-MSS increase per RTT describes the rough congestion-avoidance behavior instead of slow start.

Solution

In textbook slow start, each ACK increases cwnd by approximately one MSS. With one ACK per segment in a full window, one RTT supplies about cwnd/MSS ACKs, approximately doubling the window. Only iv is true, C. Delayed ACKs and implementation details qualify the approximate doubling.

Original paper, page 8 · Answer key

1 mark · NAT
Report issue

TCP sequence-number wrap time

Transport, Congestion Control & Traffic Shaping

Question 25, GATE 2018: A long-lived TCP connection sends at 10^9 bits/s and starts at sequence number 1234. Find the minimum time in seconds before that number can recur, rounded to an integer.
Tap to enlarge
Answer & solution

Official answer: 34 to 35

Our answer: 34 seconds

Method

A TCP sequence number labels a byte, so a full modulo-2^32 cycle consumes 4294967296 bytes, or 34359738368 bits. Divide by the bit rate, maintaining consistent units. The initial value 1234 affects which label comes first, but not how many increments return to it. This is a sequence-space throughput calculation; it does not independently establish that reusing the number is safe from delayed old packets.

Solution

TCP sequence numbers count bytes modulo 232. At109 bits/s, consuming the full sequence space requires 232·8/109≈34.359738 seconds, rounded 34. The starting number 1234 only shifts the cycle and does not change its length.

Original paper, page 10 · Answer key

1 mark · MCQ
Report issue

Transport, Congestion Control & Traffic Shaping

Question 14, GATE 2017: After TCP data transfer, a client calls close, sends FIN, and receives the server’s ACK. In which RFC793 state does the client now wait for the server FIN? A LAST-ACK; B TIME-WAIT; C FIN-WAIT-1; D FIN-WAIT-2.
Tap to enlarge
Your answer
Answer & solution

Official answer: D

1. The client is the active closer because it sends FIN first. Sending FIN moves it from ESTABLISHED into FIN-WAIT-1.

2. The ACK acknowledges that outgoing FIN. The client has finished its own send direction but the server has not yet sent its FIN, so it enters FIN-WAIT-2.

3. Receiving the peer FIN and acknowledging it leads to TIME-WAIT. LAST-ACK belongs to the passive closer awaiting acknowledgment of its own FIN. Therefore D.

Original paper, page 8 · Answer key

1 mark · MCQ
Not in GATE 2027 syllabusReport issue

Transport, Congestion Control & Traffic Shaping

Question 18, GATE 2017: On Linux, a connected UDP socket is one on which connect has been called. Assess I:A connected UDP socket can communicate with multiple peers simultaneously. II:A process can successfully call connect again on an already connected UDP socket. A:I only. B:II only. C:both. D:neither.
Tap to enlarge
Your answer
Answer & solution

Official answer: B

Our answer: B under single bidirectional peer interpretation

1. UDP connect does not establish a TCP-like reliable connection. It associates a default destination with the socket and ordinarily restricts incoming datagrams to that peer, allowing send/write calls without specifying an address.

2. Another connect call can change the peer association, so II is true. Under the exam's interpretation of communicate as simultaneous default, bidirectional peer associations, I is false and the intended answer is B.

3. Preserve the Linux API caveat: a connected UDP socket may still send a datagram to another destination explicitly supplied to sendto/sendmsg. Thus it is inaccurate to say that a connected UDP socket can never send to multiple peers. The unique B answer relies on the bidirectional/default-peer interpretation.

Original paper, page 7 · Answer key

2 marks · NAT
Not in GATE 2027 syllabusReport issue

Transport, Congestion Control & Traffic Shaping

Question 54, GATE 2016: A token bucket is full with capacity 1 MB. Tokens arrive at 10 MB/s and the maximum output link rate is 20 MB/s. Find the minimum time to send 12 MB in the fluid token-bucket model.
Tap to enlarge
Answer & solution

Official answer: 1.1 : 1.1

Our answer: 1.1

Token conservation imposes transmitted data≤1+10t megabytes, so sending 12 MB needs t≥1.1s. The output-rate bound additionally gives t≥12/20=0.6s. Attain 1.1s by sending at 20 MB/s for 0.1s, consuming the initial 1 MB net token reserve while transmitting 2 MB, then at 10 MB/s for 1s for the remaining 10 MB. This is the standard fluid token-bucket model, with no additional packet-granularity overhead.

A full bucket permits an initial burst above the sustained token rate. While transmitting at 20 MB/s, tokens are consumed net at 20−10=10 MB/s, so the initial 1 MB reserve lasts 0.1s. During that interval 2 MB are sent, not 1 MB, because new tokens keep arriving. The remaining 10 MB then require 1s at the sustained 10 MB/s rate. The token conservation lower bound proves no alternative schedule can beat this 1.1s construction.

Original paper, page 20 · Answer key

1 mark · MCQ
Report issue

Transport, Congestion Control & Traffic Shaping

Question 23, GATE 2015: Two hosts transfer a large file over TCP. Which claims are false? I a segment numbered m is always followed by m+1; II estimated RTT t implies retransmission timeout≥t; III advertised window size never changes; IV unacknowledged bytes are always≤advertised window. A III only; B I and III; C I and IV; D II and IV.
Tap to enlarge
Your answer
Answer & solution

Official answer: B

Our answer: B under nonshrinking-window textbook model

A segment carrying L data bytes advances the data sequence number by L, not by one, so a 1000-byte segment beginning at m normally leads to m+1000. The receive window tracks available receiver buffer space and can change as data arrives and is consumed. The textbook RTO adds a delay-variation allowance to the smoothed RTT. The intended flow-control invariant yields B, but the absolute “always” in IV must retain the inherited window-shrink qualification: a new smaller advertisement does not retract bytes already in flight.

Solution: Sequence numbers count bytes, so I is false. RTO includes estimated RTT plus a nonnegative variability margin, making II true in the usual model. The receiver-advertised window varies, so III is false. With a nonshrinking receive-window right edge, outstanding data respects the advertised window, giving IV true and false statements I and III, official B. The word always in IV needs qualification: a receiver can shrink its window after data was sent, leaving more outstanding bytes than its new advertisement. TCP discourages shrinking but implementations must tolerate it. Therefore B assumes the simplified flow-control model.

Original paper, page 10 · Answer key

1 mark · MCQ
Report issue

Transport, Congestion Control & Traffic Shaping

Question 33, GATE 2015: Order UNIX listening-server calls: A listen, accept, bind, recv; B bind, listen, accept, recv; C bind, accept, listen, recv; D accept, listen, bind, recv.
Tap to enlarge
Your answer
Answer & solution

Official answer: B

A listening server binds its local address, listens for connections, accepts one, then receives on the accepted connected socket. Thus bind, listen, accept, recv, B.

Binding associates the socket with its local address/port. Listening converts it into a passive connection endpoint. Accept waits for and returns a connected socket for one client. Receive then reads data on that connected socket. Calling accept before listen or before binding a specified listening address does not implement the requested server sequence. The original listening socket and the accepted connection socket have different roles.

Original paper, page 37 · Answer key

2 marks · MCQ
Report issue

Transport, Congestion Control & Traffic Shaping

Question 38, GATE 2015: At TCP bandwidth 1048560 bits/s, find RTT threshold α(in nearest integer ms)above which the unscaled receive window limits full use, and largest scaled window β. Options combine α63 or 500 ms with β65535×2^14 or 65535×2^16 bytes; correct-labelled C pairs 500 with 2^14.
Tap to enlarge
Your answer
Answer & solution

Official answer: C

An unscaled window holds 65535 bytes=524280 bits. At1048560 bits/s this spans 0.5s=500 ms. The maximum scale shift is 14, giving 65535·214 bytes. Therefore C, for sustaining the stated bandwidth without receive-window limitation.

The 16-bit unscaled advertised receive window represents at most 65535 bytes. To sustain rate R over round-trip time T, the flight capacity must be at leastRT. Express the window as 524280 bits, then T=524280/1048560=.5 seconds. Larger RTT requires scaling for full bandwidth use. TCP’s maximum permitted scale shift is 14, not 16; therefore maximum represented window is 65535×214 bytes. The threshold is a receive-window capacity calculation, not a claim that congestion control always sends at that rate.

Original paper, page 39 · Answer key

1 mark · MCQ
Report issue

Transport, Congestion Control & Traffic Shaping

Question 19, GATE 2015: Consider: I. TCP connections are full duplex. II. TCP has no option for selective acknowledgment. III. TCP connections are message streams. Which are correct? (A) I only; (B) I and III; (C) II and III; (D) all three.
Tap to enlarge
Your answer
Answer & solution

Official answer: A

1. Full duplex means each endpoint can send while also receiving on the same connection. The TCP selective-acknowledgment option reports received data blocks beyond a gap, so statement II is false. Applications see an ordered byte stream: one send need not correspond to one receive, so statement III is false.

2. TCP is full-duplex, has a selective-acknowledgment option, and exposes a byte stream rather than preserving application-message boundaries. Therefore only I is correct, A.

Original paper, page 59 · Answer key

2 marks · NAT
Report issue

Transport, Congestion Control & Traffic Shaping

Question 27, GATE 2014: A TCP connection has congestion window 32 KB when a timeout occurs. RTT is 100 ms and maximum segment size is 2 KB. Under the usual slow-start/congestion-avoidance model, how long in milliseconds until the window returns to 32 KB?
Tap to enlarge
Answer & solution

Official answer: 1100 to 1300

Our answer: 1100 ms in the standard round model

Step through it (13 steps)

1. Method and setup. A timeout does not simply halve the congestion window and continue linearly: classic TCP resets the window to one segment while setting the slow-start threshold to half the previous window. Count exponential-growth rounds up to that threshold, then linear-growth rounds of one segment each.

2. Work through the result and its assumptions. After timeout, take ssthresh=16KB and cwnd=1MSS=2KB. Slow start doubles 2→4→8→16 in 3 RTTs. Congestion avoidance then adds one 2KB MSS each RTT, taking 8 more RTTs to 32KB. Thus11×100=1100ms, accepted by 1100 to 1300. This uses classic loss recovery, fixed RTT, no further loss, and the usual window-per-round accounting; implementation-specific ACK growth can alter timing.

Original paper, page 13 · Answer key

1 mark · MCQ
Report issue

Transport, Congestion Control & Traffic Shaping

Question 24, GATE 2014: Which socket API call changes an unconnected active TCP socket into a passive socket? A connect; B bind; C listen; D accept.
Tap to enlarge
Your answer
Answer & solution

Official answer: C

1. Set up the reasoning. A server first creates a socket and binds its local address, then marks it as a listener. The change of role occurs before an incoming connection is accepted.

2. Derive the result. listen marks a bound, unconnected TCP socket as passive, ready to receive incoming connection requests. accept then creates a connected socket for one accepted connection; bind sets a local address. Thus C.

3. Check the interpretation. connect initiates an outgoing connection; bind assigns a local endpoint; accept obtains a connected socket for an arriving client. listen is the call that establishes the passive listening role.

Original paper, page 34 · Answer key

1 mark · MCQ
Not in GATE 2027 syllabusReport issue

Application transport protocols

Transport, Congestion Control & Traffic Shaping

Question 12, GATE 2013: Choose conventional transport protocols for real-time multimedia, file transfer, DNS, email, respectively. A TCP/UDP/UDP/TCP; B UDP/TCP/TCP/UDP; C UDP/TCP/UDP/TCP; D TCP/UDP/TCP/UDP.
Tap to enlarge
Your answer
Answer & solution

Official answer: C

For the actual listed applications, real-time multimedia conventionally uses UDP to avoid retransmission delays; file transfer uses reliable TCP; DNS lookup commonly uses UDP; email transfer uses TCP. The order is UDP, TCP, UDP, TCP, C. DNS can also use TCP and multimedia can use other transports; this is the conventional application mapping, not an exclusive claim about every implementation.

The classification concerns conventional transports, not application-layer names. Multimedia often values timeliness over retransmitting late packets, favoring UDP. File transfer and email need reliable ordered delivery, favoring TCP. Ordinary DNS query/response fits UDP. Therefore the pattern is UDP, TCP, UDP, TCP. The DNS answer is not a claim that DNS never uses TCP: large responses, truncation fallback and zone transfers are familiar exceptions.

Original paper, page 3 · Answer key

1 mark · MCQ
Not in GATE 2027 syllabusReport issue

Transport protocol supporting email

Transport, Congestion Control & Traffic Shaping

Question 22, GATE 2012: Which of the following transport layer protocols is used to support electronic mail?
        (A) SMTP                (B) IP                   (C) TCP                  (D) UDP
Tap to enlarge
Your answer
Answer & solution

Official answer: C

SMTP carries electronic mail at the application layer but normally relies on TCP for reliable transport. The question explicitly asks for the transport-layer protocol, so TCP, C, is correct. IP is network-layer and SMTP itself is not transport-layer.

Check: The service needs ordered, reliable delivery rather than raw IP datagrams. TCP supplies these transport properties; SMTP supplies mail-transfer commands above it. Selecting SMTP would answer which mail application protocol is used, a different layer question.

Original paper, page 5 · Answer key

2 marks · MCQ
Report issue

TCP congestion window after timeout

Transport, Congestion Control & Traffic Shaping

Question 45, GATE 2012: Consider 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 the end of the tenth transmission.
        (A) 8 MSS                 (B) 14 MSS                  (C) 7 MSS               (D) 12 MSS
Tap to enlarge
Your answer
Answer & solution

Official answer: Marks to All

Our answer: No unique numerical answer asserted; conditional round models yield 8 MSS (A) or 7 MSS (C).

The official Code A key awards Marks to All; it does not supply a numerical answer or an official explanation. To expose the conventions needed, take transmissions as RTT-sized rounds: the initial windows are 2, 4, 8, 9, 10 MSS, so a timeout in round 5 sets a halved threshold of 5 MSS under the usual round model. If the post-timeout window resets to the stated slow-start value 2 and slow-start growth is capped at the threshold, rounds 6–10 end with windows 4, 5, 6, 7, 8 MSS (A). With a one-MSS timeout restart and the same threshold-capping convention, they end with 2, 4, 5, 6, 7 MSS (C). Literal doubling across the threshold gives still other round traces. ACK-level growth and whether the quoted window belongs to the beginning or end of a transmission also need a convention. These conditional examples explain why one should not present a uniquely established numerical result from this wording; they are not claimed as the exam authority’s reason for the award.

Check: The timeout point matters because halving acts on the current window, not the original threshold. With the stated round trace the current window is 10 MSS, giving a threshold of 5, after which the restart convention determines which option can follow.

Original paper, page 11 · Answer key

2 marks · MCQ
Report issue

Minimum sequence-number progression

Transport, Congestion Control & Traffic Shaping

Question 47, GATE 2009: TCP initial sequence numbers use the low 32 bits of a persistent time-of-day counter incremented once per millisecond. Maximum packet lifetime 64 s. The source asks the minimum permissible rate of sequence-number increase in a connection. Choices A 0.015/s; B 0.064/s; C 0.135/s; D 0.327/s. Connection duration is not specified; the listed-result derivation requires an explicit extra model.
Tap to enlarge
Your answer
Answer & solution

Answer: A (no official key was published)

Let S=232, clock rate C=1000/s, packet lifetime M=64 s, and a constant-rate connection start at time 0 with initial sequence number 0, so its sequence trajectory is q(t)=rt. For r<C, the next occurrence of this sequence value on the returning clock trajectory is at time (S+rt)/C. To let a packet sent at t expire before that clock reuse, require (S+rt)/C−t≥M, equivalently (C−r)t≤S−CM. Requiring this throughout a connection of duration D therefore gives r≥C−(S−CM)/D (with nonnegative rates understood). If the intended duration is one clock cycle, D=S/C, this becomes r≥C²M/S=1000²×64/232=0.0149011612/s, closest to A, 0.015/s. This is an exact conditional derivation under the stated constant-rate, returning-clock model. The question does not actually specify D: the tiny minimum is therefore conditional on the one-clock-cycle interpretation, not a universal minimum. In particular, every r<C eventually reaches the returning forbidden strip if the connection continues indefinitely. The original 1/M shortcut is unjustified and is not used. Conceptual reference: Tanenbaum, Computer Networks, 5th edition, Figure 6-10 (clock-based forbidden regions); https://csc-knu.github.io/sys-prog/books/Andrew%20S.%20Tanenbaum%20-%20Computer%20Networks.pdf .

Do not infer a universal rate from 64 seconds alone:1/64 is not derived from the supplied 32-bit clock. Under a constant-rate trajectory and a connection lasting exactly one clock wrap, substitution yields r≥1000²·64/2³²≈0.014901/s, nearest A. The baseline derives the time-to-reuse inequality and shows where that extra duration enters. For an indefinitely long connection, any rate below the clock slope eventually meets the returning forbidden region. Thus the numeric choice is conditional; absent the duration/model assumption, the prompt does not uniquely define that minimum.

Original paper, page 11

1 mark · MCQ
Report issue

Application data size passed to TCP

Transport, Congestion Control & Traffic Shaping

Question 14, GATE 2008: What is the maximum size of data the application layer can pass to TCP?

(A) Any size
(B) 2^16 bytes minus TCP-header size
(C) 2^16 bytes
(D) 1500 bytes
Tap to enlarge
Your answer
Answer & solution

Answer: A (no official key was published)

1. TCP offers applications an ordered byte stream, rather than one application-message-per-packet service.
2. TCP divides that stream into segments; IP and link-layer limits constrain individual packets/frames, not the total stream length.
3. Thus neither 1500 nor 216 bytes is a maximum application stream size. A is intended. Real API calls may still impose implementation-specific buffer limits.

Original paper, page 4

1 mark · MCQ
Report issue

Socket operation initiating TCP handshake

Transport, Congestion Control & Traffic Shaping

Question 17, GATE 2008: Which system call results in sending SYN packets?

(A) socket
(B) bind
(C) listen
(D) connect
Tap to enlarge
Your answer
Answer & solution

Answer: D (no official key was published)

1. socket creates a socket, bind assigns a local endpoint, and listen makes a TCP socket passive.
2. connect initiates the active TCP open, starting the three-way handshake by sending SYN.
3. The requested call is therefore D. This reasoning is specifically for TCP; UDP connect does not initiate a TCP handshake.

Original paper, page 4

2 marks · MCQ
Report issue

TCP slow-start congestion-window growth

Transport, Congestion Control & Traffic Shaping

Question 56, GATE 2008: During TCP slow start, how does the congestion-window size grow over successive round trips?

(A) Does not increase
(B) Linearly
(C) Quadratically
(D) Exponentially
Tap to enlarge
Your answer
Answer & solution

Answer: D (no official key was published)

1. The congestion window grows exponentially over successive round-trip times in slow start, option D. In the simplified textbook model each acknowledged segment increases the window by one MSS; a window of W segments produces about W acknowledgments in one RTT, so the window becomes approximately 2W.
2. After k such rounds it is approximately 2k times its initial value, until reaching a threshold or encountering loss. Growth is per ACK rather than continuous time; delayed ACKs and practical implementations affect the precise factor but not the intended exponential-versus-linear distinction.

Original paper, page 11

2 marks · MCQ
Not in GATE 2027 syllabusReport issue

Maximum token-bucket burst duration

Transport, Congestion Control & Traffic Shaping

Question 58, GATE 2008: A computer transmits on a 10-Mbit/s network through a token bucket replenished at 2 Mbit/s. Initially it holds its full capacity of 16 Mbits. How long can transmission continue at the full 10 Mbit/s?

(A) 1.6 seconds
(B) 2 seconds
(C) 5 seconds
(D) 8 seconds
Tap to enlarge
Your answer
Answer & solution

Answer: B (no official key was published)

1. At full output rate 10 Mbit/s, tokens are consumed at 10 Mbit/s while replenishment continues at 2 Mbit/s. The initially full 16-Mbit bucket therefore drains at a net rate of 8 Mbit/s.
2. Its maximum full-rate burst lasts 16/(10−2)=2 seconds, option B. Equivalently 10t≤16+2t gives t≤2.
3. Ignoring concurrent refill would incorrectly produce 1.6 seconds.

Original paper, page 11

2 marks · MCQ
Report issue

TCP connect before the server calls accept

Transport, Congestion Control & Traffic Shaping

Question 59, GATE 2008: A TCP server executes socket(), bind(), listen(), then is preempted before any accept(). A client executes socket() and connect() to it. Which event can occur in the intended normal setting?

(A) connect() returns successfully
(B) connect() blocks
(C) connect() returns an error
(D) connect() causes a core dump
Tap to enlarge
Your answer
Answer & solution

Answer: A (no official key was published)

1. The client connect() can return successfully, option A. After socket(), bind() and listen(), the server kernel has a listening TCP endpoint and can complete the three-way handshake while the server process is descheduled.
2. The resulting established connection waits in the listener’s accept queue; accept() subsequently removes an entry and returns a connected socket to the server process. Hence user-space accept() is not required for the client handshake to complete.
3. The intended setting assumes an available backlog slot and normal network operation; incidental loss, queue exhaustion or unrelated errors can of course affect real calls.

Original paper, page 11

1 mark · MCQ
Not in GATE 2027 syllabusReport issue

Application using UDP

Transport, Congestion Control & Traffic Shaping

Question 20, GATE 2007: Which listed protocol conventionally uses UDP as its transport protocol?
Options:
(A) HTTP
(B) Telnet
(C) DNS
(D) SMTP
Tap to enlarge
Your answer
Answer & solution

Answer: C (no official key was published)

1. Approach. Use the traditional protocol stack assumed by this 2007 paper. The common short DNS request/reply exchange uses UDP; distinguish this from claiming that DNS never uses TCP.

2. Derivation and interpretation. Traditional DNS queries commonly use UDP, while the listed historical HTTP, Telnet and SMTP mappings use TCP. Thus C. DNS can also use TCP, and later HTTP versions may use QUIC; the answer follows the era and conventional protocol mapping.

Original paper, page 4

1 mark · MCQ
Report issue

Routes for packets in a session

Transport, Congestion Control & Traffic Shaping

Question 23, GATE 2005: Packets in one session may take different routes under: A TCP only; B TCP and UDP; C UDP only; D neither.
Tap to enlarge
Your answer
Answer & solution

Answer: B (no official key was published)

Both TCP segments and UDP datagrams are carried by IP, whose routing decisions can vary over time or across paths. TCP’s connection and ordering guarantees do not reserve one network route. Thus packets may take different paths for both, B.

TCP and UDP are transport protocols carried by IP. IP forwarding can change routes between packets, independent of whether the transport maintains a connection. TCP reconstructs ordering and retransmits as needed; those guarantees do not reserve a physical path. UDP likewise imposes no route consistency. Therefore both may traverse different paths, B.

Original paper, page 3

1 mark · MCQ
Report issue

Essential transport-layer function

Transport, Congestion Control & Traffic Shaping

Question 28, GATE 2003: Which functionality must the transport protocol provide over and above network-layer service? A. Recovery from packet losses; B. Detection of duplicate packets; C. Correct-order packet delivery; D. End-to-end connectivity.
Question 28, GATE 2003: Which functionality must the transport protocol provide over and above network-layer service? A. Recovery from packet losses; B. Detection of duplicate packets; C. Correct-order packet delivery; D. End-to-end connectivity.
Tap to enlarge
Your answer
Answer & solution

Answer: D (no official key was published)

1. Network delivery addresses hosts; transport adds end-to-end communication between application endpoints, usually identified by ports. TCP implements the first three enhancements, whereas UDP provides transport service without promising any of them. Hence they cannot be universal requirements of the layer.

2. Transport supplies end-to-end process communication above network-layer host delivery, D. Reliability, duplicate suppression and in-order delivery are features of some transport protocols, notably TCP, but are not required of all: UDP does not guarantee them. End-to-end connectivity here means communication service, not necessarily a connection-oriented handshake.

Original paper, page 3