0

I was reading an article about the topic and I came across this :"During connection establishment each party uses a Random number generator to create initial sequence number (ISN), which is usually different in each direction. We know that a TCP sequence number is 32 bit. So it has finite (from 0 to (232-1) = 4 Giga sequence numbers) and it means we will be able to send only 4GB of data with unique sequence number not more than that".

I do not see the correlation with ISN and being able to send only 4GB of data with unique sequence number. Also, how does this relate to the wrap around concept? I would appreciate a better explanation. Thanks in anticipation.

5
  • That is simply incorrect, so there really is no explanation for it. TCP handles rolling over the sequence number, and it can send any amount of data you want.
    – Ron Maupin
    Aug 5 '20 at 11:45
  • The article also mentioned about wrap around concept as the by-pass mechanism used. That's is, if the sequence numbers are consumed up in traffic, the sequence numbers which were used when available, can be reused. Is this correct? Aug 5 '20 at 11:48
  • 3
    That article sounds like crap, and if you want to learn about TCP, then go to the source: RFC 793, Transmission Control Protocol. There is a lot of myth and misinformation about such things, but the definition is found in the RFC.
    – Ron Maupin
    Aug 5 '20 at 11:51
  • 1
    Looks like the article is geeksforgeeks.org/wrap-around-concept-and-tcp-sequence-number ? Agree with Ron Maupin, that is incorrect about "we will be able to send only 4GB of data with unique sequence number" Aug 5 '20 at 11:58
  • The statement is factually correct. However, it's also complete nonsense; you'll never have 4GB of data in flight at a time.The sequence number only has to be unique for unacknowledged traffic.
    – Ricky
    Aug 5 '20 at 17:52
3

So it has finite (from 0 to (2^32-1) = 4 Giga sequence numbers) and it means we will be able to send only 4GB of data with unique sequence number not more than that.

That's incorrect. The sequence number is used to check and reorder (if necessary) the incoming TCP segments. In order to do so, the sequence number is required to be unique within the current transmission window. Sequence numbers outside the current transmission window cannot be valid, so they are ignored. When SEQ# exceeds 232-1 it's simply wrapped around to 0 (ie. more upper bits are simply ignored). (RFC 793: Since the space is finite, all arithmetic dealing with sequence numbers must be performed modulo 2^32.)

Since the maximum transmission window with the window scale option active is slightly less than 1 GiB, there can't ever be a problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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