0
$\begingroup$

Consider a long-lived TCP session with an end-to-end bandwidth of 1Gbps. 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 _________.

The solution given for above question was : [(2^32)*8]/(10^9) = 34.3597 sec

But what I think it should be : [(2^32)208]/(10^9) = 687.194 sec

I have multiplied it by 20 because minimum size of TCP packet is 20Bytes.

Please help me to clear the confusion which answer should be right and why. If there is another answer for the above question please let us know.

$\endgroup$
3
  • $\begingroup$ Looking at your question, you probably don't know what "The minimum time (in seconds, rounded to the closet integer) before this sequence number can be used again" is theoretically . $\endgroup$
    – Rinkesh P
    Commented Jul 8, 2022 at 11:26
  • $\begingroup$ Also its the TCP header which is minimum 20 bytes. $\endgroup$
    – Rinkesh P
    Commented Jul 8, 2022 at 11:27
  • $\begingroup$ @RinkeshP Thanks for your comment. I searched around a little and got "The sequence number is a counter used to keep track of every byte sent outward by a host. If a TCP packet contains 1400 bytes of data, then the sequence number will be increased by 1400 after the packet is transmitted." $\endgroup$ Commented Jul 8, 2022 at 14:48

1 Answer 1

0
$\begingroup$

I suggest you read up on how TCP works and why do we need the sequence number. It is just a matter of unit conversions once you understand it. But I'll try to explain it in simple terms.

A packet consists of bytes. In TCP every byte has a sequence number. What do we need it for? In short to avoid duplicates, indicate lost packets and have in-order delivery. Even shorter, it ensures reliability(partially). TCP uses a 32-bit sequence number, so you can have 2^32 distinct sequence numbers before you use a particular sequence number again. Now you know how many bytes you need to transmit in order to reuse a number. And you have the bandwidth given in bits/sec. Do you understand the calculation now?

basically time needed to transmit 2^32 bytes over 1Gbps bandwidth [(2^32)*8]/(10^9) = 34.3597 sec

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.