I am trying to understand the RTO mechanism. I have read RFC 6298, but it does not specify when the first RTT measurement is made.
Consider the following packet exchange
- Client —–Syn—–> Server
- Client <—Syn+Ack— Server
- Client —Data+Ack–> Server
- Client <–Data+Ack— Server
For the client side, is the first RTT measured after receiving Syn+Ack (#2) or Data+Ack (#4)?
For the server side, is it measured after receiving Data+Ack (#3)?
Best Answer
RTT is measured when transmitting segments, so there must be data in the sent packet so SYN and SYNACK can't provide a measurement. The RFC says:
So since in your example the client sends the first data then yes #4 acks it and provides a RTT measurement. Equally the server RTT measurement is made when #4 is acknowledged, a packet that you haven't shown (#5 perhaps)
It's in the first TCP RFC, RFC 793, TRANSMISSION CONTROL PROTOCOL, Section 3.7 Data Communication says:
I haven't followed this through the updates so there may be better or more explicit references.