1
votes

Every byte (of data send via TCP) has it's own sequence number. This sequence number features in the TCP header (the sequence number field).

I read that this is separate from the sequence number used for the sliding window protocol. This makes me wonder:

Q: If the sequence number field in the TCP header does not contain the sequence number used for the sliding window protocol - where can the sliding window sequence number be found in the TCP header (or segment)?

1
I don't know where you got the idea that there is another separate sequence number for sliding window. There is only one sequence number (in each direction) in a TCP stream. - Celada

1 Answers

2
votes

The TCP sequence number is used by the protocol to signal the acknowledgement of data acknowledgement.

That is, the sender sends out data with a sequence number in the header of the last byte in the packet.

The receiver returns acknowledgements containing the sequence number of the last byte of data known to have been received. If the transmitter sees the receiver acking data "too long ago" it retransmits the data presumed to have been lost.

If in fact the receiver has received the data retransmitted it knows because of its own highest sequence number that this is so, and can drop part or all of the data received, and send an ack back with the correct sequence so the transmitter can continue.

I think your informant is incorrect BTW. The best book I know of for TCP internals is "TCP/IP Illustrated" by Wright & Stevens, which is well worth getting. See Vol 2 pp 807..812 for all the details...