Slow Connection? Mac, Ping & Traceroute to the Rescue on Mac

Illustrative graphical representation of the network communication flow using traceroute. The orange nodes represent individual network hops (routers or servers) that the packet passes through on its way to the destination. The connecting lines between the nodes show the data transfer between points in the network. The gray servers in the background represent other network elements that are not part of a particular route.

I recently solved a problem with the connection to our servers located in Boston, USA. I needed to find out why I was getting high latency in some cases, so I tried traceroute and ping to discover where data was being lost along the way. In the end, I figured that others who are currently dealing with a similar situation might find similar instructions useful.

Proper diagnostics of your network connection will help you determine if the problem is at home, with your ISP, or at the remote server. On macOS, we can use traceroute, ping, and other commands to detail the path of your data.


1. What is traceroute and how to use it?

The output of the traceroute command on macOS pointing to the bestsafevpn.com server. Displays the network route of packets with individual hops and their latency in milliseconds. Some nodes are not responding, which is shown * * *. The last available hops show the connection through the Cogentco network and the destination server with IP address 153.92.2.45.
Traceroute to our website

What does traceroute do?

Traceroute tracks the path of packets from your device to the destination IP address or domain. It shows us all intermediate nodes (routers) in turn. This allows us to see exactly where latency or even a complete outage may be occurring.

How to run traceroute on macOS

Open Terminal and type:

traceroute 8.8.8.8

(Of course you can replace 8.8.8.8 with another IP or domain – I just used it for our servers in Boston.)

How to read traceroute output?

In the traceroute listing, you will see a list of hops (intermediate nodes) that your data passes through.

  • Each line shows the IP address of the router and the response time (in milliseconds).
  • * * * * indicates that the router has not responded. This does not necessarily indicate a problem, it may just block ICMP.
  • If the route ends and the server is unreachable, it is likely that the destination is blocking ICMP or there is another problem on the route.

Example output:

1  192.168.1.1 (192.168.1.1)  2.345 ms  3.412 ms  4.567 ms
2  10.0.0.1 (10.0.0.1)       8.213 ms  9.123 ms  9.890 ms
3  * * *
4  203.0.113.1 (203.0.113.1) 45.678 ms 46.789 ms 47.901 ms
5  8.8.8.8 (8.8.8.8)         98.765 ms 100.234 ms 102.345 ms

2. How to use ping on macOS

What does ping do?

The ping command is every admin’s sidekick. It sends small test packets over ICMP and measures how fast they get there and back again.

  • This will determine the availability of the server.
  • You will see the response time (latency).
  • You will detect any packet loss.

How to start ping on macOS

In the Terminal:

ping -c 10 8.8.8.8
  • -c 10 means that it sends 10 packets and exits.
  • Without the -c parameter, the ping will keep running until you interrupt it with Ctrl + C.

Other useful switches:

  • ping -i 0.5 example.com → Interval 0.5 seconds between packets.
  • ping -s 1024 example.com → Increases packet size.
  • ping -D example.com → Adds timestamps.

How to read ping output?

Typically you’ll see something like:

64 bytes from 8.8.8.8: icmp_seq=1 ttl=52 time=98.765 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=52 time=100.234 ms
  • icmp_seq is the packet number.
  • ttl is the number of “jumps” after which the packet would be dropped.
  • time is the response time in milliseconds.

If a Request timeout appears instead of a response, the server may be blocking ICMP or is completely unavailable.

What to do if ping doesn’t work?

  1. I’ll try opening another page or pinging another IP (like ping google.com).
  2. If nothing helps, there may be problems on the network, with the provider, or on the destination server.
  3. Sometimes a modem/router reset helps.
  4. For a more detailed analysis I’ll try traceroute or MTR.

3. How to use mtr for advanced analysis

What is mtr?

MTR (My Traceroute) is an improved version of traceroute – it combines traceroute and ping. It tracks not only the route, but also packet loss and latency.

