When a network breaks, guessing wastes time. A few simple commands tell you exactly where the fault sits — your PC, the router, the DNS server, or the internet. This guide explains the essential network troubleshooting commands in plain English, with real examples you can use today.
Published 28 November 2026 • SHM Soft
Every IT professional has a moment like this: a user says the internet is down, and everyone looks at you. The fastest way to find the fault is not to restart everything and hope. It is to run a few commands, read the results, and follow the trail. Each command answers one question, and together they narrow the problem down to one device or one service.
The good news is that you do not need to memorise fifty commands. About eight of them cover almost every network problem you will meet in a home or small business. This guide covers those eight: ping, ipconfig, tracert, nslookup, netstat, arp, and the netsh and ipconfig reset commands. We will explain what each one does, show the exact syntax, and explain how to read the output like a professional.

Before you type anything, think about the order. Network troubleshooting works best from the inside out: first check your own computer, then the local network, then the router, then the internet. This is sometimes called the bottom-up approach, and it stops you from blaming the internet provider for a loose cable. The commands in this guide follow that order, so you can work through them the same way every time.
On Windows, you run these commands in Command Prompt or Windows Terminal. Press Windows key + X and choose Terminal, or type cmd in the Start menu. A few commands need administrator rights, so right-click and choose Run as administrator when you need to change settings. On Linux and macOS, the same ideas apply, but some command names differ: ip replaces ipconfig, and traceroute replaces tracert. The thinking is identical either way.
Start with ipconfig: what does this computer know?
The first command to run is usually ipconfig. It shows your computer's IP address, subnet mask, and default gateway, which is normally your router. If you see an address starting with 169.254, your computer did not get an address from the router, and the problem is with DHCP or the cable. Our guide on how to troubleshoot DHCP explains what to do next. If the gateway line is blank, your computer has no route out at all.
Add the /all switch for the full picture: ipconfig /all shows the DNS servers, the DHCP server, the MAC address, and when the address lease expires. This is the output you want when you ask someone for help, because it shows everything about the connection in one place. Two more switches are worth knowing: ipconfig /release drops the current address, and ipconfig /renew asks for a new one. Together they fix a surprising number of connection problems, and ipconfig /flushdns clears old name lookups that can send you to the wrong server.
Ping is the simplest and most used network command. It sends a small message to another device and waits for a reply. If you get replies, the other device is reachable. If you get timeouts, something between you and it is broken. The standard test is to ping in stages: first ping 127.0.0.1 to test your own network card, then ping your gateway, usually 192.168.1.1, then ping a public address like 8.8.8.8, then ping a name like google.com. The stage where it stops working tells you where the fault is.
Read the numbers, not just the replies. The time value shows how long each reply took. On a local network it should be under 1 millisecond. To the internet, anything under 50 milliseconds is fine. If the time jumps around or packets are lost, you may have a bad cable, Wi-Fi interference, or a busy connection. Use ping -t to keep pinging until you stop it with Ctrl + C, which is useful for watching an intermittent fault that comes and goes.
When ping to a public address works but ping to a name fails, the problem is DNS, and our guide on how to fix DNS server not responding walks through the fix. When ping stops at your gateway, the fault is local: the router, the cable, or the switch. When ping works to some sites but not others, the fault is usually beyond your network. That is when you need tracert.
Tracert, short for trace route, shows every hop your traffic takes to reach a destination. Run tracert google.com and you will see a list of routers, each with its response time. The hop where the times suddenly jump, or where the replies turn to asterisks, is where the delay or failure starts. If the first hop is slow, your router or local connection is the problem. If a middle hop is slow, it is your provider's network. If only the last hop fails, the destination itself may be blocking ping, which is normal for many servers and does not mean the site is down.

