edited by
43,730 views
118 118 votes

Assume that the bandwidth for a $\text{TCP}$ connection  is $1048560$ bits/sec. Let $\alpha$ be the value of RTT in milliseconds (rounded off to the nearest integer) after which the $\text{TCP}$ window scale option is needed. Let $\beta$ be the maximum possible window size with window scale option. Then the values of $\alpha$ and $\beta$ are 

  1. $63$ milliseconds, $65535$ $\times $2$^{14}$
  2. $63$ milliseconds, $65535$ $\times $2$^{16}$
  3. $500$ milliseconds, $65535$ $\times $2$^{14}$
  4. $500$ milliseconds, $65535$ $\times $2$^{16}$

12 Answers

Best answer
151 151 votes

In TCP when the bandwidth-delay product increases beyond $64\;\textsf{K}$ receiver window scaling is needed. 

The bandwidth-delay product is the maximum amount of data on the network circuit at any time and is measured as RTT * Bandwidth. This is not the time for sending data rather just the time for sending data without acknowledgement. 

So, here, we have bandwidth delay product $= (1048560 / 8) B \ast \alpha  = 64\;\textsf{K}$

$\alpha = (64\;\textsf{K} \ast 8 ) / 1048560 = 0.5\;\text{s} = 500$ milliseconds. 


When window scaling happens, a $14$ bit shift count is used in $\text{TCP}$ header. So, the maximum possible window size gets increased from $2^{16}-1$ to $(2^{16}-1) \ast 2^{14}$ or from $65535$ to $65535 \ast 2^{14}$

http://en.wikipedia.org/wiki/TCP_window_scale_option

edited by
40 40 votes

The TCP window scale option is an option to increase the receiver window size allowed in Transmission Control Protocol above its former maximum value of 65,535 bytes.

65,535 bytes = 64KB = $2^{16}$ B

The scaling option allows us to increase the window size from 64KB to 1 GB!

 

  • When is scaling used?

When the bandwidth-delay product exceeds the value of 64K or $2^{16}$, we use scaling.
Bandwidth must be in bytes/sec and delay (RTT) must be in ms.

 

  • What happens when we scale?

Window size increases from 64KB to 1GB, ie, from $2^{16}$B to $2^{30}$B



 

Now, coming to the question:

Calculating α

131070 * RTT = $2^{16}$

=> 131070 * RTT = 65536

=> RTT = 500 ms

 

Calculating β

Window size would be increased from  $2^{16}$B to $2^{30}$B

i.e. from 65536 to 65536 * $2^{14}$B

 

Option C

edited by
27 27 votes

answer is C.
because TCP window scale option is needed when size increases more than 65535 B. it means alpha (RTT) should be the time taken to send 65535 B to the receiver. 

Time to send 65535 B = 65535 * 8/1048560 *1000 = 500 ms. 

so alpha will be 500.

maximum window size with window scale option is possible in TCP is 1073725440 B which is 65535*2^14 .

http://en.wikipedia.org/wiki/TCP_window_scale_option

10 10 votes

Lets talk about concept first..

Basically We are not utilizing the given bandwidth at its fullest. Sticking to the question, it causes due to the delay caused in sending the data.

(You can consider the example of satellite link , It causes much delay for acknowledgement to arrived after sending data equal to current window size)

One of the solution is we can consider upgrading window size that will pack the data , utilizing maximum of the given bandwidth.

The units we consider for data is in Bytes and delay in "ms"

Lets have a look at our Question.

Given,

B = (1048560/8) B/s

RTT ( alpha ) = X ms ( say)

Current ( default) window size, RWIN = 65535 B

( RWIN = Reciver window )

Using Bandwidth * Delay product ,

B * X = 65535 ,

X = 500 ms.

To use the given Bandwidth  to ita fullest , we can scale our window upto 1GB ( fixed standard)

i.e with scaling factor of 2^14 B

(i.e Shifting 14 bits to left )

So, scaled window size becomes,

65535 * 2^ 14.

(2^16 * 2^ 14 = 2^30 , i.e 1GB )

 

 

https://www.speedguide.net/faq/what-is-the-bandwidth-delay-product-185

 

https://networklessons.com/cisco/ccnp-route/bandwidth-delay-product/

8 8 votes

{Given:}

Bandwidth (BW):
    \[
    \text{BW} = 1048560 \, \text{bits/sec} = 2^{20} \, \text{bits/sec} = 2^{17} \, \text{bytes/sec} = 2^{17} \cdot 10^{-3} \, \text{bytes/msec}
    \]
     \( \alpha \): The value of RTT (Round Trip Time) in milliseconds after which the TCP Window Scaling option becomes necessary.
 

The TCP Window Scaling option is required when:
\[
n \cdot \text{Transmission Time} < \text{RTT}
\]
where \( n \cdot L \) represents the window size. Rewriting this condition:
\[
\frac{\text{Window Size}}{\text{BW}} < \text{RTT}
\]

{Without scaling:} The maximum TCP window size is \( 2^{16} - 1 \, \text{bytes} \). Therefore:
\[
\frac{2^{16} - 1}{2^{17} \cdot 10^{-3}} < \text{RTT}
\]

Simplifying:
\[
\text{RTT} > \frac{2^{16} - 1}{2^{17} \cdot 10^{-3}} = 499.99243 \, \text{msec}
\]

Rounding to the nearest decimal:
\[
\text{RTT} > 500 \, \text{msec}
\]

so after 500 msec we need scaling option

 

