Windows 10 networking command tools every user needs to know
Windows 10 has many command-line tools to help you manage networks, and in this guide, we’ll show you how to use eight of them.
When you purchase through links on our site, we may earn an affiliate commission.Here’s how it works.
Windows 10 makes it easy to connect to a network and the internet using a wired orwireless connection. However, sometimes, you may still need to manually manage settings or troubleshoot connectivity problems, which is when the built-in command-line tools can come in handy.
Regardless of the issue,Windows 10will likely have a Command Prompt tool to help you resolve the most common problems. For instance,ipconfigandpingare among the most important tools for viewing network settings and troubleshooting connectivity issues. If you are dealing with a routing problem, theroutecommand can display the current routing table to examine and determine related problems, and with thenslookuptool, you can diagnose DNS problems.
You also have tools likearpto troubleshoot switching problems and determine the MAC address from an IP address. Thenetstatcommand-line tool allows you to view statistics for all the connections. And you can use thenetshtool to display and change many aspects of the network configuration, such as checking the current configuration, resetting settings, managing Wi-Fi and Ethernet settings, enabling or disabling the firewall, and a lot more.
Thisguidehighlights eight Command Prompt tools that should help you manage and troubleshoot networking problems on your device and across the network.
1. IPConfig
On Windows 10,ipconfig(Internet Protocol configuration) is among the most common networking tools that allow you to query and show current TCP/IP (Transmission Control Protocol/Internet Protocol) network configuration. The command also includes options to perform different actions, such as refreshing Dynamic Host Configuration Protocol (DHCP) and Domain Name System (DNS) settings.
Display network configuration
To get started with ipconfig on Windows 10, use these steps:
Get the Windows Central Newsletter
All the latest news, reviews, and guides for Windows and Xbox diehards.
Once you complete the steps, you will have an overview of the PC’s entire TCP/IP configuration.
Refresh network settings
To release and renew the network configuration with Command Prompt, use these steps:
After you complete the steps, the first command will clear the current configuration, and the second command will fetch new settings from the DHCP server to resolve connectivity issues. If the dynamically assigned settings have not expired in the server, it is common to see the same IP address reconfigured on the device.
Refresh DNS settings
To flush and rebuild the current DNS cache entries on Windows 10, use these steps:
Once you complete the steps, the entries stored in the DNS cache of Windows 10 will be deleted and refreshed. Usually, this command will come in handy when you cannot connect to another computer or website using the host or domain name due to outdated information in the local cache.
2. Ping
Pingis another essential networking tool because it allows you to send ICMP (Internet Control Message Protocol) echo request messages to test the IP connectivity with other devices, whether it is another computer in the network or internet service.
Test device connectivity
To test the network connectivity with the ping command on Windows 10, use these steps:
In the command, replaceIP-OR-DOMAINwith the actual IP address or domain name of the computer or service you want to test. For example, this command tests the communication between the local device and router:ping 10.1.4.1
Once you complete the steps, receiving four successful echo replies from the destination means the device can talk with the remote host. If the request times out, there is a problem between the host and the remote device.
If you are dealing with connectivity problems, start pinning the local computer to ensure the network stack is working. Then test the router’s connection to ensure the issue is not in the local network. Then try to ping a website to find out whether there is a problem with the internet connection or the remote host.
You should also know that the ping command will always time out if the remote device or service blocks the ICMP protocol.
Diagnose packet loss activity
The ping command includes many options that you can access with the"ping /?“command, and one of these options is the ability to set the time you want to run the tool, which can come in handy to examine packets lost when you are troubleshooting connectivity problems.
To run the ping command for a specific period, use these steps:
In the command, replaceIP-OR-DOMAINwith the actual IP address or domain name of the computer or service you want to test. For example, this command tests the communication between the local device and router:ping 10.1.4.1 -t
After you complete the steps, you will be able to see the successful and lost requests that can give you a clue on how to continue troubleshooting and resolving the connectivity problem. Administrators usually use the ping command in a local network to find out when a service goes down quickly. Also, the tool can be used as a quick way to know when the server is up and running again when restarting a server remotely.
3. Tracert
Windows 10 also includestracert(Trace Route), a diagnostic tool to determine the network path to a destination using a series of ICMP echo requests. However, unlike the ping command, each request includes a TTL (Time to Live) value that increases by one each time, allowing to display of a list of the route the requests have taken and their duration.
To trace the route to a destination with Command Prompt on Windows 10, use these steps:
In the command, replaceIP-OR-DOMAINwith the actual IP address or domain name for the destination you want to troubleshoot. For example, this command allows you to view the path the packets are taking to reach Google.com:tracert google.com
In the command, replaceIP-OR-DOMAINwith the actual IP address or domain name for the destination you want to troubleshoot andHOP-COUNT for the number of hops you want to trace. For example, this command puts the limit of 5 hops (nodes) to the destination:tracert -h 5 google.com
Once you complete the steps, you will know if the destination is reachable or if there is a networking problem along the way.
Similar to the ping tool, tracert includes several options, which you can view with the"tracert /?“command.
4. NSLookup
Thenslookup(Name Server Lookup) tool can show valuable details to troubleshoot and resolve DNS-related issues. The tool includes aninteractiveandnon-interactivemodes. However, you will be using the non-interactive mode more often than not, which means you will type the full command to obtain the necessary information.
You can use this command to display the default DNS name and address of the local device and determine the domain name of an IP address or the name servers for a specific node.
To get started with nslookup on Windows 10, use these steps:
In the command, replace theIP-ADDRESSwith the address of the remote device. For example, this command looks up the IP address 172.217.165.142 address:nslookup 172.217.165.142
In the command, replace theDOMAIN-NAMEwith the address of the remote device. For example, this command looks up the IP address Google.com address:nslookup google.com
After you complete the steps, depending on the command, you will know whether the device has a DNS resolver and the IP address or domain and vice versa of the remote host.
5. NetStat
Thenetstat(Network Statistics) tool displays statistics for all network connections. It allows you to understand open and connected ports to monitor and troubleshoot networking problems for Windows 10 and apps.
When using the netstat tool, you can list active network connections and listening ports. You can view network adapter and protocol statistics. You can even display the current routing table and much more.
To get started with netstat, use these steps:
In the command, make sure to replaceINTERVALfor the number (in seconds) you want to redisplay the information. This example refreshes the command in question every five seconds:netstat -n 5
Once you run the command, it will return a list of all active connections in four columns, including:
6. ARP
Windows 10 maintains anarp(Address Resolution Protocol) table, which stores IP to Media Access Control (MAC) entries that the system has resolved. The arp tool lets you view the entire table, modify the entries, and use it to determine a remote computer’s MAC address.
Usually, you do not need to worry about MAC addresses, but there are scenarios when this information may come in handy. For example, when troubleshooting network problems at thedata link layer(switching) or when restricting access or filtering content through the network for specific devices.
To get started with arp on Windows 10, use these steps:
In the command, make sure to replace IP with the address of the destination. For example, this command reveals the physical address of the 10.1.4.120 destination:arp -a 10.1.4.120
After you complete the steps, you will be able to view the entire arp table and MAC address of a specific IP address.
If you want to know all the available options, use the"arp /?“command to list the available options with their corresponding descriptions.
7. Route
Theroutetool displays the routing table that allows Windows 10 to understand the network and communicate with other devices and services. The tool also offers some options to modify and clear the table as needed.
Like the arp tool, you typically do not have to worry about the routing table, but the command-line tool will come in handy when troubleshooting related problems.
To view or flush the routing table available on Windows 10, use these steps:
Once you complete the steps, you will understand the routing table and how to clear the information.
You can also use the"route /?“command to view a list of available options, including options to change networking metrics, specify a gateway, add a new route, and much more. However, modifying these settings is usually not recommended unless you understand how the network works.
8. Netsh
On Windows 10,netsh(Network Shell) is a legacy command-line tool that allows you to display and change virtually any network configuration. For instance, you can use the tool to view the current network configurations,manage wireless connections, reset the network stack to fix most common problems, enable or disable the firewall, and a lot more.
To get started with the netsh command-line tool, use these steps:
In the command, change theCONTEXT-COMMANDfor the command that includes additional options. For example, this command shows the commands available to manage the firewall with netsh:netsh advfirewall /?
Once you complete the steps, you will know how to navigate the netsh contexts and subcontexts command to manage networking settings.
Reset system network stack
To reset the network stack to resolve common connectivity problems, use these steps:
After you complete the steps, the winsock configuration will reset, hopefully fixing the problems connecting to a network and the internet.
Export and import network configuration
To export the network configuration with netsh on Windows 10, use these steps:
In the command, replace thePATH\TO\EXPORTED.txtwith the path and name of the file to store the configuration. For example, the following command exports the settings to the netshconfig.txt file:netsh -c interface dump>c:\netshconfig.txt
Once you complete the steps, you can open the file with any text editor to view the exported configuration.
Import network configuration
To import the network configuration settings with netsh, use these steps:
In the command, replace thePATH\TO\EXPORTED.txtwith the path and name of the file you want with the exported configuration. For example, the following command imports the settings from the netshconfig.txt file:netsh -f c:\netshconfig.txt
After you complete the steps, the new networking configuration will be imported and applied to Windows 10.
Enable and disable firewall
To enable the Windows 10 firewall with netsh, use these steps:
Once you complete the steps, the Windows Defender Firewall will enable on the device.
Disable firewall
To disable the Windows 10 firewall with netsh, use these steps:
Once you complete the steps, the Windows Defender Firewall will be disabled on the device.
On Windows 10, there are many tools you can use to change settings and troubleshoot networking issues using Command Prompt, PowerShell, and graphical applications. However, in this guide, we only focus on getting you started with some of the most common tools available in Command Prompt.
More resources
For more helpful articles, coverage, and answers to common questions about Windows 10 and Windows 11, visit the following resources:
Mauro Huculak has been a Windows How-To Expert contributor for WindowsCentral.com for nearly a decade and has over 15 years of experience writing comprehensive guides. He also has an IT background and has achieved different professional certifications from Microsoft, Cisco, VMware, and CompTIA. He has been recognized as a Microsoft MVP for many years.