Nslookup asks a DNS server what address belongs to a name. Run nslookup google.com and you will see which DNS server answered and which addresses it returned. If nslookup fails but ping to 8.8.8.8 works, you have confirmed a DNS problem, not an internet problem. You can also ask a specific server, like nslookup google.com 1.1.1.1, to test whether a different DNS server gives a better answer. On Linux, the dig command does the same job with more detail.
Netstat shows the connections your computer currently has open. Run netstat -an to list all connections and listening ports. This is useful when a program cannot connect: if nothing is listening on the port it needs, the service is not running. netstat -b shows which program owns each connection, which helps when you suspect malware or a program using too much bandwidth. For a live view of which process is using the network, the Resource Monitor in Windows is easier to read than netstat output.
Arp shows the address resolution table, which maps IP addresses to MAC addresses on your local network. Run arp -a to see the devices your computer knows about. If two devices claim the same IP address, you will see a conflict here, and that is often the cause of a connection that works for a minute and then drops. arp -d clears the table, forcing your computer to rediscover its neighbours. This is a small command, but it solves a class of problems that look mysterious until you know to check it.
These three commands also matter for security. An unfamiliar listening port in netstat, or a strange entry in the arp table, can be an early sign of a compromised device. If you manage a small business network, it is worth checking them now and then, or setting up proper monitoring. Our guide on what network monitoring is explains how to watch a network all the time instead of only when something breaks.
Sometimes the fault is not a device or a server, but the network settings on the computer itself. Old VPN software, a bad update, or a misconfigured program can leave Windows networking in a broken state. That is when the reset commands earn their keep. Run netsh winsock reset to reset the part of Windows that programs use to talk to the network, and netsh int ip reset to reset the TCP/IP settings to their defaults. Restart the computer after both, then test again.
These commands are safe, but they do have side effects. They will remove custom settings, including static IP addresses, and some VPN clients may need to be reinstalled or reconfigured afterwards. So use them when the simpler fixes have failed, not as a first step. The same logic applies to the full Network reset in Windows Settings, which removes and reinstalls all network adapters. It fixes stubborn cases, but you will need to re-enter Wi-Fi passwords afterwards, so keep them handy.
For a repeatable process, write the order down and keep it near your desk. First ipconfig /all, then ping the gateway, then ping 8.8.8.8, then ping a name, then tracert, then nslookup. Each result either clears a suspect or points at the next one. With practice, this takes under two minutes, and it turns a vague report of "the internet is down" into a precise answer. That is the difference between guessing and troubleshooting, and it is what separates a professional from someone who just restarts the router and hopes.
If you find yourself running these commands every week for the same office, the real problem is not the computers. It is a network that needs proper care: monitoring, patching, and someone who notices a failing switch before it dies. That is exactly what managed IT services are for, and our guide to how much managed IT services cost shows what that kind of cover actually costs for a small business.
Watch on YouTube: The Windows Network Command Line - CompTIA A+ 220-1202 - 1.5
A simple checklist to keep
The eight commands in this guide cover almost every network fault you will meet: ipconfig, ping, tracert, nslookup, netstat, arp, and the netsh reset commands. Learn them in the order above, practise reading their output, and keep a note of what normal looks like on your network. When something breaks, you will find the fault in minutes instead of hours, and you will know whether it is yours to fix or your provider's.
What is the first command to run when the network is down?
Run ipconfig /all first. It shows whether your computer has a valid IP address, gateway, and DNS servers. If the address starts with 169.254, the problem is DHCP or the cable.
How do I use ping to test my internet connection?
Ping in stages: ping 127.0.0.1 for your own card, then your gateway, then 8.8.8.8, then google.com. The stage where replies stop tells you where the fault is.
What is the difference between ping and tracert?
Ping tells you whether a destination is reachable. Tracert shows every router hop on the way there, so you can see exactly where traffic slows down or stops.
What does nslookup do?
Nslookup asks a DNS server for the address behind a website name. If it fails while ping to 8.8.8.8 works, you have a DNS problem, not an internet problem.
When should I use netsh winsock reset?
Use it when simpler fixes have failed and you suspect Windows networking itself is broken, for example after removing VPN software. Restart the computer afterwards.
Conclusion
Network troubleshooting commands turn a vague "the internet is down" into a precise answer. Start with ipconfig, test with ping in stages, trace the path with tracert, check names with nslookup, and reset with netsh only when the simpler fixes have failed. Each command answers one question, and together they point at the fault.
If the same network problems keep coming back, the answer is not more commands. It is a network that is looked after properly, with monitoring and maintenance. Contact us for a free quote and we will help you get there.
Related articles:
How to Troubleshoot DHCP Problems
The DHCP faults that ipconfig /all will reveal, and how to fix them.
How to Fix DNS Server Not Responding (Windows)
When ping works but names do not, DNS is the problem. Here is the fix.
What Is Network Monitoring and Why Your Business Needs It
Stop troubleshooting after the break — catch problems before users notice.
Want help with your network or IT?
Tell us what you need and we will send a free quote with no hidden charges.