in Computer Networks retagged by
2,826 views
4 votes
4 votes
Consider the data transfer using $\text{TCP}$ over a $1 \; \text{Gbps}$ link. Assuming that the maximum segment lifetime $\text{(MSL)}$ is set to $60 \; \text{seconds},$ the minimum number of bits required for the sequence number field of the $\text{TCP}$ header, to prevent the sequence number space from wrapping around during the $\text{MSL}$ is ________________.
in Computer Networks retagged by
by
2.8k views

1 comment

Just to avoid silly mistake in TCP every Byte has given a sequence number so Gbps need to convert in GBps
0
0

3 Answers

3 votes
3 votes
Best answer
33 bits.

As in 60 seconds , 60Gb of data will get transferred which in turn is about 7.5GB and can be represented in 33 bits
selected by

2 Comments

to prevent the sequence number space from wrapping around during the MSL is=$\ln (BW*sement lifetime)$

but carefully see bandwidth is given in bit per sec.

so first convert bandwidth into byte because we have to find no of bit required for (2KB IS 11bit )

that means the unit of (  bw*time is byte if find no bit)
0
0
edited ago by

($1$ Sequence Number $= 1$ Byte)

In $1$ sec you can transfer $→$ $1G\ bits = 2^{30}\ bits = 2^{27}\ Bytes = 2^{27}$ Sequence Numbers.

In $60$ sec you can transfer $→ 60*2^{27} Bytes = 60*2^{27}$ Sequence Numbers $\approx2^6*2^{27} = 2^{33}$ Sequence Numbers.

So you need $33\ bits$ for representing $2^{33}$ sequence numbers.

Note: The answer will be same if you assume $1G$ as $10^9$ .

1
1
10 votes
10 votes

Answer : 33 bits

Given Bandwidth = $1Gbps$, MSL = $60 sec$.

Now, in $1$ sec, amount of data consumed = $1Gb$

Hence. in $60 sec$, amount of data consumed = $60Gb$ $\implies$ $(60Gb/8)$ $\implies$ $7.5GB$

Therefore, to prevent the sequence number space from wrapping around during the MSL, we need $7.5GB$ of data which can be represented with:-

$\lceil log(7.5 * 2^{30}) \rceil$ $\implies$ $\lceil log(7.5) + log(2^{30}) \rceil$ $\implies$ $\lceil 2.9+30 \rceil$  $\implies$ $33 bits$ for the sequence number field.

----------------------------------------------------------------------------------------------------------------------------------------------------------------

The Answer will also be same if we use $1Gbps = 10^9bps$

Minimum no. of bits required in Sequence number field of the $\text{TCP}$ header to prevent the sequence number space from wrapping around during the $\text{MSL}$ is given by:-

$\lceil log(MSL*B_w) \rceil$ where $MSL$ (maximum segment lifetime) = $60 \; \text{seconds}$ [given]

and $B_w$ (Bandwidth in $Bps$) =  $10^9bps = 10^9/8 Bps$ [given]

Thus,

Min. no. of bits required= $\lceil log(60* 10^9/8) \rceil$

$=\lceil log(60*10^4) + log(10^5/8) \rceil$ [Breaking $10^9$ so that it becomes easy to use the scientific calculator in exam]

$=\lceil19.19460+  13.60964 \rceil$

$=\lceil 32.80424\rceil = 33bits$ for the sequence number field.

edited by

4 Comments

@Shubham Kumar Raj Sir, 

We re dealing with number of bits in sequence number data, so taking 2^30 is not wrong here.

1
1
Perfect !
1
1
good explanation
1
1
2 votes
2 votes
33 bits.

WAT = $2^{32}$/x (x is bandwidth which should be in Bytes/sec).
Value of x = $10^{9}$ bits/sec  = $10^{9}/8$  B/sec.

So, WAT = $2^{32} * 8 / 10^{9}$ =  34.35 sec.
And according to question the lifetime of TCP segment is set to 60sec.

It can easily be observed that : 2 * WAT ( 68.70 ) > TCP Lifetime ( 60 sec ).
For WAT already calculated using 32 bits and if we multiply it by 2 this will give 33 bits.

1 comment

why * by 2?
0
0
Answer:

Related questions