Being able to troubleshoot a home network is an important skill that everyone should learn about. To get started, you should get familiar with several Windows commands that let you diagnose common problems and retrieve key information.
Many Windows networking commands provide overly technical information that’s only useful in complex business environments. But there are many other command-line tools to perform basic diagnoses and learn more about what’s happening on your network.
You can enter these into the Command Prompt or PowerShell. I’m using the Windows Terminal, a modern app that provides access to both. Access it quickly by hitting Win + R and running “wt”.
ping
Ask if someone can hear you
With the ping command, your computer reaches out to another machine and hopefully receives a response. It’s useful for quickly checking if your computer is online, whether a given site is reachable, or if two devices on your network can talk to each other.
The syntax is the following, where you enter either an IP address or a website name:
ping 8.8.8.8
If you see “Reply from [address]”, communication was successful. When the command finishes, you’ll see a summary of the statistics. The Average time is useful for checking if there’s high latency in the connection.
By default, it pings four times. A useful option is adding “-t” to the end of the command, which will continually ping until you press the Ctrl + C shortcut to stop any running command:
ping msn.com -t
I find this useful for real-time feedback when I’m trying to get a device back online, and want to see the immediate effects of every change I attempt.
Aside from pinging web addresses, this is also useful for fixing communication issues between devices on your own network. If file sharing isn’t working, for instance, a first step is pinging each device’s IP address to see if they can talk to each other.
ipconfig
Get core network details
By default, the ipconfig command shows basic information about all your computer’s network connections. The IPv4 Address line shows your computer’s address on your local network, while the Default Gateway is your router’s local IP address.
If you need to double-check a machine’s IP address before pinging, or want to log into your router’s admin panel but don’t remember its IP address, run this command.
You should also be aware of a special case. If the given IPv4 Address begins with 169.254., your computer isn’t receiving a valid IP address from the router. In this case, you should reboot your computer and router/modem, make sure the Ethernet cable (if you’re using one) is securely connected, and then run a few more commands.
ipconfig options
While the base ipconfig command is handy, it also includes options that expand what you can do.
To see complete network information instead of the basics from the core command, use the /all option:
ipconfig /all
Another important pair of switches for this command allows you to release your computer’s IP address back to the available pool, then get a new one:
ipconfig /release
ipconfig /renew
If your computer is connected to your router and you’ve confirmed the router can reach the internet, but still can’t get online, try these commands.
The final important flag to know for this command is flushdns, which clears the DNS (Domain Name System) cache on your system:
ipconfig /flushdns
DNS is an important part of the web that maps human-friendly website names (like apple.com) to computer-friendly IP addresses (like 17.253.144.10). Like other caches, your computer stores frequent DNS lookups so it can process them faster.
If this cache becomes corrupted, website IPs change, or similar, then you might have trouble loading certain websites. Try this command when that happens or you see a DNS error.
tracert
Making packets show their work
Because the internet consists of many networks, when your computer connects to a website or other resource, the network packets jump from place to place to make that connection. Normally, this happens in a matter of milliseconds, so you don’t notice it.
That’s where tracert (trace route) command comes in. After entering a website or IP address, it displays the complete path that your computer uses to connect to the remote host:
tracert samsung.com
Like ping, you’ll see the latency between each step (it sends three packets to provide a better average). It’s normal to see many steps between the start and destination, especially if it’s physically far away from you. To have the command complete faster, append the -w flag with a maximum number of milliseconds to wait for each hop (the default is 4000, or 4 seconds):
tracert -w 1000 google.com
As long as your request makes it to the end, there’s no worry if you see several Request timed out entries in the path. Like with the ping command, these usually represent devices that are configured to ignore pings.
For home usage, this command is more for education than diagnosing issues. Almost all home network issues are with your local network or the remote website, not the routing between them. It’s more relevant for large networks that have several paths to reach the same destination.
getmac
The fastest way to retrieve that address
This isn’t a covert Apple ad convincing you to switch to a Mac; instead, it’s a tool to retrieve the MAC (media access control) address of your device’s connections. Every network-capable device has a MAC address permanently “burned into” it by the manufacturer, which helps identify it on a network.
Being able to quickly retrieve the MAC address of your computer is useful when configuring your network. If you haven’t set up friendly names for devices in your router’s interface, going by MAC address is easier than using the ever-changing IP address. For the same reason, filtering traffic on your network on a per-device basis (for parental controls or similar) is easier when done by MAC address.
If you have multiple connections, you’ll see one MAC for each with this command. To confirm which is which, run ipconfig /all
again and check the Physical Address field for your connection.
Your networking starter toolkit
This is only a sampling of the networking commands available on Windows, but it will get you on your way to a better understanding of what’s going on with your Ethernet or Wi-Fi connection. There are plenty of commands, both quick (like hostname
for checking your PC’s network name) and in-depth (like netstat
for displaying all active connections) to explore as you continue to learn.
If you’re curious for more, try appending “/?” after any of these commands as you figure out what’s slowing down your home network. This will give further explanation and list all the flags compatible with them.