|
Question : TCP Sequence Numbers Past 0xffffffff?
|
|
Hi Experts,
This question is directly related to the TCP protocol. I have had no luck discoving what happens to the next generated TCP sequence number that would be greater than 0xffffffff. Does it wrap back around starting from 0?
For example, say the current sequence number is 0xfffffffa and the next pack sent contains 10 Bytes of data, would the next sequence number then be 0x00000004? Or does the connection reset before this can occur?
When the reciever recieves a packet containing the RST flag, does it genereate new sequence numbers, or does the connection have to be reestablished via the 3 way handshake? If the three way handshake occurs does the application controlling the stream then have to resend all initial login data ect, or does the recieving application continue on as if the connection was never reset? Is the RST process transparent to the application?
I know this is a very complex question, but hopefully someone or multiple experts can produce the multiple answers needed to solve this question.
Thanks, Brandon
|
Answer : TCP Sequence Numbers Past 0xffffffff?
|
|
The sequence number is incremented by 1 for every byte sent. When you increment 0xffffffff by 1 you get 0x00000000.
That's all, there is no teardown or rebuild of the circuit, no syns are sent, no resets, the unsigned 32-bit long is simply incremented by 1.
There is no magic here :-)
So yes as per what you have said:
say the current sequence number is 0xfffffffa and the next pack sent contains 10 Bytes of data, the next sequence number will be 0x00000004.
-Rowan
|
|
|
|