Q & A on RTT - Round Trip Time

Q: What is RTT?

A: RTT is an acronym for Round Trip Time, it is a measure of the time it takes for a packet to travel from a computer, across a network to another computer, and back.

Q: How is RTT used in networking?

A: Transport protocols like TCP which expect an acknowledgment to arrive after data has been successfully received, keep an estimate of the current RTT on each connection. They use the RTT estimate to determine how long to wait for an acknowledgment before retransmitting.

Q: How is RTT computed?

A: The sending side records the clock when it transmits a packet, and then examines the clock again when an acknowledgment arrives. By subtracting the two values, it obtains a single estimate of the round trip time. It then combines that single estimate with previous estimates to get an average.

Q: Do TCP, UDP, or both compute RTT?

A: TCP does; UDP does not.

Q: What value does TCP use for the RTT when it sends the very first segment (i.e., the first SYN segment in the 3-way handshake to get the connection started)?

A: TCP chooses a very long timeout as an initial guess (it cannot have an accurate RTT estimate until it receives at least one acknowledgment).

Q: What is the transit time?

A: The time it takes to cross a network in one direction. The transit time can be estimated as:


	RTT/2

Q: If I want to send the time of day to another computer, either the sender or receiver should add the transit time to the time in the packet, correct?

A: Yes. On a LAN, the transmit time is small enough to be insignificant (a few milliseconds). The transit time across a wide area network can be tenths of seconds. So, the adjustment can be important.

Q: Can I get the RTT from TCP, divide it by 2, and use that?

A: No. The RTT is internal to TCP; there is no way for an application to get the value. Instead, you should do the same thing TCP does: arrange to exchange a few messages, compute your own estimate of the round trip time, then divide that by 2, and add it to the clock before sending the time.