3
votes

(Asking this question here because cs stack exhange has only 50 followers for Computer Networks tag and has no tag for TCP)

At a particular national level examination, for post-graduate university admissions in my country, the following question was asked:

"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 millisecond. The maximum packet lifetime is given to be 64s.

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

 (A) 0.015/s (B) 0.064/s (C) 0.135/s (D) 0.327/s"

The answer apparently is (B) 0.064/s

  • Normally, TCP maximum connection speed is governed by the packet lifetime. If you use 32 bits for the sequence number, then the numbers will get repeated after 2^32 counts, because of wrap around.
  • If you send a packet with number X, then after 2^32 bytes are sent, the number X will get reassigned to some other packet. When the second packet with number X enters the connection, the first one shouldn't be in the network (to avoid duplication). So sequence numbers should not be repeated before a packet lifetime.

That governs the maximum rate.

However, as asked in the problem, we need to find the minimum rate.

(btw, even if sequence numbers are changed once in every 64 seconds (1 seq no. in 64 seconds) , then the number of sequence values in 1 second = 1/64 = 0.015...which is option A, but that's not the correct answer either , apparently.)

My questions:

  1. What factor governs the minimum rate in general, or in this particular question?
  2. Why 0.064/s, as in what happens if sequence numbers change slower than that? How to solve this question to arrive at 0.064/s ?

I know it's more of a theoretical question, but it has been really nagging me for a long time.. Any help is highly appreciated. (including proof that this question and/or the answer is wrong. The only reason this question is worth pondering over, is that it was asked in an important and highly valued nationwide examination.)

1

1 Answers

0
votes

This is one of the trickiest question of CN I came across. In my opinion: First of all we should understand if the question is asking about the rate at which RISN(random initial sequence no) is incremented or sequence no for each byte ( NOTE: TCP is byte stream protocol). I think they are asking about increment rate for sequence no of each byte.

As we know, to use the same sequence no again for the same connection: Wrap Around Time > Life Time. or max_number_of_seq_no/bandwidth > LifeTime

From above formula we can say bandwidth is max rate at which sequence no is consumed.similary we can say: number_of_seq_no_available/available_bandwidth > LifeTime.

As we are asked about this available_bandwidth indirectly i.e. they are just asking min possible available_bandwidth only:

available_bandwidth < number_of_seq_no_available/lifetime (as we know lifetime is constant.)

available_bandwidth proportional to number_of_seq_no_available.

So min possible value of number_of_seq_no_available is 1 and max is 2^32

If they would have asked about maximum permissible rate then it means all the sequence no should be consumed in 64 sec, that way we can get max rate i.e. Bandwidth. so the ans would be 2^32/64(i.e. 64Mbps) But,

they asked about min permissible rate that means just 1 sequence no is consumed in 64 sec. so the ans would be 0.015/sec. This is what i think of question.

Happy Learning :)