Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Maximum Sequence Number

Status
Not open for further replies.

Rami88

Technical User
Apr 12, 2013
2
TCP determines if a data segment is "old" or "new" by testing whether its sequence number is within 2**31 bytes of the left edge of the window, and if it is not, discarding the data as "old". To insure that new data is never mistakenly considered old and vice-versa, the left edge of the sender's window has to be at most 2**31 away from the right edge of the receiver's window.
Similarly with the sender's right edge and receiver's left edge. Since the right and left edges of either the sender's or receiver's window differ by the window size, and since the sender and receiver windows can be out of phase by at most the window size, the above constraints imply that 2 * the max window size must be less than 2**31, or

max window < 2**30

from RFC 1323.

My question is why 2**31 not 2**32 because the sequence number is 32-bit not 31-bit long?
 
If the sequence number is a signed integer, one bit is required for the sign (+ or -).

mmerlinn


Poor people do not hire employees. If you soak the rich, who are you going to work for?

"We've found by experience that people who are careless and sloppy writers are usually also careless and sloppy at thinking and coding. Answering questions for careless and sloppy thinkers is not rewarding." - Eric Raymond
 
mmerlinn thank you for your response but this is an RFC and not a program. It is definitely unsigned and starts at 0.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top