5k views

Suppose that the maximum transmit window size for a TCP connection is $12000$ $\text{bytes}$. Each packet consists of $2000$ $\text{bytes}$. At some point in time, the connection is in slow-start phase with a current transmit window of $4000$ $\text{bytes}$. Subsequently, the transmitter receives two acknowledgments. Assume that no packets are lost and there are no time-outs. What is the maximum possible value of the current transmit window?

1. $4000$ $\text{bytes}$
2. $8000$ $\text{bytes}$
3. $10000$ $\text{bytes}$
4. $12000$ $\text{bytes}$
edited | 5k views
0
anyone ???
+5

So here actual window size=min(12000,4000)=4000B

A packet size is 2000B. So 2 packets can be sent in one window and these two acks are received.

So now according to slow start phase, the congestion window size doubles itself ie 2*4000B=8000B.
+4

yes, correct answer is 8000, because the size of window increases by one MSS each time an acknowledgement is received.

So, 4000 + 2000 + 2000 = 8000.

In slow-start phase, for each ACK, the sender increases the current transmit window by Maximum Segment Size (MSS). In the question it is given a packet consists of $2000$ bytes and that can be taken as MSS. So, after two ACKs, current transmit window
$= 4000 + 2000 + 2000$
$= 8000$

http://www.ece.virginia.edu/~mv/edu/ee136/Lectures/congestion-control/tcp-congestion-control.pdf

edited by
0
is this  correct solution
+1

@Arjun: Question says "maximum transmit window size for a TCP connection is 12000 bytes."

What is it ??

What is the difference b/w this so called "maximum transmit window" and what we call a "MSS".

please explain . its a bit puzzling.

Also, can we  take a packet size  to be ab  MSS or is it some standard !!

+9
maximum transmit window is the receiver window and sender can never transfer more than this. MSS is something that is fixed during the connection set up between sender and receiver and the packet size is the MSS.
0
After receiving 2 ack the current window size will also be decreased  by 2 segments right ??
+5
+70
Since recvWind = 12000B and Packet Size = 2000B which is MSS here.

So MSS = 2000B then recvWind = 6MSS and currentSenderWindow = 2MSS

Threshold = recvWind/2 = 3MSS which implies transmission is in Slow Start Phase.

After receiving first ACK: currentSenderWindow should increase exponentially to 4 MSS but since threshold = 3MSS, currentSenderWindow Size goes to threshold which is 3MSS

After receiving second ACK: Since now it is in Congestion avoidance phase sender window size increases lineraly which makes currentSenderWindow = 4MSS = 4 * 1MSS = 4 * 2000B  = 8000B
0
What abt the threshold limitation on the slow start phase @Arjun sir ?
0

@Arjun Can you please clarify why we are considering individual acknowledgements, instead of cumulative acknowledgments? It is given in the question that it is TCP protocol and TCP uses cumulative acknowledgemets or selective acknowledgement.

Using cummulative ack the answer comes out to be 12000

+1

@Nilesh
In slow start phase why did you assume the threshold to be equal to half of reciever window?
In the first slow start phase the only restriction is threshold<=rwnd
Your assumption will be the case only after the first time out where the cwnd = rwnd and  cwnd becomes 1 MSS and threshold becomes half of the reciever window...

0
So, a total of 4 ACKS are received  by the receiver ?
0
@Arjun:in slow start phase conjunction window size increase exponentially. Current window size is 4000 byte. Mean it has two packet. It become 4 packet on getting 1st ack and 8 on getting 2nd ack. Therefore size of conjuction window is 8*2000=16000 byte. But maximum transmit window size is 12000 byte.hence conjunction can't grow beyond transmit window. Therefore answer is 12000 byte. Is my approach correct?
0

"After receiving first ACK: currentSenderWindow should increase exponentially to 4 MSS"

I think this is wrong. In slow start phase after receiving a ACK , window sizes increases by 1 MSS and after each RTT window size doubles( Suppose current window size is X MSS. Total X number of ACK will come for X segments and each ACk will increase window size by 1 MSS , so total increment = X MSS, So, at the end of the RTT window size will be doubled (X+X=2X))

0
@Sourav,

" In slow start phase after receiving a ACK , window sizes increases by 1 MSS and after each RTT window size doubles" No, receiving an ACK refers 1 RTT at sender in which sender will increase the window size exponentially, But since threshold is 3 MSS it will go max up to 3 MSS and stops from there it grows linearly and once it got 2nd ACK it increases up to 4 MSS
0
After Window size of 4000, 2 acknowledgements has been received

So. after 4000 the window size will be 6000 and then 8000 and the acknowledgement is received till 8000, then the window size be 10000...?
+1

@Nilesh:-

How did you get : -Threshold = recvWind/2

I dont think we set threshold to any value in slow start .It is generally given.Now in case it is not given ,so how did you take it half the window?Can you given any reference to this point?

0
@Arjun Sir, @Bikram Sir,

Could you please check if the below explanation satisfies.

Slightly different opinion. The difference b/w slow increase and Additive increase. is such that-

Let's say at sender window(cwnd) is having x segments.(n1,n2,n3...nx). Mark this window as wi.

size of wi is x number of segments=n1+n2+n3.....+nx

In case of Slow increase , when the ack for n1 received by Sender after RTT, then cwnd=x+1. Then when ack received for n2, then cwnd=(x+1 MSS)+1MSS..and so on. So when the last ack such as ni would be received, then cwnd=((((x+1MSS)+1MSS)+1MSS)+1MSS)+1MSS....x times=x+x=2x.

