Linux - MTR vs Traceroute vs Tracepath
| Feature | MTR | Traceroute | Tracepath |
|---|---|---|---|
| Combines ping + path | ✔ | ✖ | ✖ |
| Real-time, continuous updates | ✔ | ✖ | ✖ |
| Shows per-hop latency | ✔ | ✔ | ✔ |
| Shows per-hop packet loss | ✔ | Limited | Limited |
| Detects routing changes live | ✔ | ✖ | ✖ |
| Requires sudo | Sometimes | No | No |
| Protocol used | ICMP/UDP/TCP | UDP/ICMP | UDP |
| Best for troubleshooting | ⭐⭐⭐⭐⭐ | ⭐⭐⭐ | ⭐⭐ |
| Pre-installed on Linux | No | Yes | Yes |
1. What is Traceroute?
traceroute shows the path (hops) that packets take to reach a destination.
Key points:
-
Uses TTL-expired responses to map hops.
-
Good for basic routing problems.
-
Not real-time.
-
Doesn’t show per-hop packet loss accurately.
Example:
Best use:
-
See the route between two devices.
-
Identify which hop introduces delay.
2. What is Tracepath?
tracepath is a simpler, lightweight alternative to traceroute.
Key points:
-
Uses UDP only.
-
Doesn’t require sudo.
-
Shows MTU (maximum transmission unit) per hop.
-
Lesser detailed than traceroute.
Example:
Best use:
-
Quick hop mapping without installing tools.
-
Checking path MTU.
3. What is MTR?
mtr = My Traceroute
A powerful tool that combines:
-
Ping
-
Traceroute
-
Real-time monitoring
Key points:
-
Continuously updates path, latency, packet loss.
-
Detects dynamic routing changes (live).
-
Best tool for diagnosing real-world network issues.
Example:
Best use:
-
Troubleshoot packet loss.
-
Identify ISP issues.
-
Monitor link quality over time.
-
Provide detailed reports to tech support.
Detailed Comparison Table
| Functionality | MTR | Traceroute | Tracepath |
|---|---|---|---|
| Real-time analysis | ✔ | ✖ | ✖ |
| Packet loss detection | ✔ (very accurate) | ✖ | ✖ |
| Route discovery | ✔ | ✔ | ✔ |
| Detect route changes | ✔ | ✖ | ✖ |
| Install required | Yes | No | No |
| MTU discovery | Basic | No | ✔ |
| Best for server debugging | ✔ | ✖ | ✖ |
| Best for ISP/Internet issues | ✔ | ✔ | ✖ |
| Output | Live | One-time | One-time |
Which tool should you use? (Simple Guide)
If internet is slow → Use MTR
→ Shows packet loss, latency, bad hops.
If you want to see the path → Use traceroute
→ Quick routing summary.
If you want MTU info → Use tracepath
If ICMP is blocked → Use traceroute -T or mtr -T
→ Uses TCP SYN packets.
Summary (Easy to Remember)
-
Traceroute → Shows the path once
-
Tracepath → Lightweight; shows MTU
-
MTR → Best of both: real-time, packet loss, live route