The other day a client was having issues reaching a couple of websites from within their office environment. Our good command line utility traceroute came to the rescue. I used to run this command back in the days when mainly using Windows. Luckily, we can run traceroute in macos terminal.
I had to brew another Peruvian coffee from Quillabamba before taking on this one.
Running traceroute is quite simple. Here is an example:
traceroute badsite.com traceroute to badone.com (220.127.116.11), 64 hops max, 52 byte packets 1 192.168.3.1 (192.168.3.1) 7.997 ms 5.438 ms 6.629 ms 2 18.104.22.168.lightower.net (22.214.171.124) 9.057 ms 7.249 ms 8.644 ms 3 126.96.36.199.lightower.net (188.8.131.52) 5.649 ms 8.158 ms 7.375 ms 4 ae10-nycmnyzrj93.lightower.net (184.108.40.206) 8.217 ms 16.325 ms 5.153 ms 5 et-0-0-22.edge2.newyork6.level3.net (220.127.116.11) 6.437 ms 8.161 ms 7.309 ms 6 18.104.22.168 (22.214.171.124) 6.324 ms 6.192 ms google-level3-newyorkcity6.level3.net (126.96.36.199) 8.562 ms 7 188.8.131.52 (184.108.40.206) 9.728 ms 220.127.116.11 (18.104.22.168) 9.944 ms 22.214.171.124 (126.96.36.199) 11.364 ms 8 188.8.131.52 (184.108.40.206) 7.779 ms 220.127.116.11 (18.104.22.168) 8.163 ms 22.214.171.124 (126.96.36.199) 7.757 ms 9 188.8.131.52.bc.googleusercontent.com (184.108.40.206) 7.223 ms 7.054 ms 7.531 ms
The results are divided into 3 sections:
- Number of hops: Indicates how many routers traceroute command was able to query. Usually the first one is your local router.
- Domain name: Show the URL and IP address of the router where your request passed by. This can vary by location. Sometimes it can even show an airport code.
- Round-Trip Times (RTT): This one is shown from the 3rd to 5th columns in the output. It tells in milliseconds the time it took to travel from origin to destination and then back again to origin. This one is also good to measure your network connection speed.
Running traceroute macos terminal is a nice and simple command utility to use. Hope this one is useful for anyone reading. Contact me if you have any questions.
See my inspirational T-Shirts and coffee mugs designs. I designed them all. Below are some examples. Let me know what you think.