My video calls stuttered every time something in the house was uploading. The speed test said 47 Mbps down, which looked fine and explained nothing.

A speed test gives you one number. It doesn't say whether the problem is the Wi-Fi link, the DNS server, or a router that chokes under load. macOS ships with everything you need to tell those apart, and you install nothing.

What the checks cover

  • The Wi-Fi link: band, channel, channel width, signal, and link rate
  • How many nearby networks sit on each channel
  • Idle latency to the router and to the internet
  • DNS lookup time for each server
  • Speed and latency under load

Run them in order

Run these one at a time. A speed test running next to a ping fills the ping with load latency, and then you can't tell idle from busy.

system_profiler SPAirPortDataType route -n get default | grep gateway ping -c 30 ROUTER_IP ping -c 30 1.1.1.1 traceroute -n -m 5 1.1.1.1 networkQuality -v 

The second command prints your router's address, which goes in place of ROUTER_IP.

For DNS, time a lookup of a name that nobody has cached:

dig @ROUTER_IP x$RANDOM.wikipedia.org | grep "Query time" dig @1.1.1.1 x$RANDOM.wikipedia.org | grep "Query time" 

The random prefix forces a real lookup every time. Run each line five times and take the middle value.

Reading the Wi-Fi link

The first command prints your current network. The example output in this post is from my own home network.

PHY Mode: 802.11ax Channel: 161 (5GHz, 40MHz) Signal / Noise: -59 dBm / -97 dBm Transmit Rate: 154 

Subtract the noise from the signal. Here that gives 38 dB, which is very good, so distance from the router is not the problem.

Channel width is the line people miss. This router uses a 40 MHz channel, and the link rate tops out at 154 Mbps. An 80 MHz channel should roughly double that with the same signal.

The same command lists nearby networks under "Other Local Wi-Fi Networks". Count them per channel. On 5 GHz, pick a channel that no neighbor uses. On 2.4 GHz, use only channel 1, 6, or 11 at 20 MHz, because every other channel overlaps the ones next to it.

Reading latency and DNS

The router ping should be a few milliseconds with no loss. My router answered in 3.5 to 5 ms, with a spike of 45 to 90 ms about every 12 seconds.

If the router ping jumps around, the problem is inside your home. If the router is steady and 1.1.1.1 is not, the problem is on your provider's side, and the traceroute shows at which hop the delay starts.

Then compare the DNS times. My router took 41 to 176 ms per uncached lookup. 1.1.1.1 took 49 to 54 ms. Every new site you open pays that difference.

Reading the load test

networkQuality fills the line in both directions and measures how the connection responds while it is busy.

Uplink capacity: 37.314 Mbps Downlink capacity: 47.365 Mbps Responsiveness: Low (497.084 milliseconds | 120 RPM) Idle Latency: 51.692 milliseconds | 1160 RPM 

RPM is round trips per minute. 120 RPM means each round trip took about half a second under load, against 52 ms when idle.

That gap is bufferbloat. The line is fine until something uses it. Then every packet waits in a queue inside the router. Calls stutter when someone uploads photos, and a faster plan does not fix it.

Fixes, cheapest first

DNS is a setting on the Mac, so it is safe to change and easy to undo:

networksetup -setdnsservers Wi-Fi 1.1.1.1 1.0.0.1 8.8.8.8 networksetup -setdnsservers Wi-Fi empty 

The first line switches to public DNS servers. The second puts it back.

The rest lives in the router's settings:

  • Set 5 GHz to 80 MHz width on a channel your neighbors don't use
  • Set 2.4 GHz to channel 1, 6, or 11 at 20 MHz
  • Turn on SQM or Smart Queue, set to about 90% of your measured speeds, to stop bufferbloat

One caution. Wireless repeaters and mesh units copy the router's channel, so they drop and reconnect after a channel change. Make the change at a time when you can reach them for a restart.

Change one thing, then run it again

Run the same checks in the same order after every change.

On my network, switching DNS took the median lookup from 123 ms to 55 ms. In the same second run the download went from 47 to 62 Mbps, but a DNS change can't raise throughput. That is the normal variation between two runs. Responsiveness stayed Low, at 113 RPM.

The second run shows what a fix did. It also stops you from giving a fix credit for things it didn't do.

Try it yourself

Run the commands above in order and write the numbers down before you change anything. If networkQuality rates your responsiveness as Low, look for SQM or Smart Queue in your router's settings before you pay for a faster plan.

Feedback and corrections are welcome.