this is the following question I have encountered in school.

There is a file of X bytes that needs to be transferred from Host A to Host B. The MSS is 10 bytes.

What is the maximum value of X such that the TCP sequence numbers are not exhausted? TCP sequence number field is 32 bits.

This is the answer I have been given:

MSS is irrelevant and the maximum value of X is 2 ^ (32).

My confusion:

I understand that in TCP, the sequence number represents the first byte in the segment. Since TCP sequence number is 32 bits, the range of sequence numbers is from 0 to 2^32 - 1.

This means the last sequence number, will have the first byte starting with 2^32 - 1. But if the last sequence contains 10 bytes as well, wouldn't it be 2^32 - 1 + 10 = 2^32 + 9 extra bytes, meaning it exceeds the size of 2^32. Could someone explain what I'm misunderstanding? Thank you!

  • Sorry, all certification, educational and homework questions are explicitly off-topic here, see the help center.
    – Zac67
    Sep 10 '21 at 14:25

TCP sequence numbers ... exhausted?
... the maximum value of X is 2 ^ (32).

The given answer makes no sense for me. TCP sequence numbers are not exhausted. They simply wrap around. There is no limit to the amount of data which can be send in a single TCP connection. Also, the initial sequence number is random, i.e. not 0 or 1.

  • I'm in a beginner's network class so I think there are two assumptions with this question: the initial sequence number starts from 0 and that there is no wrap around. Even with these 2 assumptions, I don't understand the given solution. Sep 10 '21 at 14:20
  • 1
    @user23534757: "there are two assumptions with this question" - given that the question is specifically about TCP both of these assumptions are wrong. It makes no sense to discuss the validity of answers which are based on wrong assumptions. You are basically trying to compare two wrong answers and ask which one is better. Sep 10 '21 at 14:27
  • 1
    Both assumptions are wrong, and imho it's a bad idea to teach using wrong assumptions (because they tend to stick). That's likely one reason for all certification, educational and homework questions being explicitly off-topic here.
    – Zac67
    Sep 10 '21 at 14:27

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