it says time "before" which it can be reused

The Gateway to Computer Science Excellence

First time here? Checkout the FAQ!

x

+5 votes

Consider a long-lived $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 ____

+6

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.

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.

+1

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.

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.

0

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?**

+19 votes

Best answer

+3

it is asking to round off the minimum time to closest integer

now, minimum time = 34.35, and rounding it to nearest integer we will get 34.

now, minimum time = 34.35, and rounding it to nearest integer we will get 34.

0

i think $35$ should be answer .Becuase $34$ is incorrect as on $34$sec , seq no is still below $1234$

0

Yeah it's asking for rounding off but 34 is not possible right for wrap around time so we have to choose 35

+2

I was confused between 34 and 35. Answered it 34. After discussion I was thinking 35 which seems conceptually correct. But again the word "Before" is giving me a hope that 34 is correct. :D

+7 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$.

- All categories
- General Aptitude 1.3k
- Engineering Mathematics 5.2k
- Digital Logic 2k
- Programming & DS 3.7k
- Algorithms 3.2k
- Theory of Computation 4k
- Compiler Design 1.6k
- Databases 3k
- CO & Architecture 2.6k
- Computer Networks 3k
- Non GATE 1k
- Others 1.3k
- Admissions 486
- Exam Queries 435
- Tier 1 Placement Questions 18
- Job Queries 56
- Projects 9

36,162 questions

43,620 answers

124,005 comments

42,880 users