Sub topic 10
A Step-by-Step Connectivity Troubleshooting Workflow
This chapter assumes you already know what an IP address, a subnet mask, a default gateway, and a DNS server are. It also assumes you can open a command prompt and have seen basic ping and ipconfig output. The earlier chapters covered each tool on its own. This chapter combines them into one method that finds the failing stage of a connection instead of guessing.
Why a fixed order matters
"The internet is down" can mean many different faults. Your network adapter may have no address. The cable or Wi-Fi link may be fine while the router is dead. The router may work while your provider's link fails. DNS may fail while everything else works.
Each fault breaks a different stage of the path, so you test the stages from nearest to farthest. The first stage that fails is where you look. Everything before it works, and everything after it cannot be tested until it is fixed.
The workflow has five stages:
- Read your own configuration with
ipconfig. - Ping the loopback address to check the local IP stack.
- Ping your default gateway to check the local network.
- Ping a remote IP address to check routing beyond your network.
- Ping a remote name to check DNS.
If a ping to a remote IP address fails, add a sixth step: run tracert to see where the path stops.
Step 1: Read your configuration
Start with the configuration. A ping test is meaningless if the computer has no usable address.
ipconfig /allLook at the adapter that is actually in use. Check these fields:
| Field | What you want to see | What a problem looks like |
|---|---|---|
| IPv4 Address | An address in your local network, such as 192.168.1.25 | `169.254.x.x` or no address |
| Subnet Mask | A mask matching the network, such as 255.255.255.0 | Missing or unexpected mask |
| Default Gateway | The router's address, in the same subnet as your address | Blank |
| DHCP Enabled | Yes on most home and office networks | No when you did not set a static address |
| DNS Servers | At least one reachable server | Blank or an unfamiliar address |
An address starting with 169.254 is an automatic private address. Windows assigns it when it asks for an address through DHCP and gets no answer. The adapter is connected, but the DHCP server is unreachable or not responding. You can ask for a new lease:
ipconfig /release
ipconfig /renewA missing default gateway means the computer can talk only to its own subnet. A gateway outside your subnet, for example an address of 10.0.0.1 with your own address 192.168.1.25 and mask 255.255.255.0, usually points to a wrong static setting.
If a media-disconnected message appears for the adapter, the problem is below IP. Check the cable, the Wi-Fi connection, or the adapter itself.
Step 2: Ping the loopback address
ping 127.0.0.1The loopback address stays inside your own computer. The packet never touches the network card's wire or radio. A reply shows that the TCP/IP software on your machine works.
This step rarely fails. When it does, suspect a damaged network stack, a security product that blocks ICMP even locally, or a misconfigured host firewall. It does not prove that your network card is healthy. It proves only that the software stack responds.
Step 3: Ping the default gateway
Use the gateway address shown by ipconfig. The example below uses a placeholder.
ping 192.168.1.1This is the first test that crosses the physical link. A reply means your computer can reach the router on the local network. A failure here, with a valid configuration, points to:
- A Wi-Fi connection that is associated but not passing traffic.
- A bad cable, switch port, or switch.
- A wrong gateway address in a static configuration.
- A router that is powered off or hung.
- A router that does not answer ping on its LAN side. This is uncommon, but some are configured that way.
Slow or uneven replies at this step deserve attention too. Gateway times should be low, usually a few milliseconds on a wired link. Timeouts mixed with replies suggest a poor Wi-Fi signal or interference. Because the gateway is one hop away, loss here cannot be blamed on the internet.
Step 4: Ping a remote IP address
ping 8.8.8.8Pinging a well-known public IP address tests the path out of your network, through the router and your provider. The address is used instead of a name so that DNS plays no part. A reply here means routing to the internet works in both directions.
If the gateway replies but the remote address does not, the fault lies beyond your local network. The possible causes include:
- The router has no working connection to the provider.
- The provider has an outage or a routing fault.
- A firewall or the router's own rules block outbound ICMP.
- The remote host itself is not answering.
Try a second remote address before concluding the internet is down. One host that ignores ping is common. Two unrelated hosts that both fail is stronger evidence.
Step 5: Ping a remote name
ping example.comThis step tests name resolution. If the remote IP address replies but the name gives "Ping request could not find host", the network path works and DNS does not. Compare the two results:
| Ping by IP | Ping by name | Conclusion |
|---|---|---|
| Replies | Replies | Connectivity and DNS both work |
| Replies | "could not find host" | DNS fault |
| Fails | Fails | Connectivity fault, DNS cannot be judged |
| Fails | Replies | The host blocks ICMP to that address, or you pinged different hosts. Retest. |
For a DNS fault, check the DNS servers in ipconfig /all. Then clear the local cache and test again:
ipconfig /flushdns
ping example.comIf it still fails, try changing the DNS server in the adapter settings, or test with another resolver. A name that resolves on a phone on the same network but not on your computer points to your computer's settings or cache.
Step 6: Locate the break with tracert
When the remote IP ping fails and the gateway replies, trace the path:
tracert -d 8.8.8.8The -d option skips reverse name lookups, so the output appears faster. Read the output from the top:
- Hop 1 should be your gateway. If hop 1 times out, return to step 3.
- The next hops are usually your provider's equipment, often with private or provider-owned addresses.
- The last hop that answered shows how far packets travelled.
A trace that stops after your gateway suggests a problem at the router's uplink or the provider's edge. A trace that stops several hops into the provider network suggests a fault there, outside your control, and you can give the last responding hop to the provider's support. A trace that reaches the destination but shows high latency from one hop onward, and keeps the high latency in every later hop, shows where the delay begins.
The reverse is a trap. A single hop with high latency or asterisks, followed by normal later hops, usually means that router slows or ignores its own ICMP replies while forwarding normally. Judge by the later hops, not the middle one. The chapter on ICMP limits covers this in detail.
Worked example
A user reports that no web pages load. You run the sequence and record the results.
| Test | Result |
|---|---|
| `ipconfig /all` | Address 192.168.1.25, mask 255.255.255.0, gateway 192.168.1.1, DNS 192.168.1.1 |
| `ping 127.0.0.1` | 4 replies |
| `ping 192.168.1.1` | 4 replies, under 3 ms |
| `ping 8.8.8.8` | 4 replies, about 20 ms |
| `ping example.com` | Ping request could not find host |
The first four stages work, so the network path is healthy. Only name resolution fails. The DNS server is the router at 192.168.1.1, and it answers ping but may not be forwarding DNS queries. The next action is to test another DNS server, such as one set manually on the adapter. If names resolve with it, the router's DNS forwarding is at fault, not the connection.
Had ping 8.8.8.8 failed instead, the DNS result would have told you nothing, because the name test depends on a working path. You would then trace the route.
Common mistakes
- Skipping the configuration check. Pinging first can hide a missing gateway or a 169.254 address.
- Testing only a name. A failed name ping combines DNS and connectivity. Always test an IP address as well.
- Trusting one failed target. A host can drop ICMP while working fine for web traffic. Test two targets.
- Reading a lone timeout in a trace as a fault. Check whether later hops respond.
- Stopping at a successful ping. ICMP working does not prove that a TCP service such as HTTPS works. A firewall may allow ping and block the port.
- Changing several things at once. Make one change, then rerun the failing step.
Linux and macOS
The same order applies. Replace the Windows commands as follows:
ip addr show
ip route show
ping -c 4 127.0.0.1
ping -c 4 192.168.1.1
ping -c 4 8.8.8.8
ping -c 4 example.com
traceroute -n 8.8.8.8ip route show lists the default gateway on the line beginning with default. On macOS, use ifconfig and netstat -rn in place of the ip commands.
Exercise
You run the layered test on a Windows PC. ipconfig /all shows address 192.168.1.40, mask 255.255.255.0, gateway 192.168.1.1. Pings to 127.0.0.1 and 192.168.1.1 succeed. ping 8.8.8.8 times out, and so does ping 1.1.1.1. tracert -d 8.8.8.8 shows only hop 1 (192.168.1.1) answering, then asterisks. Which stage failed first, and where should you look next?
Show answer
The first failing stage is the remote IP address test (step 4). The local configuration, IP stack, and gateway all work, so the fault is beyond the PC. Two unrelated targets fail and the trace dies right after the gateway, so look at the router's connection to the provider (its uplink or WAN status) and then at the provider itself. DNS cannot be judged until this is fixed.
Exercise
ping 8.8.8.8 returns replies, but ping example.com returns "Ping request could not find host example.com". What does this show, and which command can you run to clear one possible local cause?
Show answer
The network path works and name resolution fails, so it is a DNS problem. Check the DNS servers listed by ipconfig /all, and run ipconfig /flushdns to clear a bad cached entry, then ping the name again.
Exercise
ipconfig /all shows the address 169.254.37.12 and no default gateway. Why is pinging 8.8.8.8 pointless at this point, and what do you try first?
Show answer
The 169.254.x.x address means the computer did not get a DHCP lease, and with no gateway it cannot send traffic off its own subnet. Fix the configuration first: check the link, then run ipconfig /release and ipconfig /renew and check that the DHCP server (usually the router) is working.