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

  1. Client -----Syn-----> Server
  2. Client <---Syn+Ack--- Server
  3. Client ---Data+Ack--> Server
  4. 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)?

1 Answer 1


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:

(5.1) Every time a packet containing data is sent (including a retransmission), if the timer is not running, start it running...

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:

An Example Retransmission Timeout Procedure

Measure the elapsed time between sending a data octet with a particular sequence number and receiving an acknowledgment that covers that sequence number (segments sent do not have to match segments received). This measured elapsed time is the Round Trip Time (RTT). Next compute a Smoothed Round Trip Time (SRTT) as:

SRTT = ( ALPHA * SRTT ) + ((1-ALPHA) * RTT)

and based on this, compute the retransmission timeout (RTO) as:


where UBOUND is an upper bound on the timeout (e.g., 1 minute), LBOUND is a lower bound on the timeout (e.g., 1 second), ALPHA is a smoothing factor (e.g., .8 to .9), and BETA is a delay variance factor (e.g., 1.3 to 2.0).

I haven't followed this through the updates so there may be better or more explicit references.

  • thank you for your answer, but can you provide the reference saying that data must be contained in the segment in order for RTT measurement to be taken.
    – 314314314
    Commented Jul 27, 2016 at 9:11
  • Edited to show RFC793 quotation
    – marctxk
    Commented Jul 27, 2016 at 13:20
  • Thank you for the reference. Just one more thing I don't quite understand. Why SYN, SYN+ACK, and ACK of SYN packets are not used for measuring RTT?
    – 314314314
    Commented Jul 29, 2016 at 9:30
  • @314314314: I guess because if the SYN-ACK lost and server needs retransmit it, then the RTT will be wrong, and there is no way client can differentiate that. Commented Oct 5, 2018 at 15:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.