MainspringGuides › ping & traceroute
macOS Guide

ping and traceroute on Mac: Diagnose Network Issues

Updated July 2026 · 3 min read

When pages won't load, the useful question isn't "is the internet down" — it's where it's down. ping tells you whether a machine answers and how fast; traceroute shows every router between you and it. With those two commands you can usually name the failing layer in under a minute.

Test reachability with ping

# Send 5 pings and stop
ping -c 5 1.1.1.1

# Ping by name — this also exercises DNS
ping -c 5 apple.com

Each reply prints a time= value in milliseconds — the round trip from your Mac to that machine and back. Without -c, ping runs until you press Control–C. What to look for in the summary:

One caveat before you declare a site dead: ping uses ICMP, and some servers and firewalls deliberately ignore it while serving web traffic perfectly well. A single unresponsive target proves little — try a second one before concluding anything. On the flip side, a long-running ping is a great live Wi-Fi meter: leave ping 1.1.1.1 going while you walk around with your MacBook and watch the latency and loss rise in the dead spots.

Trace the path with traceroute

# Show every router hop between you and the destination
traceroute apple.com

Each numbered line is one router along the path, with three response times per hop. Hop 1 is your own router; the next few belong to your ISP; the rest are the wider internet. Two things trip people up when reading it:

Isolate the failing layer

The real diagnostic power is running ping against three targets in order:

  1. Ping your router. Find its address under System Settings → Wi-Fi → Details… → TCP/IP (usually something like 192.168.1.1). If this fails, the problem is your Wi-Fi or local network — the internet beyond it is irrelevant.
  2. Ping 1.1.1.1. If the router answers but a public IP doesn't, the problem sits with your modem or ISP.
  3. Ping apple.com. If IPs work but names fail with "cannot resolve", the network is fine and DNS is broken — flush the cache or change resolvers rather than rebooting the router.

That three-step ladder — local, internet, DNS — turns "the internet feels broken" into a specific, fixable diagnosis. If the results seem inconsistent, repeat the ladder on Ethernet or from a spot next to the router: intermittent Wi-Fi can make any single run misleading, and confirming a failure twice is what separates a real diagnosis from a coincidence.

Tune the rest of your Mac

While you're troubleshooting, Mainspring handles the tuning: it turns 90+ hidden macOS settings into labelled, reversible toggles — every change one click on, one click back off.

Try Mainspring free →

Signed & notarized by Apple · 1-day free trial · $29 once

If DNS turned out to be the culprit

Step 3 failing while steps 1 and 2 pass is the classic sign of a resolver problem. Before blaming your ISP's DNS forever, try changing your Mac's DNS servers to a public resolver like 1.1.1.1 or 8.8.8.8 — it's a two-minute change in System Settings and often fixes both reliability and speed.