9.5k 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

edited | 9.5k views
0
Someone plz explain this
0
@arjun sir,pls explain this question
0
@arjun sir,can you pls explain this??why do we need to inc seq. no. by 1 each 64 sec??
+4

Sorry. No idea. I'm not getting the meaning of the last sentence of question.

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

This seems wrong because for "minimum" it should be "should increase" and not "can increase". The question was like this only on paper -

Don't know if marks were given to all or not as no answer keys were released in 2009.

0
ook.thankyou sir

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 Veteran (431k points)
edited by
0

Please explain the last part, I am not getting it.

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)

+3
Even though question is ambiguous answer is perfect
0

@Arjun Hi sir, i was just going through your answer and had a doubt regarding maximum increase  possible in data rate. As counter increments only after 1 ms( i.e a sequence no. cannot be generated unless 1ms is completed), it means the speed cannot be more than 1KB/s (1 sec->1000 seq no.) as counter increment in itself is a constraint.

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

by (277 points)
edited
0
In most places , answer is given as B
Can someone give some convincing explanation ?
0
what do you mean by increasing sequence numbers each 64 sec??and why are we increasing seq no every 64 sec?
0
each packet has a lifetime 64 sec.

So, after every 64 sec. next sequence will come

if at first sequence number is 1

After 64 sec sequence number will be 2
+7
@srestha,sequence numbers are not consumed per packet,they are consumed per byte.

so if a packets has suppose 100 bytes,then 100 sequnce no.s will be consumed out of total,not just one according to you..so if packet lifetime is 64 sec and packet size is 100 bytes then in that 64 sec,100 sequence nos will be finished and next packet will get seq no. after 100
+1
correct me if i am wrong
+1
@Akriti yes, you are correct. It is per byte.
+2
@srestha ,, that would be wrong I guess, if sequence numbers are generated depending on packet lifetime, that means bytes are transmitted on the same rate. So transmission rate is limited by packet lifetime value. which is wrong.
+6
"The maximum packet lifetime is given to be 64s." This line means after every 64 seconds next sequence number will come .

But  in reality Sequence number increase by per Byte and not per packet. , as this question said.

Now  here we have to go with question wording and according to this question option A seems correct choice .

sequence numbers incremented in every 64 seconds, so minimum permissible rate is 1/64=0.015 which is option A .
+1
@Bikram sir

Still not clear. Can you please explain a bit more?
+3

VS

To find the minimum permissible rate of sequence number, we need to consider the packet life time.

We need at least the rate such that it generate only one sequence number in packet life time i.e in 64 sec.

This line says "The maximum packet lifetime is given to be 64s." it means after every 64 seconds next sequence number will come .

So , the minimum rate is =1/64 = 0.015/sec.

0
@Bikram sir

Understood :) thanks a lot .
0
@Bikram  sir what is the meaning of the sentence " The clock counter increments once per milliseconds." ?
0

gari

" The clock counter increments once per milliseconds." ?

That means when then counter increments next possible sequence number is generated.

+4

Thanks @Bikram Sir....please tell me if i am correctly thinking or not ....

According to the counter ,it increments every ms...so for a lifetime 64s it will increment 64000 times...(because in 64 sec there are 64000 ms) and rather to increment these many times the minimum no of times it can increment is 1 time.

Hence by this method only 1 sequence no is generated in a packet lifetime .

so at minimum it can increment 1 time in 64 sec( is that the meaning of minimum permissible rate)

Hence 1/64s

Thanks .

+7

gari

the packet life time is 64 seconds.. and after this 64 seconds next sequence number is come. So that means in this 64 seconds  only 1  sequence number is generated .

Hence the minimum rate is =1/64 = 0.015/sec.

+1
Thanku so much sir :)
+2
@Bikram Sir,

Then what is the role of the statement "Clock counter increments once per millisecond" ?Is it to create confussion ?
+1
that statement means  when the counter increments next possible sequence number is generated.
+1
Yes that is true.But where are we using this information that clock generates 1 sequence per millisecond .This is what it is saying?
+3

for a lifetime of 64s it will increment 64000 times...(because in 64 sec there are 64000 ms) and rather to increment these many times the minimum no of times it can increment is 1 time.

only 1 sequence no is generated in a packet lifetime .

packet life time is 64 seconds.. and after this 64 seconds next sequence number is come. So that means in this 64 seconds  only 1  sequence number is generated .

+1
So that is what i am saying that the statement that it increment once per millisecond is not useful? Because if we are assuming it increments once per 64 sec.
+1
yes, you can say that.
0
@bikram sir then why is the use of data they have given 32 bits of ToD clock to be used for initial sequencde numbers???
0
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?
0
@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

by Active (2.1k points)
0
I also think so. But I am confused a bit as answer on many websites is given 0.064/s without any convincing explanation. So can you discuss it please or site some reference so that we are sure about the chosen answer.

Thank You
0

No, I don't know any reference for that. But that's the first thing that comes to mind.
Yes, on most of the places it is 0.064 without explanation, that must be given in gate key I think.

0
0
Why is sequence number incremented once every 64seconds?
0
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.
by Active (2.4k points)
0
What is the meaning of Permissible rate?
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
by Boss (25.7k points)
reshown by
0
@papesh,

"sequence number used for a packets of a connection" does it mean that we are not talking about a single byte or single packet but packets of a connection in SWP. But for each byte of a packet withing 65 sec we have to increment seq number then why we are not considering this fact.OR we are just considering the seq number of packet.

for eg A connection of TCP sending two packets with 100 bytes in each packet and intial seq number of packet is 100.then

Packet 1(seq number from 100 to 199)

and packet 2(seq number from 200 to 299)

withing 64 sec these seq number will be live so after that for a new connection we have to assign new seq number for packets.If we increment before 64 sec then there is no problem still the new connection will get a seq number.BUT if we wait suppose for 70 sec then for establishing a new connection we have to wait for 6 more sec to get a seq number for our connection.

Is my understanding correct or I am missing something?
• 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.

by Loyal (6.6k points)