Troubleshooting Networks
"The Internet doesn't work" – a step-by-step way to find out where it really stops: cable, IP address, router, DNS or the service itself. The commands I use on Windows and Linux, and what their answers mean.
Open in the interactive Digital Garden
| What You Need |
|---|
| A terminal: Command Prompt or PowerShell on Windows, any terminal on Linux – see Communication with the Machines |
| The basics from Computer Networks: IP address, gateway, DNS, ports |
| Later: Wireshark and iperf3 |
| All the tools in one place: my Networking & Diagnostics resources |
This is the third part of my troubleshooting series, after Windows and Linux. In my experience, "the Internet doesn't work" is the most common call I get from family – and the problem is almost never "the Internet". It's one link in a chain, and the trick is to check the links in order instead of restarting things at random.
The Method: From the Bottom Up
Networks are built in layers, so troubleshooting goes the same way – start with the cable and go up. Each step has a question and a command:
- Is there a connection at all? Cable plugged in, lights on the switch port, Wi-Fi connected?
- Did I get an IP address?
- Can I reach the router?
- Can I reach the Internet by IP address?
- Does DNS work – can I reach it by name?
- Does the service itself answer? (the web page, the mail server, the game)
The first step that fails is where the problem is. Everything above it will fail too, so there is no point looking there.
Step 2: Did I Get an Address?
# Windows
ipconfig /all
# Linux
ip a
ip route
Look for the IPv4 address, the default gateway (the router) and the DNS servers. Some answers tell the story right away:
169.254.x.x– the computer gave itself an address because nobody answered its DHCP request. The router's DHCP is off, the cable goes nowhere, or the Wi-Fi is "connected" but not really. On Windows,ipconfig /releaseandipconfig /renewask again.- An address from a different network than usual (for example
192.168.0.xinstead of192.168.1.x) – you are probably connected to a different router, a guest network or somebody's travel router. - No gateway – the computer can talk to its neighbours but doesn't know the way out.
Steps 3 and 4: Ping the Router, Then the World
# the router (use the gateway address from step 2)
ping 192.168.1.1
# a server on the Internet, by IP address - no DNS needed
ping 1.1.1.1
ping 9.9.9.9
If the router answers but 1.1.1.1 doesn't, the problem is between your router and the provider: the provider's line, the modem, or the router's WAN settings. Now it's time to look at the router's status page or call the provider – with facts instead of "nothing works".
One warning: some devices and servers don't answer ping at all, on purpose. No answer from one server doesn't prove much; no answer from three different well-known ones does.
Step 5: DNS
# Windows and Linux
nslookup jpnas.net
# ask a specific DNS server, to compare
nslookup jpnas.net 1.1.1.1
# Linux, more detail
dig jpnas.net
If ping to 1.1.1.1 works but names don't resolve, it's DNS – and it's a classic. The usual suspects: the router's DNS has a bad day, a Pi-hole or AdGuard Home at home is down (been there), or a VPN changed the DNS settings and didn't put them back. On Windows ipconfig /flushdns clears the cache; don't forget the hosts file, which wins over DNS and is sometimes changed by programs (or malware).
Step 6: Is It the Service?
# PowerShell: is port 443 on this server reachable?
Test-NetConnection jpnas.net -Port 443
# Linux / Windows 10 and newer: ask the web server directly
curl -I https://jpnas.net/
If the connection to the port works but the page still doesn't load, the problem is in the service – the web server, the certificate, the application – and not in the network. A quick check from the phone on mobile data (Wi-Fi off) tells you whether the problem is only at home or everywhere.
Where Does It Get Lost? traceroute
# Windows
tracert 1.1.1.1
# Linux
traceroute 1.1.1.1
mtr 1.1.1.1 # ping and traceroute together, live
traceroute lists every router on the way. Lines with * * * are not always a problem – many routers just don't answer. What matters is where the delays jump up and stay up, or where it stops completely.
Looking at the Packets: Wireshark
Coming soon. When the commands above don't explain it, Wireshark shows what is really sent and received. I'll show how to catch a DHCP request and a DNS question and read them – it's the best way to finally understand what those words mean.
Slow Wi-Fi
Coming soon. Measuring the real speed with iperf3 instead of speed test sites, 2.4 vs 5 GHz, channels, and why one old device can slow down a whole network.
My Short Checklist
- Only this device, or all of them? Only Wi-Fi, or cable too?
ipconfig /all/ip a– address, gateway, DNS.- ping router → ping
1.1.1.1→nslookupa name. - Did anything change recently? New router, update, VPN, ad blocker, "optimisation" program?
- Restart in the right order: modem, then router, then the device – and wait a minute between them.
A Few More Thoughts
Networks look like magic until you check them one layer at a time. After a few times it becomes a routine: address, router, IP, name, service. The commands are the same on every computer for the last twenty years, and knowing them saves a lot of restarting – and a lot of phone calls.