retagged by
27,691 views
49 49 votes
Consider a $\textsf{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 $\text{KB}$) at time $t+60$ ms after all acknowledgements are processed is _______

7 Answers

Best answer
68 68 votes

In Case of AIMD(Additive Increase/ Multiplicative Decrease): -

  1. Start with given MSS (Min Sequence Size)
  2. Increase the window size in multiples of MSS till the slow start threshold occurs
  3. Once the threshold reached, increase the window size by 1 MSS till the timeout occurs
  4. Once the timeout occurs, reduce threshold to half of current window size and again start from given start MSS.

$t=0$

$1\ \textsf{MSS}= 2 \ KB$

$W_{\textsf{threshold}} = 32\ KB$

$| \rightarrow \text{denotes } 1$ $\textsf{RTT}$

$\small \underbrace{2\ \overset{+1 \textsf{ MSS}}{ |_{t+6}}\ 4\ \overset{+2\textsf{ MSS}}{ |_{t+12}}\ 8\ \overset{+4\textsf{ MSS}}{|_{t+18}}\ 16\  \overset{+8\textsf{ MSS}}{|_{t+24}}\  }_{\textsf{exponential increase}}32\ \underbrace{ \overset{+1\textsf{ MSS}}{|_{t+30}} \ 34\ \overset{+1\textsf{ MSS}}{|_{t+36}}\ 36\ \overset{+1\textsf{ MSS}}{|_{t+42}}\ 38\ \overset{+1\textsf{ MSS}}{|_{t+48}}\ 40\ \overset{+1\textsf{ MSS}}{|_{t+54}}\ 42 \ \overset{+1\textsf{ MSS}}{|_{t+60}}\ 44}_{\textsf{linear increase after theshold}}$

$\therefore$ The size of the congestion window(in KB) at time $t+60$ ms after all acknowledgments are processed is $44$ KB

edited by
40 40 votes

The state of congestion window changes as below

Note : As specified in question, there are no errors and timeouts

  • At $t : 1\textsf{ MSS}$
  • At $t+6 : 2\textsf{ MSS}$
  • At $t+12 : 4\textsf{ MSS}$
  • At $t+18 : 8\textsf{ MSS}$
  • At $t+24 : 16\textsf{ MSS}$

Now here since threshold value is reached, it is no longer in slow start phase and enters congestion avoidance phase

  • At $t+30 : 17 \textsf{ MSS}$
  • At $t+36 : 18 \textsf{ MSS}$
  • At $t+42 : 19 \textsf{ MSS}$
  • At $t+48 : 20 \textsf{ MSS}$
  • At $t+54 : 21 \textsf{ MSS}$
  • At $t+60 : 22 \textsf{ MSS}$

So at time $t+60,$ the congestion window size is $22 \textsf{ MSS}$ i.e., $44 \textsf{ KB}.$

edited by
20 20 votes

Answer is 44

Common Misconception

Initial ssThreshold = Receiver Window size / 2 = 50 KB / 2 = 25 KB 

this is wrong. inital threshold MUST be given in question (here 32 KB). after Timeout or 3 duplicate ACK, new ssThreshold will be current window / 2.


1 MSS = 2 KB

initial ssThreshold = 32 KB = 16 MSS

Receiver Window = 50 KB = 25 MSS

1 RTT = 6 ms


SLOW START PHASE

at t = 0, cwnd = 1 MSS
at t = 6, cwnd = 2 MSS
at t = 12, cwnd = 4 MSS
at t = 18, cwnd = 8 MSS
at t = 24, cwnd = 16 MSS

CONGESTION AVOIDANCE PHASE

at t = 30 , cwnd = 17 MSS
at t = 36 , cwnd = 18 MSS
at t = 42 , cwnd = 19 MSS
at t = 48 , cwnd = 20 MSS
at t = 54 , cwnd = 21 MSS
at t = 60 , cwnd = 22 MSS

hence, after t + 60 ms, congestion window size = 22 MSS = 44 KB.

 

 

 

 

edited by
1 1 vote

To the people having doubts whether the threshold will be 25 or 32

The congestion window (cwnd) is a sender-side limit on the amount of data the sender can transmit into the network before receiving an acknowledgment (ACK), while the receiver's advertised window (rwnd) is a receiver-side limit on the amount of outstanding data.  The minimum of cwnd and rwnd governs data transmission.  

Another state variable, the slow start threshold (ssthresh), is used to determine whether the slow start or congestion avoidance algorithm is used to control data transmission

So it clearly states that the minimum of the two thresholds will be taken if the slow start threshold is not given.

 

ref: https://datatracker.ietf.org/doc/html/rfc5681

Answer:
Position:
Show:

Related questions

59 59 votes
4 answers 4 answers
24.8k
24.8k views
Arjun asked Feb 12, 2020
24,814 views
Consider a double hashing scheme in which the primary hash function is $h_1(k)= k \text{ mod } 23$, and the secondary hash function is $h_2(k)=1+(k \text{ mod } 19)$. Ass...
15 15 votes
4 4 answers
3.0k
3.0k views
gatecse asked Feb 23
3,003 views
Consider 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 sl...
28 28 votes
4 4 answers
20.9k
20.9k views
Arjun asked Feb 16, 2024
20,947 views
Consider a $\text{TCP}$ connection operating at a point of time with the congestion window of size $12$ $\text{MSS}$ (Maximum Segment Size), when a timeout occurs due to ...
117 117 votes
13 answers 13 answers
55.9k
55.9k views
go_editor asked Sep 26, 2014
55,935 views
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 u...