Ping, traceroute and MTR: the difference
All three send test packets, but they answer different questions.
- Ping
- Sends echo requests to the host and measures the time until the reply. That shows whether the host answers and how stable the path is. It says nothing about the route.
- Traceroute
- Shows the routers on the way. Each packet gets a limited lifetime: the first may travel one hop, the second two, and so on. Every router lowers the lifetime by one. When it runs out, the router holding the packet reports back. That is how the route builds up hop by hop.
- MTR
- Combines both. It measures every hop over several rounds and shows loss and spread for each one. That makes it possible to pin loss that only happens now and then to a particular hop.
Traceroute and MTR only show the way out from the location to the target. The way back can run through other networks, and its time is part of every measured response time.