TechKnowSurge
CompTIA Network+ 5.5 CompTIA A+ Core 2 1.2 CompTIA A+ Core 1 2.8 Cisco CCST Networking 5.3
VideoNetworkFree

DEMO: Windows Command Line Tools

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.

Complete this video to capture a CTF flag worth 1 point.

About this video

Windows includes a core set of command line utilities that network and IT professionals rely on daily to isolate and diagnose connectivity problems. Ping tests whether a remote host is reachable and measures round-trip latency, making it a first-step check when a connection issue is suspected. When ping succeeds to an IP address but not to a domain name, nslookup helps confirm whether DNS resolution is functioning correctly, identifying which server is handling queries and whether names are resolving to the expected addresses. Ipconfig reveals the current IP configuration for all active network interfaces, and running it with the /all flag exposes additional detail including DNS server assignments and MAC addresses. An APIPA address on an interface is a reliable indicator that a device failed to obtain a valid lease from a DHCP server. For deeper path analysis, tracert traces each hop between the local machine and a destination, reporting the IP address or hostname of every layer-3 device along the route along with per-hop response times. This makes it straightforward to identify where latency is introduced or where traffic stops entirely. The arp -a command displays the ARP cache, which maps IP addresses to MAC addresses for recently contacted devices on the local network. Netstat shows all active TCP connections, including local and remote addresses, port numbers, and connection states, offering visibility into what a machine is currently communicating with. Route print exposes the local routing table, showing how the operating system directs traffic across its configured interfaces including the default gateway. Finally, Telnet, though not installed by default, can be enabled through Windows Features and used to test application-layer connectivity to specific ports on remote devices.

What you'll learn

What's covered

Windows Command Line Tools

Aligned to

CompTIA Network+
5.5 Given a scenario, use the appropriate tool or protocol to solve networking issues.
CompTIA A+ Core 2
1.2 Given a scenario, use the appropriate Microsoft command-line tool.
CompTIA A+ Core 1
2.8 Given a scenario, use networking tools.
Cisco CCST Networking
5.3 Run basic diagnostic commands and interpret the results.

Key terms

Internet Control Message Protocol
ICMP
A network layer protocol used to send error messages and operational information about network conditions.
Domain Name System
DNS
A hierarchical naming system that translates human-readable domain names into IP addresses.
IP Address
A numerical label assigned to each device connected to a network that uses the Internet Protocol.
Media Access Control
MAC
A sublayer of the Data Link layer that controls how devices on a network gain access to a medium and transmit data.
Address Resolution Protocol
ARP
A protocol used to map an IP address to a physical MAC address on a local network.
Default Gateway
The router that a device uses to send traffic to destinations outside its local network.
Latency
The time delay between sending a request and receiving a response over a network.
Time to Live
TTL
A value in a packet that limits its lifespan on a network, preventing it from circulating indefinitely.
Transmission Control Protocol
TCP
A connection-oriented transport protocol that ensures reliable, ordered, and error-checked delivery of data.
Port
A logical endpoint for communication in a network, identified by a number that specifies a particular service or application.
tracert
A Windows command-line tool that traces the path packets take to a destination, displaying each hop and its response time to help identify routing delays or failures.
netstat
A command-line utility that displays active network connections, listening ports, and protocol statistics on a local system.

Transcript

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.

ping

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.

ipconfig

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.

nslookup

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.

tracert

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.

arp -a

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.

netstat

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.

route print

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.

hostname

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.

Telnet

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.

About TechKnowSurge

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 →