“The Internet isn’t working” can mean ten different things. The laptop’s Wi-Fi dropped, the modem lost the line, your provider’s DNS servers aren’t answering, or only the site you’re trying to open is down. Each of these has a different fix, and rebooting the router at random only solves one or two of them.
The good news is that four commands, already built into Windows, macOS and Linux, tell you in a couple of minutes where the chain breaks. Here’s how to use them, in the order that makes sense, which is the path your data takes: from your computer to the router, from the router to the Internet, from the Internet to the site.
Before you start: open a terminal
On Windows, press the Windows key, type cmd and open Command Prompt. On a Mac, open Terminal from the Utilities folder. One difference to remember: on Windows ping stops by itself after 4 attempts; on Mac and Linux it keeps going until you press Ctrl + C (or use ping -c 4).
Step 1: can the computer reach the router?
Type ipconfig (on a Mac, netstat -nr | grep default) and look for Default Gateway: that’s your router’s address, usually 192.168.1.1 or 192.168.0.1. Then:
ping 192.168.1.1
- Regular replies of a few milliseconds: the link between you and the router works. Go to step 2.
- “Request timed out” or “Destination host unreachable”: the problem is inside your home. Check the cable or Wi-Fi connection, try another device, move closer to the router. Here, yes, rebooting the router makes sense.
Step 2: does the router get out to the Internet?
Now ping a reliable public address, using the number, not the name:
ping 8.8.8.8 (or ping 1.1.1.1)
- It replies: your line to the Internet works. If sites still won’t open, the culprit is almost certainly DNS. Go to step 3.
- No reply, while the router does reply: the problem is between the router and your provider. Look at the modem’s lights (the “Internet” or line light is usually off or red), check your provider’s outage page and only then call support. Now you have precise information to give them: “the router responds, but I can’t reach any external address”.
Step 3: are site names being translated?
DNS is the service that turns google.com into the server’s numeric address. If it fails, the Internet is there but “can’t find” anything. Try:
nslookup google.com
You should see one or more IP addresses in the answer. Now ask the same question to a public DNS server other than your provider’s:
nslookup google.com 1.1.1.1
- The first command fails and the second works: your provider’s or router’s DNS has a problem. You can work around it by setting public DNS servers on the device or the router.
- The answer is
0.0.0.0: that’s not a fault. It means a filter (an ad blocker such as Pi-hole or AdGuard Home, the router’s parental controls or a security suite) is deliberately blocking that domain. It happened to this very site: an ad-blocking DNS filter on the network was blocking Google services and a WordPress plugin threw an incomprehensible error. The fix is to add the domain to the filter’s allow list.
If you changed anything in your DNS settings, clear the computer’s cache with ipconfig /flushdns (on a Mac: sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder).
Step 4: where does the route get lost?
If a single site or service is unreachable, tracert (on Mac and Linux, traceroute) shows every “hop” the data takes to get there:
tracert -d 8.8.8.8
The -d option skips translating addresses into names and makes the command much faster. How to read it:
- the first hop is your router; the second or third are usually already in your provider’s network;
- a few isolated asterisks (
* * *) are normal: many devices deliberately don’t answer these requests; - if from a certain hop onwards everything is asterisks to the end, the route breaks there. If that happens in your provider’s first hops, the problem is theirs; if it happens much further on, it’s downstream, close to the service you’re trying to reach.
An important caveat: some servers don’t answer ping on purpose, even when they work perfectly. If a ping to a site fails but your browser opens it, there’s no problem.
Bonus: the connection comes and goes
Intermittent problems need a longer test. On Windows:
ping -n 100 8.8.8.8
At the end Windows shows the percentage of lost packets and the minimum, maximum and average times. Run the test on Wi-Fi first and then on a cable. If you lose 5-10% of packets on Wi-Fi and none on the cable, the problem is the wireless network (router position, interference, a crowded channel), not the line.
In short: the pattern to remember
- the router doesn’t answer: problem at home;
- the router answers, 8.8.8.8 doesn’t: line or provider problem;
- 8.8.8.8 answers, names don’t: DNS problem;
- everything answers except one service: that service is down. Check its status page.
