in Computer Networks retagged by
21,361 views
32 votes
32 votes
Consider a long-lived $\text{TCP}$ session with an end-to-end bandwidth of $1\; \text{Gbps}\; (=10^9$ bits-per-second$).$ The session starts with a sequence number of $1234$. The minimum time (in seconds, rounded to the closet integer) before this sequence number can be used again is _________.
in Computer Networks retagged by
by
21.4k views

18 Comments

I thik Gb written there
0
0
it was 34(nearest integer was asked.)
0
0
Ans is right it is 34
1
1
34 is the correct ans.
0
0

@Ashok it was Gbps

0
0
I answered it 4.(4.296)
0
0
answer could be anything 34 or 35
it says time "before" which it can be reused
0
0
How to calculate Wrap Around Time(after this much time sender can reuse the first sequence number i.e. 1234 here) in TCP.

Wrap Around Time = (Possible sequence no. in TCP)/ Given Bandwidth

Note: Bandwidth should be in Byte/Second, so convert if it's given in bits/second. This is because in TCP 1 Byte Conume 1 Sequence no.

WRAP AROUND TIME = (2^32 * 2^3)/10^9

                                       =  34.35 seconds

We can reuse Seq. No. 1234 after this much time. Closest answer would be 35 not 34, because if you reuse seq.no. 1234 after 34 second, in the worst case what can happen is (Assume initially seq.no. 1234 got delayed for 34 seconds) old seq. no. and new seq. no. may reach at receiver at the same time i.e.after 34 seconds so receiver can't identify uniquely (receiver will think, Is it old segment or new segment ?)

Hence 35 seconds should be the right answer.
33
33
@KULDEEP  you used a word "after" in your explanation, but in question it is "before".
0
0
edited by
Lets say we use integers only.

34s is the time before it..... after which this sequence number can be reused.
35s is the time before it.... after which this sequence number can be reused.

Which one is correct? You read again and say.
34s is the time before it, so that it can be used in 35th second.
1
1

Sir You are saying "34s is the time before it, so that it can be used in 35th second."

If 34 is the answer, then according to question I can also say "34s is the time before it, so that it can be used in 34.1 second." but as we already know at 34.1 second, we cant use it. So answer is 35. isnt it?

0
0
It can be reused in 35 or not? So 35 need not to be before it. 34  will be before it..
0
0
Conclusion:  The ans is 34-35 after it is challenged. Previously it was 34 only.
So friends, no need to worry about ambiguous questions.
just answer whatever you think is right, later you can challenge to prove your point right.
1
1
If every byte is numbered, then why are we multiplying 2^32 by 8? Shouldn’t we just take 2^32? Can someone please explain this?
1
1
That 8 (2^3) is part of conversion we are doing from bits to Bytes...It is done for bandwidth in this case
1
1
but we have extra 10 bits in options, so by that logic the answer should be 2^42*2^3*10^-9, correct me if am wrong..??

Kindly let all know what would be the default to take n this case if this question reappears..??
0
0
edited by
Total sequence numbers possible: $2^{32}$

Every byte is given a unique sequence number in TCP.

 

Consuming $2^{32}$ sequence numbers would take

$$\frac{2^{32}*8}{10^{9}}s$$

$$=> \frac{34359738368}{1000000000}$$

$$=> 34.36$$

$$=> 34$$
2
2
So, will this remain same for any sequence number and 10^9 bandwidth?
Also, if we are asked to find wrap around time and sequence number and bandwidth are given,
 

Is the formula as below?
WAT = (2^32 *8) /bandwidth

Kindly help!
0
0

6 Answers

46 votes
46 votes
Best answer

The question is asking to find the Wrap-around time

$T_{\text{minimum}}=T_{\text{wrap-around}} = \frac{2^{32}\ast 8}{10^9}=34.35\;\text{s}$

rounding to closest integer, we will get 34

Note: Answer has been Modified in the Final Answer Key from GATE officials and now it is in Range from $34$ to $35.$ 

edited by

4 Comments

Can anyone please explain in detail how to solve such tpe of question,i.e, without using any formula and arriving at the answer conceptually.
0
0
Did anyone challenge this answer key?
0
0
how can you guys say that 34 is the WAT? If WAT = 34.53 that means minimum it has to be 34.53. Anything less than that means sequence numbers will be used before the required time (life time of packet) which may lead to many issues. So, it can be 35 but not 34.
0
0
57 votes
57 votes

Since TCP is a byte stream protocol, every byte is numbered using a sequence number.

Every packet can loop around the internet for some period of time, which is the life time of the packet. Therefore, to ensure that there are no conflicting sequence numbers, we have to find out the Wrap Around Time of the sequence numbers after which the number is used again. 

Now this Wrap Around Time $T_{WAT}$ should be greater than LifeTime of the packet $T_{LT}$, i.e $T_{WAT} > T_{LT}$

We have $32$ bits for sequence number field in the TCP header.

Given Bandwidth = $10^9$ bps(bits per second)

$\therefore 10^9$ bits  can be sent out in  $1$ second

$\therefore 2^{32} * 8 $ bits  can be sent out in  $x$ seconds ($\because$ TCP is byte streamed)

$\therefore x = \frac{2^{32} * 8}{10^9} = 34.359 $ seconds

Since they have asked the closest integer, answer is $34$

P.S Initially I was convinced that answer should be $34$, however, if we consider the statement "The minimum time (in seconds, rounded to the closet integer) before this sequence number can be used again", then I might incline towards $35$, although official key says $34$.

4 Comments

The answer should be 35 as we need atleast 34.36s.
0
0
Nice Explanation!
0
0
But tell me one thing please,

2^32 Bytes cannot be stored at a time if Receiver window size is 16 bit. In question they didnot mention anything about either Option field also need to take into consideration or not.
0
0
9 votes
9 votes

Answer has been Modified in the Final Answer Key from GATE officials and now it is in Range from 34 to 35. 

http://gate.iitg.ac.in/?page_id=748

5 votes
5 votes
`remember tcp is byte(not bit) stream protocol

sequence number field of tcp header is 32bit, so only (2^32=4G) sequence number available so wrap time is after how much time we use same sequence number

bandwidth = 1Gbps = 10^9 / 8 Byte per second

10^9/8 sequence no. consume - 1 sec ( since bandwidth=10^9/8)

1 seq no. consume - 8 / 10^9 sec

2^32 seq no. consume - 2 ^ 32 * (8 / 10^9)  sec = 34.35  sec (approx 34 sec)
edited by

1 comment

Your answer is quite practical and provides a reasonable understanding of the concept.
0
0
Answer:

Related questions