A 20 ms DNS answer that took half a second

The DNS answer says RTT: 20000000. That's 20 milliseconds. So why did the lookup take more than half a second?

Our five-packet DNS capture has a small trap. The client asks for printer.packetlab.test at 0 ms. Nothing comes back, so it asks again at 500 ms. The answer arrives at 520 ms.

Netcap measures the response's RTT from the most recent transmission. Twenty milliseconds is correct for that interval. It isn't the whole wait.

Look beside the RTT

The answer also carries QueryTransmissions: 2. The repeated query has TransactionStatus: "retransmission". Together with the timestamps, those fields tell a fuller story.

For comparison, the same capture includes a lookup for updates.packetlab.test. That one gets an answer after 12 ms, with a single transmission.

This is a generated example, not a diagnosis of somebody's resolver. In your own traffic, a retry could have several explanations. The useful habit is to check the query history before deciding that a short RTT means everything was quick.

Download the capture and try the walkthrough. Open it in Netcap or Wireshark and count the queries before revealing the explanation.