Troubleshooting Network Latency with MTR
MTR (My Traceroute) is a powerful tool that combines the functionality of `ping` and `traceroute` to diagnose network latency and packet loss.
Installing MTR
sudo apt install mtr -y
CopyRunning MTR
To test the connection from your server to another host (e.g., google.com), run:
mtr google.com
CopyTo test the connection from your local computer to your server, run `mtr YOUR_SERVER_IP` on your local machine.
Reading the Output
MTR will show you each "hop" (router) between the source and destination. Look for:
- High `Last`, `Avg`, or `Best` times: This indicates a slow hop.
- Packet Loss (`Loss%`): Any number greater than 0% indicates packets are being dropped at that hop, which can cause major issues.