The Internet Isn't Working: Step-by-Step Troubleshooting, from Cable to DNS
One device or all of them, a layer-by-layer method, port light and cable, Wi-Fi association, ipconfig /all and 169.254.x.x, pinging the gateway and a public address, DNS and nslookup, proxies, the firewall WAN, double NAT, an orderly restart.
“The Internet isn't working”: it is the most common complaint, at home and in the office, and also the vaguest. It might be a loose cable, a missing IP address, a wrong DNS server or a fault at the provider. Trying things at random, restarting devices and changing settings, often makes matters worse. Here is an orderly method, one layer at a time, from the cable to DNS: which commands check each step, how to read the results and which mistakes to avoid.
The first question: one device or all of them?
Before touching anything, work out how widespread the problem is. Try another device on the same network: a second PC, a smartphone on Wi-Fi, a colleague's laptop.
- The others work: the fault is local. It concerns that PC, its cable, its switch port or its configuration. The modem and the firewall are not involved, for now.
- Nothing works: the fault is general. Look first at the path everyone shares: the firewall or router, the WAN link, the modem, the provider's line.
- Only some devices work: for example only on Wi-Fi, only on one floor or only in one VLAN. The fault lies in what those devices have in common: an access point, a switch, a DHCP range.
This question takes a minute and halves the work: it tells you which side of the network to start from.
The method: one layer at a time, from the bottom
A connection to the Internet crosses several layers that depend on one another: without a physical link there is no address, without an address the gateway cannot be reached, without a gateway there is no way to the Internet, and without DNS website names do not become addresses. That is why troubleshooting works from the bottom up, moving to the next check only when the previous one has passed.
The examples use a small, typical network: the PC 192.168.1.20 is connected to a switch, the switch to the firewall (or router), which is also the gateway, DHCP server and DNS resolver at 192.168.1.1; the firewall's WAN port is connected to the provider's modem. The public address 192.0.2.80 is reserved for documentation (RFC 5737).
1. Physical layer: light, cable and port
The first check needs no commands. The network port on the PC and the one on the switch each have a link light: if it is off, no signal is getting through. Typical causes are an unplugged or damaged cable, a wall socket not patched in the cabinet, a faulty or disabled switch port, or a switch with no power. Windows reports it as “Network cable unplugged”.
The remedy is to replace one element at a time: first the cable, with one known to work, then the switch port. If the PC is connected to a wall socket, try a cable straight to the switch to rule out the fixed cabling. How cables are built and which categories are needed is explained in the article on Ethernet cables.
A subtle case: the light is on, but the speed is 100 Mbit/s instead of 1 Gbit/s. Gigabit Ethernet over copper (1000BASE-T, IEEE 802.3ab) uses all four pairs of the cable, while Fast Ethernet (100BASE-TX) uses two. With a broken pair, many network cards fall back to 100 Mbit/s: the network “works”, but it is slow. On Windows the speed is shown by Get-NetAdapter in PowerShell (the LinkSpeed column), on Linux by ethtool eth0. Causes and checks are described in the article on autonegotiation and duplex.
2. Link: link up or Wi-Fi associated
On a wired network, a lit port and the correct speed show that the layer 2 link is up. On Wi-Fi the equivalent check is association: the device must be connected to the right network, with the right password. On Windows netsh wlan show interfaces shows the state, the network name (SSID), the band and the signal quality.
Watch out for common cases: the laptop has joined the guest network instead of the company one; the smartphone has stayed on a neighbour's network with the same name; the signal is there but the speed is very low. A strong signal alone does not guarantee a good connection: we explain why in the article on slow Wi-Fi with a strong signal.
3. IP address: what ipconfig /all tells you
With the link up, the device needs a complete IP configuration: address, subnet mask, default gateway and DNS server. On a normal network it receives them from the DHCP server. On Windows ipconfig /all shows everything; on Linux use ip addr and ip route. Here is an extract of a correct configuration (labels depend on the language and version of Windows):
C:\> ipconfig /all
Ethernet adapter Ethernet:
IPv4 Address. . . . . . . . . . . : 192.168.1.20(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.1.1
DHCP Server . . . . . . . . . . . : 192.168.1.1
DNS Servers . . . . . . . . . . . : 192.168.1.1And here is the result that signals a problem:
Autoconfiguration IPv4 Address. . : 169.254.37.12(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.0.0
Default Gateway . . . . . . . . . :A 169.254.x.x address does not come from DHCP: the operating system has assigned it to itself, through link-local address autoconfiguration (RFC 3927), because no DHCP server answered. The gateway is empty, so the PC cannot leave the local network. The causes lie further down: a physical problem not yet spotted, a switch port in the wrong VLAN, a stopped DHCP service or an exhausted address range. Once the cause is fixed, ipconfig /renew requests an address again.
A “full” configuration still needs careful reading: a wrong mask, a gateway in another network or a DNS server that no longer exists cause faults that are hard to recognise. How to read the address and the mask is explained in the article on IP addresses and subnet masks.
4. Gateway: the first ping
The default gateway is the router or firewall that carries traffic out of the local network; its role is described in the article on the default gateway. The first ping goes to it:
C:\> ping 192.168.1.1
Pinging 192.168.1.1 with 32 bytes of data:
Reply from 192.168.1.1: bytes=32 time<1ms TTL=64
Reply from 192.168.1.1: bytes=32 time<1ms TTL=64
Reply from 192.168.1.1: bytes=32 time=1ms TTL=64
Reply from 192.168.1.1: bytes=32 time<1ms TTL=64If the gateway replies, the local network works: cable, switch, address and the LAN side of the firewall are fine, and the problem is higher up. If it does not reply, the fault lies between the PC and the firewall. Hypotheses to check: the firewall is off or hung; the PC is in a different VLAN from the gateway; another device is using the same address (an IP address conflict); the firewall is configured not to answer ping on the LAN interface. In that last case arp -a helps: if the gateway appears with its MAC address, it is reachable even though it ignores ping.
5. Internet: a public address
The second ping goes beyond the firewall, to a numeric public address, so that DNS is ruled out. In practice you choose a well-known, reliable address that answers ping, such as that of a large public DNS resolver; the examples use 192.0.2.80. How to read times, losses and TTL is explained in the article on ping and traceroute.
- It replies: the road to the Internet is open. If the browser still fails, the problem is in DNS or in the application.
- It does not reply, but the gateway does: the fault is between the firewall and the Internet: the firewall's WAN, the modem, the provider's line.
tracert 192.0.2.80shows where the replies stop: if nothing comes back after the first hop (the firewall), the problem is just outside.
6. DNS: do names become addresses?
If the ping to a numeric address succeeds, try a name:
C:\> ping www.example.com
Ping request could not find host www.example.com. Please check the name and try again.
C:\> nslookup www.example.com
DNS request timed out.
timeout was 2 seconds.
Server: UnKnown
Address: 192.168.1.1This is the classic picture of “the network works but websites don't”: the Internet is reachable, but the resolver does not answer. The most common causes are a stopped DNS service on the firewall, a rule blocking port 53, or a DNS server set by hand on the PC and then forgotten, pointing to a server that no longer exists. To confirm, query a specific resolver, for example nslookup www.example.com 192.168.1.1, and compare with another device. How the resolver, the cache and the records work is explained in the article on DNS; on Windows ipconfig /flushdns clears the local cache after a fix.
7. Application: proxy, browser and rules
If ping and DNS work but a program cannot connect, the problem lies with the application. Try another browser or a private window, to rule out extensions and stored data. Check the proxy: a setting left over from another network, or an unreachable company proxy, blocks browsing while ping works. On Windows look under Settings › Network & Internet › Proxy, and netsh winhttp show proxy shows the proxy used by system services. Finally, a firewall rule may allow ping but not ports 80 and 443, or a single website may be unreachable because of its own fault.
When the whole office is down
If no device can browse and the gateway replies, look at the WAN side of the firewall. In OPNsense the dashboard and the Interfaces › Overview and System › Gateways pages show the WAN status: the address received, the provider's gateway, and the latency and loss measured by the monitor; menus may vary with the version. Three recurring situations:
- The WAN has no address: the modem is not synchronised, the cable between modem and firewall is unplugged, or the PPPoE connection fails to authenticate.
- The WAN has an address but the provider's gateway is offline: the fault is almost always on the line or at the provider. The modem lights and customer support confirm it.
- The WAN has a private address: for example 192.168.100.2, because the provider's modem also acts as a router. This is double NAT: browsing usually works, but port forwarding, VPNs and some services do not. An address in the 100.64.0.0/10 range (RFC 6598), on the other hand, shows that the provider uses carrier-grade NAT (CGNAT).
How NAT and port forwarding work is explained in the article on NAT and port forwarding.
If a restart is needed, do it in order, not all at once: first the modem, waiting until the line light is steady; then the firewall or router, which then gets its WAN address straight away; then, only if necessary, switches and access points; finally the devices. Before restarting, note the state of the lights and the firewall's messages: after the restart that information is gone.
Symptom, likely cause, check
| Symptom | Likely cause | Check |
|---|---|---|
| Port light off, “network cable unplugged” | Cable, socket or switch port | A cable known to work, another port |
| Link at 100 Mbit/s instead of 1 Gbit/s | A broken pair in the cable, a faulty socket | Get-NetAdapter, cable tester, replace the cable |
| Wi-Fi connected, but nothing works | Wrong network (guest, neighbour), weak signal | netsh wlan show interfaces |
| Address 169.254.x.x, empty gateway | DHCP not reached: VLAN, stopped service, exhausted range | ipconfig /renew, DHCP status on the firewall |
| Correct address, gateway does not reply | Firewall off, wrong VLAN, IP conflict | ping 192.168.1.1, arp -a |
| Gateway yes, public address no | WAN, modem, provider's line | WAN status on the firewall, tracert |
| Public address yes, names no | DNS: resolver down, port 53 blocked, manual DNS | nslookup, ipconfig /all |
| Ping and DNS yes, browser no | Proxy, browser, firewall rule on ports 80/443 | Another browser, netsh winhttp show proxy |
| Works intermittently | IP conflict, damaged cable, congested Wi-Fi | Continuous ping (ping -t), firewall logs |
Common mistakes
- Changing several things at once. You replace the cable, restart the router and change the DNS at the same time: the problem goes away, but nobody knows why, and it will come back. One change at a time, noting what you changed.
- Skipping the first layers. Half an hour goes on the firewall settings while the PC has a 169.254.x.x address. Checking
ipconfig /alltakes a few seconds and should always be done. - A forgotten manual DNS server. A PC configured years ago with a fixed DNS server stops browsing when that server is switched off or changes address, while the others, using DHCP, keep working.
- A proxy left switched on. A laptop used at another company keeps its proxy setting: in the office ping works, the browser does not.
- Unrecognised double NAT. Hours are spent looking for errors in the firewall's port forwarding rules, while incoming traffic stops at the provider's router.
- A damaged cable mistaken for a slow line. A 100 Mbit/s link limits everything that crosses that cable; if it is the cable between firewall and switch, it slows down the whole office.
- Drawing conclusions from a blocked ping. Some devices and servers do not answer ping by design: a missing reply alone does not prove a fault. Confirm it with another check, such as
arp -aortracert.
Practical conclusions
- First of all, ask: is it one device or all of them? The answer tells you which side to start from.
- Work from the bottom: light and cable, link or Wi-Fi,
ipconfig /all, ping the gateway, ping a public address, ping a name andnslookup, then browser and proxy. - The first check that fails shows the stretch to examine: there is no need to look further until it is fixed.
- If the whole office is down, check the WAN status on the firewall before restarting; if you restart, do it in order: modem, firewall, switches, devices.
- Change one thing at a time and note every step: next time someone reports a problem you will already have a trail.
Readers who want to go further into cabling, IP addressing, network services and Internet access will find these topics developed step by step in the Academy's books and video courses.
The video
Further reading
- Book: LOCAL AREA NETWORKS (LAN) — Volume 1: Fundamentals, Technologies, and Infrastructure (English edition)
- Book: LOCAL AREA NETWORKS (LAN) — Volume 2: IP Addressing and Network Services (English edition)
- Book: LOCAL AREA NETWORKS (LAN) — Volume 4: Routing, NAT, and Internet Access (English edition)
- Video course: Reti LAN da Zero: Switch, IP, Router, Wi-Fi e Internet (video course in Italian)
- Video course: Reti LAN in Pratica — Volume 1 (video course in Italian)
- Related article: DHCP: How a Device Gets Its IP Address
- Related article: DNS: How a Name Becomes an IP Address
- Related article: IP Address and Subnet Mask: How to Tell Which Network a Device Is On
- Related article: Cat 5e, Cat 6 and Cat 6A: Which Ethernet Cable Should You Choose?
- Related article: Why Is Wi-Fi Slow Even When the Signal Is Excellent?
- Related article: Ping and Traceroute: How to Really Read the Results
- Related article: Default Gateway: How a Device Gets Out of Its Own Network
- Related article: IP Address Conflicts: How to Spot and Fix Them
- Related article: Network Adapter at 100 Mbit/s Instead of 1 Gbit/s: Auto-Negotiation, Duplex and Cables
- Specialization: LAN Networks
Technical sources
- RFC 1122 — Requirements for Internet Hosts: Communication Layers — The link, IP and transport layers of a host, the default gateway and the ICMP Echo messages used by ping.
- RFC 3927 — Dynamic Configuration of IPv4 Link-Local Addresses — The 169.254.0.0/16 addresses a host assigns to itself when it gets no configuration, for example with no answer from DHCP.
- RFC 2131 e RFC 2132 — Dynamic Host Configuration Protocol — Automatic assignment of the address, mask, gateway (option 3) and DNS servers (option 6).
- RFC 792 e RFC 1034/1035 — ICMP e DNS — Echo Request and Echo Reply messages and ICMP error messages; name resolution and DNS resolvers on port 53.
- IEEE 802.3 — Ethernet (clausole 25 e 40: 100BASE-TX e 1000BASE-T) — 100BASE-TX uses two pairs of the cable, 1000BASE-T all four; speed autonegotiation.
- RFC 6598, RFC 1918 e RFC 5737 — The 100.64.0.0/10 shared space for carrier NAT (CGNAT); private networks 192.168.0.0/16; the 192.0.2.0/24 and 203.0.113.0/24 addresses reserved for documentation, used in the examples.
- Documentazione Microsoft — ipconfig, ping, tracert, nslookup e netsh — The Windows commands used in the examples; output labels depend on the language and version of the system.
- Documentazione ufficiale di OPNsense — Interfaces e Gateways — Interface status and gateway monitoring (latency and loss) under Interfaces › Overview and System › Gateways; menus and options depend on the version.
Standards and official documentation available from the respective organisations.