Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

TCP sequence numbers - beginners question

Apologies for the beginners question.

TCP basics (known to me :) ) - TCP sequence number is increasing for each byte of data send.

I have learned that SYN packet (len=0, no data are being send) also increases the sequence number. Is there a reason for that? I googled around for a good explanation or RFC document, but I can't find anything.

FIN appears to be the same way (also causes sequence number to go up by 1 although no data are being carried by the packet).

The best information I could find is here:

== quote == Notice that the acknowledgement number has been increased by 1 although no payload data has yet been sent by the client. This is because the presence of the SYN or FIN flag in a received packet triggers an increase of 1 in the sequence. (This does not interfere with the accounting of payload data, because packets with the SYN or FIN flag set do not carry a payload.) == end of quote ==

Thank you, Aleksandr