When window wi starts it's transmission of it's frame, then it was x.  And when all the acks are received for window(wi), then cwnd becomes 2x.

However for additive increase(taking the same example) cwnd size doesn't increase after every ack . Instead of that when all the segments of window(wi) are sent and their acks are  received , such that the last ack nx is received , it confirms that all the segments of entire window(wi) are acked. Then cwnd= cwnd+1MSS.

In this case, the sshthresh= 12000/2=6000 bytes=3segments

1MSS=2000 bytes=1 segment

Present window size(cwnd)wi=4000 bytes=2 segments (name them as seg-p ,seg-q)

At the moment we are in slow start phase.

seg-p sent and it's ack received by sender. So cwnd= cwnd+1 MSS =2+1 segments= 3 segmemts. Now it has reached sshthresh.

So now additive increase starts and from wi , still seg-q is left. Send the seg-q and receive the ack for seg-q.

So all the segments for window (wi) are received. So cwnd=cwnd+1 MSS=3+1=4 segments=8000 bytes.
0
till the threshold value it increases exponentially.
0
This is most precise answer as in selected answer blindly 1 MSS is increased and in question it is slow start phase which are contradictory.
Packet size (MSS Maximum segment size)= 2000 B
Advertized window size (RWND)= 12000 B
Sender's Current window size (CWND)= 4000 B
CWND = 2 * MSS --- > This means that the sender can send upto 2 packets at this point and it did.
That is why it now recieves 2 Acks of those two packets sent
So it can now increase the CWND by 1 MSS for each packet acknowledged.
So Current Window Size = 4000 + 2* MSS = 8000 THis is the answer.

Now it can send upto 4 packets and if it receives 4 Acks for those packets sent then it will increment its window to 12000

This link will be of help !!!
+1
In slow start phase we double the CNWD with each acknowledgement unless there is a timeout or 3 Ack's and once these events occur the slowstart or AI phase starts respectively . So In the question ,

The it is saying slowstart phase so , we need to double the CNWD with each Ack until we reach a threshold which is 12000 in this case , so

4000*2 for 1st Ack and 8000 * 2 for next Ack  since the maximum threshold is 12000 at the end of slow start phase it will be 12,000 (which is asked in question) and hereafter for the next acknowledgements AI phase will start.

Please let me know If I am wrong .

Since recvWind = 12000B and Packet Size = 2000B (or MSS )

receiverWindow = 6 MSS and currentSenderWindow = 2MSS

Slow Start Threshold = receiverWindow/2 = 3 MSS (2 MSS < 3 MSS which implies transmission is in Slow Start Phase)

After receiving first ACK: currentSenderWindow should increase exponentially to 4 MSS but since threshold = 3 MSS, currentSenderWindow Size goes to threshold which is 3 MSS then
After receiving second ACK: Since now it is in Congestion avoidance phase sender window size increases linearly which makes currentSenderWindow = 4 MSS = 4 * 1 MSS = 4 * 2000 B  = 8000 B

Thanks to @Nilesh Agrawal ji.

0
So is it fact that the threshold is always set to half of the receiver window and not wait for it to timeout?

In slow start phase, window size increases exponentially upon receiving 1 ack till threshold and after that collision avoidance phase start where window size is increased 1 mss after every acknowledgement till max window is reached.

Slow start : 1,2 4 ,8... threshold

Collision avoidance: threshold+1, threshold +2.....Max window size

Threshold = max transit window size/2

In given question Max window size is 12000B and therefore

Threshold = 6000

So the sequence of transit will be

1st 2000

4th 8000

Here,

RWND = 12000 B

ssthresh = RWND (initially; Given there has been no timeout / packet loss )

Current CWND = 4000 B

1 MSS = 2000 B

If   cwnd <= ssthresh then
// Each time an Ack is received:
cwnd = cwnd + 1 MSS
else  cwnd >  ssthresh
//Each time an Ack is received:
cwnd = cwnd + MSS * [ MSS / cwnd ]
endif

CWND = 4000 + 2000 = 6000 (after first ACK )

CWND = 6000 + 2000 = 8000 (after second ACK)

ssthresh is not 6000 B but 12000 B, because no packets has yet been lost / timeout, thus ssthresh is unchanged.

REF:

edited

note 3 important things :

1) if cwnd<ssthresh the congestion avoidance phase will continue with each ack window size will be increased by1.

2) even if cwnd=sthresh congestion avoidance phase will continue with a ack window size will be increased by1.

3)if cwnd>ssthresh ccongestion avoidance phase will start i.e cwnd=cwnd+1/(floor(cwnd)) wth each ack.

www.ece.virginia.edu/~mv/edu/ee136/.../congestion.../tcp-congestion-control.pdf

In slow start phase we double the CNWD with each acknowledgement unless there is a timeout or 3 Ack's and once these events occur the slowstart or AI phase starts respectively . So In the question ,

The it is saying slowstart phase so , we need to double the CNWD with each Ack until we reach a threshold which is 12000 in this case , so

4000*2 for 1st Ack and 8000 * 2 for next Ack  since the maximum threshold is 12000 at the end of slow start phase it will be 12,000 (which is asked in question) and hereafter for the next acknowledgements AI phase will start.

Please let me know If I am wrong .

1
2