
Summary
Restarting the router works until it doesn’t. And when it fails, the issue usually lies somewhere less obvious, like your DNS configuration, ISP, or Windows itself. But I have good news. There are a few commands that can track down the issue without wasting time. And more often than not, they’re all you need to get back online. Ping to test the connection Narrow things down The ping command is a great way to narrow down where the problem actually is. You can first ping your router to see if it’s even talking with your PC. This is easy to do. Type ping 192.168.0.1 or ping 192.168.1.1 depending on your router’s default gateway, and you’ll know. If it fails, the problem is with the router or the Ethernet connection. If it works, you can try pinging a public IP address with ping 8.8.8.8 command. This skips DNS and hits Google servers directly. If this fails, but the router ping succeeds, then the issue might be with your ISP. But if it works, you can ping a domain like Google’s. Enter ping google.com and see what you get. If pinging 8.8.8.8 works but google.com doesn’t, the issue is almost likely with your DNS. Use nslookup to troubleshoot DNS problems Is your DNS server working fine? DNS is what converts website names into IP addresses that computers can use. That part is usually handled by your ISP’s DNS, or one you’ve set up manually. Either way, if your ping tests point toward a DNS issue, nslookup is worth running. Type nslookup google.com, and it’ll tell you how your DNS server is handling the request. If it shows an error or takes forever, it’s likely that there’s something wrong with the DNS server you’re using. To confirm this, type nslookup google.com 8.8.8.8 and hit Enter. This basically tells your PC to use Google’s public DNS instead of your default one. Once you’ve confirmed that the problem lies with the DNS, you have a couple of options. The first one is to clear out the DNS cache so that Windows is forced to fetch fresh entries. Windows caches DNS responses locally to speed up the browsing experience, but this data can get corrupted at times. Flushing the DNS cache can fix it, and you can do it by running ipconfig /flushdns. Another option is to switch to a different DNS provider altogether. You can pick a reliable provider like Google or Cloudflare and set it as the default option. To change the default DNS server on Windows, head to Settings > Network & internet > Wi-Fi and click the Edit button next to DNS server assignment. Trace the connection to see where it breaks Follow your data hop by hop If your connection is working fine but painfully slow, tracert is the command to run. Unlike ping, this one traces the full path your data takes from your PC to the destination. It shows exactly how much time each hop is taking, so you can pinpoint where the problem lies. Type tracert google.com and you’ll see a list of hops. Each one will also show a response time in milliseconds. What you need to look for is where the timeouts start. If the first hop fails, the problem is usually with the router. If it’s fine, but things fall apart after a few hops, the issue may be with the ISP. And finally, if it drops only near the end, the problem may be on the destination’s server side, and there’s not much you can do about that one. The response times also matter here. If they jump from 20ms for the first few hops to suddenly 300ms, for instance, there may be a congestion issue at that specific point. Reset the Windows network stack if all else fails Nothing beats a fresh start If none of the above commands work, and you’ve also ruled out issues with your ISP and the router, it’s time to go nuclear. Windows has a couple of commands that can reset your network configuration and fix whatever that’s causing the problem. It’s a lot less scary than it sounds. All you have to do is run both these commands one by one. Netsh winsock reset Netsh int ip reset The first command resets the Winsock catalog, which handles how Windows apps talk to the network services. If something is off here, like a bad driver update or a misconfigured VPN connection, this will fix it. The second command rewrites the TCP/IP registry entries back to default. If there’s something wrong with the IP settings, this will take care of it. Restart your PC after running both these commands, and you should be back online.