• edited by
41,464 views
124 124 votes

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 order $32$ bits of the counter of the ToD clock is to be used for the initial sequence numbers. The clock counter increments once per milliseconds. The maximum packet lifetime is given to be $64$s.

Which one of the choices given below is closest to the minimum permissible rate at which sequence numbers used for packets of a connection can increase?

  1. $0.015$/s
  2. $0.064$/s
  3. $0.135$/s
  4. $0.327$/s

8 Answers

Best answer
76 76 votes

One of the very rare ambiguous question in GATE. It is ambiguous what the question asks for 

minimum permissible rate at which sequence numbers used for packets of a connection can increase

It is not meaningful to use "minimum" with "can increase" - should be either "maximum" with "can" or "minimum" with "should/must"

Now the second problem, 

rate at which sequence numbers used for packets of a connection

In TCP, once the Initial Sequence Number(ISN) is set, the increase in sequence number is determined by the data sent rate - for every 8 bits, it increases by $1.$ If the question is asking for this rate, then it is independent of the ISN and depends on the packet lifetime and number of possible sequence numbers. With $32$ bits we have $2^{32}$ sequence numbers possible and to avoid using the same sequence number while a packet with one is still alive, we should ensure no more than $2^{32}$ sequence numbers in a packet lifetime which is given as $64s$. So, maximum increase possible for sequence number will be $2^{32}$ in $64s$ which will be $2^{26} /s= 64M/s $ corresponding to a data rate of $64 \times 8 = 512 Mbps.$ This is not in the option.

Now the other possible meaning of the question is the rate at which the ISN of a packet can increase. This problem comes when a connection gets aborted and re-established (i.e., same IP and Port addresses at sender and receiver) very soon. In this case, receiver might get confused if it gets any sequence number which might have been used by the old connection. To, avoid this the new sequence number must be used only after all previous ones are dead. i.e., only after Maximum Life time of a packet which is $64s$. (Page 29, TCP Specification) This ensure that ISN can change only once in $64s$ giving the rate change as $1/64 = 0.015/s$ which is option A. (Even though, the ISN is changing only once, as per the question the new ISN is not old ISN +1 but old ISN + time passed in milliseconds)

Option A.

• edited by
35 35 votes

Answer is option (A) .

$3$ information present in the question.

  1. The low order $32$ $bits$ of the counter of the ToD clock is to be used for the initial sequence numbers - That means only $32$ $bits$ are used to represent a sequence number. So, we have$ 2^{32}$ different sequence number.
  2. The maximum packet lifetime is $64s$. So, by $1$ & $2$ we can calculate maximum data rate possible(bandwidth) to avoid the wraparound= $2^{32}/64= 2^{26}$ Bytes/sec.
  3. The clock counter increments once per milliseconds -That means when then counter increments next possible sequence number is generated.


Suppose we make a TCP connection by picking initial sequence number that is derived by clock.If the connection terminate after sending few bytes of data then to avoid the ambiguity of sequence number we don't reestablish the connection immediately because of counter increment happen after $1$ msec.

Suppose the sender sends $2^{24}$ Byte data.

Time required to send $2^{24}$ Bytes data is $2^{24}/2^{26} =250 $ ms. So, $2^{24}$ Bytes takes $2^{24}$ sequence number . ($2^{24} \times 1)$ ms required to increment the counter .

So, the permissible rate of sequence number used for packets is in 64 sec we use only sequence number .

So, $1/64= 0.015$ (approx) which is option A here.

• edited by
26 26 votes

A. Because sequence number is incremented once every 64 sec.

Rate = 1/64=0.015

16 16 votes
  • To answer this question. we should know a bit about TCP Sequence numbers.
  • Also, note that the question is worded extremely poorly. Packet is used, in place of Segment. And the last line of the question is criminally faulty.

How TCP ensures in-order delivery?

All the segments are given unique sequence numbers, through which the receiver can know the sequence of segments. The first TCP segment is given a random sequence number, sometimes called the Initial Sequence Number, or ISN.


Now, the sequence numbers of the next segments (after the first segment) depend on the ISN.

Suppose, ISN = 500. And each packet has 20 Bytes.

»Sequence number of second packet = 520

»Sequence number of third packet = 540

»Sequence number of fourth packet = 560... and so on.

Sequence number actually tells you the number of the first byte of the segment.


 

Now, coming to the question, it asks when can the ISN be changed? (Read the question thrice, first)

Given that, ISN depends on a ToD clock's last 32 bits. This clock increments every millisecond. So, we can change ISN every millisecond, ie,  $1/10^{-3}$ or 1000/second. 


This would be wrong because then, the sequence numbers would change abruptly.

Suppose, ISN = 500. And each packet has 20 Bytes.

»Sequence number of second packet = 784

»Sequence number of third packet = 116

»Sequence number of fourth packet = 9744... and so on.

How would the receiver know the sequence here? It can't.


 

We're given that a segment lasts 64 seconds maximum. So, for 64 seconds, whatever sequence numbers we're adding to our segments, need to depend on ISN.

After 64 seconds, the first packet expires, hence, the ISN expires and the sequence numbers of the following packet stop making sense. So, we need a new ISN now.

Hence, we can do it once every 64 seconds = 1/64 = Option A.


Using this, Sequence numbers would look like:

Suppose, ISN = 500. And each packet has 20 Bytes.

»Sequence number of second packet = 520

»Sequence number of third packet = 540

»Sequence number of fourth packet = 560.

New ISN = 800.

»Sequence number of fifth packet = 800

»Sequence number of sixth packet = 820

»Sequence number of seventh packet = 840... and so on. Which is fine.


 

Option A.

11 11 votes
To find the minimum permissible rate of sequence no, we need to consider the packet life time. We need at least the rate such that it generate only one sequence no in packet life time i.e in 64 sec.

So , the minimum rate is =1/64 = 0.015/sec.
6 6 votes
Here not any problem like ambiguity.

since if we increment 1 per 1ms and life time of packet is given 64s. But i think question is not asking in this scenario.TCP uses Sliding Window Protocol.

Here Minimum Permissible rate may be confusing but think like that if life time of packet is given 64s so this is max . Means if we increment seq.no per 64 sec is allowed but more than 64s should not be allowed. If we keep more than 64s for 1 sequence number we need to wait for next sequence without any reason.

so ans should be=1/64s = 0.015/s
• reshown by
Answer:
Position:
Show:

Related questions

123 123 votes
2 answers 2 answers
35.4k
35.4k views
Kathleen asked Sep 22, 2014
35,395 views
Let $R$ and $S$ be relational schemes such that $R=\{a,b,c\}$ and $S=\{c\}.$ Now consider the following queries on the database:$\pi_{R-S}(r) - \pi_{R-S} \left (\pi_{R-S}...
165 165 votes
9 answers 9 answers
74.5k
74.5k views
Sandeep Singh asked Feb 12, 2016
74,458 views
Consider the following proposed solution for the critical section problem. There are $n$ processes : $P_0....P_{n-1}$. In the code, function $\text{pmax}$ returns an inte...
119 119 votes
12 answers 12 answers
44.5k
44.5k views
go_editor asked Feb 12, 2015
44,471 views
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) afte...
144 144 votes
10 answers 10 answers
49.6k
49.6k views
go_editor asked Apr 23, 2016
49,551 views
Frames of $1000\text{ bits}$ are sent over a $10^6$ bps duplex link between two hosts. The propagation time is $25ms$. Frames are to be transmitted into this link to maxi...