Why use mtr?

  • It can display real-time statistics.
  • You can easily see which hops are experiencing failures.
  • It is indispensable if you have an unstable connection.

Installation on macOS

brew install mtr

If you don’t have Homebrew, install it:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

How to start mtr?

mtr 8.8.8.8

You will get an interactive table with information about all the hops.

How to read mtr output?

It will display:

  • HOST – the IP or domain of the hop.
  • Loss% – packet loss.
  • Last/Avg/Best/Wrst – last, average, best and worst response times.
  • StDev – deviation.

If there is a 100% loss on any hop, it may be because the router is not responding to ICMP.

Other switches

  • mtr -u 8.8.8.8 → Traceroute over UDP.
  • mtr -T 8.8.8.8 → Traceroute over TCP.

4. Other useful commands for network diagnostics

4.1 nslookup

Determines how the domain translates to IP:

nslookup google.com

4.2 dig

Detailed analysis of DNS records:

dig google.com

4.3 netstat

Displays active connections, ports, etc.:

netstat -an

4.4 ifconfig / ipconfig

Shows the IP address, network interface settings:

ifconfig

On macOS you can also use:

ipconfig getifaddr en0

4.5 arp

Displays a list of MAC addresses and their assigned IP addresses:

arp -a

4.6 route

To check the routing table:

netstat -rn

4.7 lsof

Which processes have active network connections:

lsof -i

5. What to do if I have connection problems?

  1. Try another site – if it’s not just a problem with the target server.
  2. Reboot the router/modem – always the first step.
  3. Verify IP address and gateway (ifconfig/ipconfig).
  4. Try mtr – detailed analysis where data is lost.
  5. Consider a VPN – sometimes regional restrictions or another provider will help.
  6. Contact the provider – if nothing helps, with traceroute/mtr dumps they are better at finding a solution.

6. How to perform traceroute over TCP instead of ICMP

If ICMP is blocked (output is just * * *), you can use TCP traceroute:

traceroute -T -p 80 google.com
  • -T – TCP instead of ICMP.
  • -p 80 – port 80 (HTTP), you can also use 443 (HTTPS).

When ICMP is blocked, this often helps to show if the path is pass-through.


7. How to monitor the network in the long term

If you suspect that the outages are irregular, longer measurements are useful:

watch -n 10 ping -c 5 google.com

Or log to a file:

ping -c 100 google.com > ping_log.txt

8. Summary

In a nutshell:

  • Traceroute: shows the way.
  • Ping: measures the response time.
  • MTR: combines both.
  • TCP traceroute: solution if ICMP is blocked.
  • Other commands: nslookup, dig, netstat, ifconfig, etc. will help in finding errors.

Personally, I most often reach for ping, traceroute and mtr. If that’s not enough, I add netstat and dig. This usually finds the bottleneck if the problem is with me, Boston, or somewhere in between.

I hope this overview will help you solve your internet problems faster and maybe even save you a few sleepless nights searching for mysterious packet loss! 🙂


Frequently asked questions

Why do I only see * on some hops ?

This usually means that the router is not responding to ICMP (or a specific traceroute protocol). This is not necessarily a problem; some networks simply block ICMP responses. However, if packets are lost or the destination address cannot be reached after this hop, it may be a network problem or a firewall block.

How do I know that the problem is not on my side, but with the provider or server?

If pinging to other addresses works and latency is normal, but for a particular server it is high or cannot be reached at all, the problem is probably outside your network (at the provider or directly at the remote server). MTR or traceroute will show you which hop specifically is showing high latency or loss.

Will TCP traceroute help me when ICMP standard traceroute fails?

Yes. Some firewalls block ICMP packets, so classic traceroute doesn’t work. The TCP traceroute uses a TCP connection on a specific port (e.g. 80 or 443), which often allows it to get further and show exactly where the communication is breaking down.

Previous Article

Where to Watch The Masters 2025: Channels, Players & More

Next Article

IPVanish VPN Review: In-Depth Tests and Ratings!