Mtr is a wonderful program that combines ping and traceroute. It shows you each hop along a path to another host on the internet, and how long each hop takes. It’s my #1 go-to tool to debug wifi / networking / DNS issues. And, it’s pretty!
Anyway it requires extra privileges, so it’s a bit fiddly to run. Even worse, The Internet Is Wrong on this topic, there’s lots of bad advice.
Here’s how to install and run mtr on a macOS machine:
brew install mtr
PATH=$PATH:/usr/local//Cellar/mtr/0.92/sbin sudo mtr 188.8.131.52
The “184.108.40.206” is a magic IP. Easy to remember, it’s a public DNS router that our friends at Google make available to the public. You can use any IP or domain name here. I use the all-8s IP, because sometimes my DNS isn’t working, so pinging a raw IP will tell me if my DNS is acting up, and if so, which one.
Here’s what it looks like:
If you press d, it switches displays to more visual. This lets the “bad actors” in the network jump out:
Since this is a terminal-based CLI program it’s easy to install and run on a server. Maybe your local network is good, but the server’s network or DNS is acting up — mtr will make issues really easy to see and fix!