Essential Windows command line tools for network troubleshooting are demonstrated in practice, covering ping, ipconfig, nslookup, tracert, arp, netstat, route print, hostname, and Telnet. Each tool is shown in context with a clear explanation of what it reveals and when to use it.
Windows Command Line Tools
This is not an exhaustive list of everything that you could use for troubleshooting. It's going to be just a condensed list of those common command line tools on Windows that you would use, and generally what you would use them for from a troubleshooting standpoint.
The first command that you are probably familiar with is ping. So what I do is type in ping and the address that I'm pinging, and let's do something external. This is often used as a DNS server, so we can ping it. We can see that everything has come back with around a 15, 16, 17 millisecond delay, so I can see the delay that's in here.
Things that I look for when I do ping is I look for a return and how fast it gets returned. If there's some sort of connectivity issue, then we'll either see that it will show us that the destination is unreachable, or it will show us that there's a delay in some of these messages.
The next one I'm going to cover is ipconfig. I often will use this to see if my DNS is working correctly. When I type in ipconfig, I can see the DNS entries of my different networks. And I see right here one has an APIPA address, so this Ethernet interface is not getting a connection. I see that the Wi-Fi is here but not the Ethernet, so perhaps there is something down on that network and it's not getting the proper IP address.
Also, what I can do for additional troubleshooting purposes is type in ipconfig /all. I would do the /all to see things like if I want to see the DNS server or the MAC address. So I can gather a lot of information that can help me with this troubleshooting process.
There are times I find that I have connectivity and I can ping IP addresses, but I'm not able to ping something such as a website. If I can ping a resource in the outside world but not a specific website, or any websites, perhaps DNS is the issue. One thing I can use to troubleshoot a DNS issue is by using nslookup and then the site I want to look up. It will tell me what server it's using to look this up, and it's going to show me that this in fact is resolving. So from a DNS standpoint, this machine is connected and able to get DNS queries and be able to translate from those DNS names to IP addresses.
Another one we haven't covered yet is trace route - on a Windows machine it's actually tracert. What we can do is we can find how to get to certain destinations and if there is something along the way that's stopping us from getting there.
So for instance, I'm going to type in tracert www.google.com. What's happening is it's going out and it's trying to reach the destination, but it's limiting the number of hops that it can go, and then it gets a reply back. What is essentially happening right here is you're seeing that it's coming back with each one of the hops, the IP address or the name of each one of the hops along the way. And so we'll be able to essentially map out what is between this machine right here and the final destination where it's going, which is www.google.com.
And then it's giving the average return response rate. So we can see that the delay is really in this first hop - right here is where the delay comes into play - and then the rest of the way pretty much doesn't have much of a delay at all. This is how I'm able to see the whole route between one device and the end, which is www.google.com. Now that we see that's finished up, we see that there are 17 layer 3 devices between here and the end.
Another one that we've used in a prior video is arp -a. This will give you a list of what's inside the ARP table. Remember the ARP table is going to translate from IP address to MAC address. These are the active connections, or ones that have recently been connected to, and it shows you some of the stats of those. So this is the ARP table right here, where essentially we're viewing the ARP table.
Another one that you may want to look at is netstat. We type in netstat, and what this is going to show us is all of the connections that it's making to the outside world. We see that here are the TCP connections, and it's showing you the local address and port and the destination address and port that it's going to, and what state those are in. Established means that it's open. Close wait, it's just waiting for it to close. And so I've just got a few connections to this machine at this point.
We've taken a look at the routing table on a Windows machine before, but what we can do is we just type in route print to actually see what the different routes are. This is similar to a routing table that you find on a router, but this is on the PC machine so it can figure out how it routes certain information.
There's a couple connections on this machine right here. We see one is that Ethernet interface that has that APIPA address on it, and it's just a local connection. So we see the network address right here and how to get to that network. We see the machine address on here, and then we also see the broadcast address for this network. And then we also see one for the wireless connection. It's the same thing: we see the network, we see the machine itself, and we see the broadcast. And then it also has some broadcast addresses in here, some of the loopback and local link addresses, and then the default gateway - this is pointing to the default gateway on this machine. So there we see some of the connections that have been entered into this routing table.
The last one we're going to take a look at is hostname. I type in hostname, and what it does is it just presents the host name of this laptop, which is demo laptop.
One other thing that I'll mention is that Telnet also can be used for troubleshooting purposes, but it's not automatically installed on a Windows machine. If you go into add/remove programs, we can click on programs and features, and we're going to click on turn Windows features on or off. We scroll through here, and here's a lot of different tools that we could use to possibly help us with troubleshooting. What I can do is I can then go to Telnet, click on Telnet and click okay, and then it'll go through the process of installing Telnet on this machine. So I can Telnet into another device and test out connectivity to another device.
That's how you turn it on. And then for me to use it, I come back to the command line and type in telnet and then the address that I'm telnetting into, to test the connectivity via Telnet.
TechKnowSurge builds IT and cybersecurity professionals through hands-on, concept-first training built around real understanding — not memorization. Free interactive tools, structured programs, and 25+ years of real-world experience, all in one place.
Explore free tools and programs →