Diagnosing IP Connectivity Issues with MTR
If certain IP addresses become unreachable—possibly due to misconfigured routers or routing issues—using the MTR tool is highly recommended to diagnose the problem accurately.
MTR combines ping and traceroute to provide a detailed overview of each network hop, including latency and packet loss statistics.
Recommended MTR command
Run the following command to trace the route to the problematic IP:
mtr -o "J MX LSR NA BW V" -wbc 25 xx.xx.xx.xx
Replace xx.xx.xx.xx
with the IP address you want to test.
This command performs 25 cycles and outputs detailed stats such as jitter, average latency, loss rate, and individual hop behavior.
Installing MTR (if not available)
If the mtr
command is not recognized, install it using the appropriate package manager for your Linux distribution:
- Debian / Ubuntu:
sudo apt install mtr
- CentOS / RHEL:
sudo yum install mtr
- AlmaLinux / Rocky Linux:
sudo dnf install mtr
- Arch Linux:
sudo pacman -S mtr
After installation, run the command above to begin network diagnostics.
Tip
Run the command from multiple networks (e.g., office network, home Wi-Fi, mobile hotspot) to determine whether the issue is provider-specific or routing-related.