{With scaling:} The maximum window size after enabling window scaling is:
\[
\text{Max Window Size (with scaling)} ( \beta )= (2^{16} - 1) \cdot 2^{14}
\]
so the answer is option C

 

 

edited by
5 5 votes

The answer is (C). Now lets deconstruct this weirdly looking question........................
Firstly, calculating the value of $\beta$ (the maximum possible window size with window scale option) is straightforward 


As defined in the TCP header's Options field, the window scale shift count has a maximum limit of 14.
Therefore, the window size can be scaled up by a maximum factor of $2^{14}$.

We know from the TCP header that the maximum unscaled window size is $(2^{16} - 1) = 65535$ bytes.

Through the TCP Window Scale Option, this can be multiplied by a shift count. Since the maximum allowed shift count in the options field is 14, our maximum scaling factor is $2^{14}$.

Therefore, the absolute maximum window size($\beta$) becomes:

$$\text{Max Window} = 65535 \times 2^{14} \text{ bytes}$$


Now, coming to the $\alpha$, it's the value of RTT in milliseconds (rounded off to the nearest integer) after which the TCP window scale option is needed, it simply means that- 

"Which Threshold Value ($\alpha$)  ​​​the RTT should cross, After which we will be scaling up the window to achieve maximum efficiency"

See here we have Bandwidth = $1048560\text{ bps}$.

Before scaling up we need to reach max. window size, which is $(2^{16} - 1)\text{ bytes} = 65535\text{ Bytes}$.

Now, suppose we have this much amount of data inside our window, that we are about to transmitt.

$\therefore$ The $T_d$ (Transmission Time for the whole window)

        $(T_d)_w \Rightarrow \frac{8 \times 65535 \text{ bits}}{1048560 \text{ b/s}} \Rightarrow (0.5) \text{ sec.}$

  • $t = 0 \longrightarrow$ transmission started

  • $t = 0.5 \longrightarrow$ transmission complete

  • RTT is the time in which — (we send the packets + we receive ack for all)

Now, if we are completing our sending process by $0.5\text{s}$ and the $RTT \le 0.5\text{ sec.}$, it means till we send our last packet, we already have received some ack and now the window can slide and we can keep sending data

                                                                   [so the host is never idle in this case]


But But But - - -

if the [RTT > 0.5s] — here the sender has to wait for some time before receiving all acks -

Suppose, $RTT = 0.8\text{ s}$.

$\therefore$ user is finished sending all packets by $0.5\text{ s}$

but he will receive all acks (pending) by $0.8\text{ s}$.

$\therefore$ He will have to wait for $0.3\text{s}$ without sending any data

This is the idle time we are talking about and to encounter this we actually scale-up and send a larger window.


So  if $\alpha$ (the threshold value of this bottleneck RTT) = 0.5 s or 500 ms, this is where we are breakeven and we are not idle.
 

Now if RTT value goes beyond this $\alpha$ 
                      $\Downarrow$
Then after sending the whole window the host will surely become idle
                      $\Downarrow$
Then we will be needing the TCP window scale option 
                      $\Downarrow$
So that we can enlarge the window inorder to not let the host become idle
                      $\Downarrow$
This increases efficiency and maximizes our goal
 


Now, let's relate this to Bandwidth delay product [BDP] = $BW \times RTT$
{This is the max. amount of unacknowledged data that can be put on the link at a time$\longrightarrow$ and still have $100\%$ efficiency. (no idle time)

Now if, $RTT = 0.5\text{s}$

Bandwidth = 1048560 bps.

$BDP = \frac{1048560}{8} \text{ bytes/s} \times 0.5\text{s}$

$= \frac{1048560}{16} = 65535\text{ B}$

This means that if and only if the RTT = 0.5s. Then we can put $65535\text{ B}$ on the link

                                    $\downarrow$

So our window size becomes $65535\text{ B}$ and we get no idle time.


But, if $(RTT > 0.5)$ Then $(BDP > 65535\text{ B})$ Then,

we need a larger window size to reduce idle time

                       $\downarrow$

This we can achieve only by [scaling up].


so the conclusion here comes out to be:

$RTT > \alpha = 0.5\text{s}$ Then, you need to put more bytes on the link, increase the sender window size in order to compensate for that idle time where you would be waiting for ack.

Please put an upvote if you are satisfied by the answer 😀

Answer:
Position:
Show:

Related questions

42 42 votes
5 answers 5 answers
19.5k
19.5k views
go_editor asked Feb 12, 2015
19,507 views
In a triangle $PQR, PS$ is the angle bisector of $\angle QPR \text{ and } \angle QPS =60^\circ$. What is the length of $PS$ ?$\left(\dfrac{(q+r)} {qr}\right)$$\left(\dfra...
123 123 votes
8 answers 8 answers
40.6k
40.6k views
Kathleen asked Sep 22, 2014
40,559 views
While opening a $TCP$ connection, the initial sequence number is to be derived using a time-of-day (ToD) clock that keeps running even when the host is down. The low orde...
99 99 votes
12 answers 12 answers
43.7k
43.7k views
go_editor asked Feb 13, 2015
43,664 views
$\text{Host A}$ sends a $\text{UDP}$ datagram containing $8880\text{ bytes}$ of user data to $\text{host B}$ over an $\text{Ethernet LAN}.$ Ethernet frames may carry data...
52 52 votes
9 answers 9 answers
21.9k
21.9k views
go_editor asked Feb 12, 2015
21,880 views
Consider the following routing table at an IP router:$$\begin{array}{|l|l|l|} \hline \textbf {Network No} & \textbf {Net Mask} & \textbf{Next Hop} \\\hline \text {128.96...