18,855 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 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

ook.thankyou sir

In question they are asking minimum rate at which sequence number is used for packets not the rate at which initial sequence number is used.

Try attempting it like this:- sequence number used is equal to number of bytes sent. since we need minimum sequence number to be used, we have to consider minimum byte that can be sent over longest time or minimum bandwidth.

lets consider we are sending 1byte of data per segment (excluding header and other overhead since they are not consider while adding sequence number). now we need maximum time interval between sending next segment. that will be 64s let me explain :- If a segment reaches after 64sec it will discarded any way in that situation sender will keep on retransmitting same segment hence won’t ever need to used any new sequence number. since we know by seeing options that sender is using new sequence number it means that segment is reaching destination on time which is 64sec.

now we have both parameters minimum number of packet we can send and maximum time delay.

i.e. 1byte per 64sec , therefore sender should send only 1byte of data ( i.e. use only one sequence number)  per 64sec. so minimum rate at which sequence number is used = 1/64 => 0.015/s.

*NOTE:- In this question they have asked rate at which sequence number is used for packets. not the rate at which initial sequence is generated so info about clock is unnecessary.

edited by

…..…………….……………………...

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.

by

Yes, now it gets clear. They are asking for the rate at which initial sequence number of a packet can increase.

Thanks @Arjun Sir.

wow
@Arjun, I know this question is any way super weird but I want to ask: if the ISN can only increase once every 64 seconds does this mean we cannot initiate a new TCP connection during this time?

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

@bikram sir then why is the use of data they have given 32 bits of ToD clock to be used for initial sequencde numbers???
Can someone please help me, please? As far as I can understand, Max possible Bandwidth is 2^26 Bytes/sec. Since, TCP gives a sequence number to every byte, 2^26 sequence numbers are needed in a second. But the counter only generates 1000 sequence numbers in a second.

How is the counter generates only 1 sequence number in the packet lifetime of 64seconds. I mean if 1000 sequence numbers are generated in a second, wouldnt it be like 64000 sequence numbers in a packet lifetime?

Is ToD counter controlled by TCP? How is it that 2^24ms is needed to increment the counter when it is clearly stated that the counter gets incremented every 1 ms?
@gargi

I am understading that counter increments at every 1 ms. And as it increments it will produce a new sequence number. So in 64 seconds which is equal to 64000 ms there would 64000 sequence number.  I am getting confused. Can anyone clear this doubt?

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

Rate = 1/64=0.015

Why is sequence number incremented once every 64seconds?
It is incremented once 64 sec the only it will satisfy wrap around time condition if a seqence number is generated before 64 sec they map to same value since TCP used random intial sequence genarator
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.

### 1 comment

What is the meaning of Permissible rate?