Windows 10 networking command tools: Through the use of a wired or wireless connection, Windows 10 makes it simple to connect to a local network as well as the internet. However, there may be times when you still need to manually manage settings or troubleshoot connectivity issues. In these cases, the built-in command-line tools can be of great assistance to you.
It is very likely that Windows 10 will include a Command Prompt tool that will assist you in resolving the issues that are most frequently encountered. For example, ipconfig and ping are two of the most essential tools for viewing network settings and diagnosing connectivity problems, respectively.
If you are having issues with routing, you can examine and determine related issues by using the route command to display the current routing table. Additionally, using the nslookup tool will allow you to diagnose any DNS issues that you may be having.
You can also use tools such as arp to diagnose problems with switching and to derive a MAC address from an IP address. You are able to view statistics for all of the connections through the command-line tool known as netstat.
And you can use the netsh tool 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.
For example, you can check the current configuration; reset settings; manage Wi-Fi and Ethernet settings; and enable or disable the firewall.
You should be able to manage and troubleshoot networking issues on your device and across the network with the assistance of the eight Command Prompt tools that are highlighted in this guide.
-
IPCONFIG
Ipconfig, which stands for “Internet Protocol configuration,” is one of the most common networking tools on Windows 10. It enables you to query and display the transmission control protocol and Internet protocol network configuration that is currently in use on your computer.
The command also includes options to carry out various actions, such as refreshing Dynamic Host Configuration Protocol (DHCP) and Domain Name System (DNS) settings, amongst other things.
Display network configuration
Here is how to get started with ipconfig on Windows 10:
- Open Start.
- Search for Command Prompt, right-click the top result, and select the Run as administrator option.
- Type the following command to view a summary of the TCP/IP network configuration and press Enter: ipconfig
A brief note: You can use the CLS command to clear the screen in Command Prompt when you no longer require the information displayed on it so that you can continue to run commands without the screen becoming cluttered.
- Type the following command to view the complete TCP/IP network configuration and press Enter: ipconfig /all
After you have finished all of the steps, you will have a complete picture of the TCP/IP configuration of the personal computer.
Refresh network settings
Here is how to release and renew the network configuration with Command Prompt:
- Open Start.
- Search for Command Prompt, right-click the top result, and select the Run as administrator option.
- Type the following command to remove the current network configuration and press Enter: ipconfig /release
- Type the following command to reconfigure the network configuration and press Enter: ipconfig /renew
When you have finished the steps, the first command will delete the existing configuration, and the second command will retrieve new settings from the DHCP server to fix any problems with connectivity.
It is not uncommon to observe the same IP address being reconfigured on the device, provided that the dynamically assigned settings have not yet become invalid in the server.
Refresh DNS settings
Here is how to flush and rebuild the current DNS cache entries on Windows 10:
- Open Start.
- Search for Command Prompt, right-click the top result, and select the Run as administrator option.
- Type the following command to clear the DNS system cache on the device and press Enter: ipconfig /flushdns
When you have finished the steps, the entries that have been saved in the DNS cache of Windows 10 will be cleared out, and a new cache will be created.
This command is typically useful in situations in which you are unable to connect to another computer or website by using the host or domain name because the information that is stored in the local cache is out of date.
You may also like: How to Fix Windows 10 Vulnerabilities
-
TRACERT
Tracert, also known as Trace Route, is a diagnostic tool that is included in Windows 10 and is used to determine the route taken by a network to reach a specific location by sending a series of ICMP echo requests.
However, in contrast to the ping command, each request includes a TTL (Time to Live) value that increases by one with each subsequent iteration. This enables the display of a list that details the path that requests have travelled as well as the amount of time they have been active for.
Here is how to trace the route to a destination with Command Prompt on Windows 10:
- Open Start.
- Search for Command Prompt, right-click the top result, and select the Run as administrator option.
- Type the following command to understand the path taken to the destination and press Enter: tracert IP-OR-DOMAIN
If you want to troubleshoot a specific location, replace IP-OR-DOMAIN in the command with the location’s actual domain name or IP address. For instance, using the tracert google.com command will allow you to view the path that the packets are taking to reach Google.com.
- (Optional) Type the following command to adjust the hop counts to the destination and press Enter: tracert -h HOP-COUNT IP-OR-DOMAIN
In the command, replace IP-OR-DOMAIN with the actual IP address or domain name of the destination whose connection you wish to troubleshoot. Then, replace HOP-COUNT with the desired number of hops. As an illustration, this command sets the maximum number of hops (nodes) to reach the destination to 5: the command is tracert -h 5 google.com.
After you have finished all of the steps, you will find out whether or not the destination is reachable and whether or not there is a problem with the networking along the way.
Tracert is a tool that, like ping, comes with a number of configuration options, all of which can be viewed using the “tracert /?” command.
You may also like: How to find MAC address on Windows 11
-
PING
Ping is yet another essential networking tool due to the fact that it enables users to send ICMP (Internet Control Message Protocol) echo request messages. These messages are used to test the IP connectivity with other devices, such as other computers in the network or the internet service itself.
Test device connectivity
Here is how to test the network connectivity with the ping command on Windows 10:
- Open Start.
- Search for Command Prompt, right-click the top result, and select the Run as administrator option.
- Type the following command to send ICMP echo requests to test connectivity and press Enter: ping IP-OR-DOMAIN
Simply replace IP-OR-DOMAIN in the command with the actual Internet Protocol address (IP address) or domain name of the computer or service you wish to test. For instance, this command checks to see if there is proper communication between the local device and the router: ping 10.1.4.1
A brief note: If you run the command with the -a option (for instance, ping -a 10.1.4.1), it will also resolve the address to a hostname.
- (Optional) Type the following command to test the local computer networking stack and press Enter: ping 127.0.0.1 or ping loopback
It is common knowledge that the loopback address is 127.0.0.1, and this address is also known by that name. If you execute the command and receive a response, it indicates that the networking stack on Windows 10 is operational and ready to be used. Pinging the device while using its own network address is the same thing as this.
After you have finished all of the steps, if you receive four successful echo replies from the destination, it indicates that the device can communicate with the remote host. If the request is not fulfilled within the allotted amount of time, there is likely an issue between the host and the remote device.
If you are having issues with connectivity, you should begin by pinning the local computer to determine whether or not the network stack is functioning properly. After that, check the connection to the router to ensure that the problem is not caused by the local network. The next step is to make an attempt to ping a website to determine whether the issue is with the local host or the internet connection.
You should also be aware that if the remote device or service blocks the ICMP protocol, the ping command will always time out.
Diagnose packet loss activity
You have access to the ping command’s many options by typing “ping /?” into the console. One of these options gives you the ability to set the amount of time you want the tool to run for, which is useful for analyzing lost packets when you are diagnosing connectivity issues.
Here is how to run the ping command for a specific period:
- Open Start.
- Search for Command Prompt, right-click the top result, and select the Run as administrator option.
- Type the following command to continue pinging until stopped and press Enter: ping IP-OR-DOMAIN -t
Simply replace IP-OR-DOMAIN in the command with the actual Internet Protocol address (IP address) or domain name of the computer or service you wish to test. For instance, this command checks to see if there is proper communication between the local device and the router: ping 10.1.4.1 -t
- Use the “Control + C” keyboard shortcut to stop the ping.
After you have finished the steps, you will be able to view the successful and lost requests, which will provide you with information that can help you continue troubleshooting and eventually find a solution to the connectivity issue.
When a service on a local network goes offline unexpectedly, administrators will typically use the ping command to determine the problem as soon as possible. When remotely rebooting a server, the tool can also be utilized as a speedy method to determine when the server has been brought back online and is operating normally again.
You may also like: How to install Windows 11 on Steam Deck
-
NSLOOKUP
The nslookup (Name Server Lookup) tool can provide helpful information that can be used to diagnose and fix problems that are related to DNS. Both an interactive and a non-interactive mode are provided by the instrument.
On the other hand, you will almost always be operating in the non-interactive mode, which requires you to enter the complete command in order to obtain the information you require.
You can determine the domain name of an IP address or the name servers for a specific node by using this command. You can also use this command to display the default DNS name and address of the local device.
Here is how to get started with nslookup on Windows 10:
- Open Start.
- Search for Command Prompt, right-click the top result, and select the Run as administrator option.
- Type the following command to look up the local DNS name and address and press Enter: nslookup
A brief note: the nslookup interactive mode will also be opened when you execute this command.
- Confirm the current DNS information.
- Type the following command to exit the interactive mode and press Enter: exit
- Type the following command to determine the name and address of a specific server and press Enter: nslookup IP-ADDRESS
Change the IP-ADDRESS in the command to reflect the address of the device you want to control remotely. As an illustration, the following command looks up the IP address 172.217.165.142: nslookup 172.217.165.142.
- Type the following command to determine the address of a specific server and press Enter: nslookup DOMAIN-NAME
Simply change the DOMAIN-NAME in the command to the address of the device you want to control remotely. nslookup google.com is an example of a command that can be used to find out an Internet Protocol (IP) address.
When you have finished the steps, depending on the command, you will know whether the device has a DNS resolver, as well as the IP address or domain of the remote host, and vice versa. This information will be presented to you after you have completed the steps.
You may also like: How to disable ads on Windows 11
-
NETSTAT
The tool known as netstat, which stands for “Network Statistics,” compiles and presents statistics regarding all network connections. It gives you the ability to understand open and connected ports, which is useful for monitoring and troubleshooting networking issues in Windows 10 and applications.
You are able to view a list of active network connections and listening ports whenever you use the netstat tool. You have the ability to view the protocol and network adapter statistics. You can even display the current routing table, in addition to a great deal of other information.
Here is how to get started with netstat:
- Open Start.
- Search for Command Prompt, right-click the top result, and select the Run as administrator option.
- Type the following command to show all active TCP connections and press Enter: netstat
- (Optional) Type the following command to display active connections showing numeric IP address and port number instead of trying to determine the names and press Enter: netstat -n
- (Optional) Type the following command to refresh the information at a specific interval and press Enter: netstat -n INTERVAL
Be sure to replace the word “INTERVAL” in the command with the number of times, measured in seconds, at which you want the information to be displayed again. In this particular illustration, the command in question is updated every five seconds: netstat -n 5
Note quickly that if you are using the interval parameter, the “Ctrl + C” keyboard shortcut in the console can be used to cancel the command you are currently running.
After you have executed the command, you will be presented with a list of all active connections broken down into four columns, as follows:
- The connection protocol, such as TCP or UDP, is displayed by the Proto command.
- Displays the device’s IP address, followed by a semicolon and the connection port number. Local Address: Displays the IP address of the device. The local IPv6 address is indicated by the double semicolon that is positioned inside the brackets. The address “0.0.0.0” also refers to the address used on the local network.
- Displays the IP (or FQDN) address of the remote computer, followed by the port number and then the port name. The semicolon separates the port number from the port name (for instance, https, http, microsoft-ds, wsd).
- State: Indicates whether or not the connection is currently active (established), whether or not the port has been closed (time wait), and whether or not the program itself has closed the port (close wait). The following additional statuses are also available: closed, fin wait 1, fin wait 2, last ack, listen, syn received, syn send, and timed wait.
You may also like: Microsoft Windows 11 2022 Update: What we know about the New OS
-
ROUTE
The routing table that enables Windows 10 to understand the network and communicate with other devices and services is displayed by the route tool, which is located in the Network and Sharing Center. The table can also be modified, and the tool provides options to delete rows and columns as necessary.
You typically do not need to worry about the routing table, just as you do not need to worry about the arp tool, but the command-line tool will come in handy when you are troubleshooting issues that are related.
Here is how to view or flush the routing table available on Windows 10:
- Open Start.
- Search for Command Prompt, right-click the top result, and select the Run as administrator option.
- Type the following command to view the routing table known to Windows 10 and press Enter: route print
- Confirm the routing table information.
- (Optional) Type the following command to clear the routing table and press Enter: route -f
If you run this command on the device, it will cause the device to lose network connectivity because the system will no longer understand the topology of the network.
The machine needs to be restarted after the command has been executed so that the networking stack can reconstruct the routing table. In most cases, you should not have to clear the table, but if you modify some of the entries and need to reset the table, then you should clear the table.
When you have finished the steps, you will have an understanding of the routing table as well as how to clear the information.
You can also use the “route /?” command to view a list of available options. These options include the ability to change networking metrics, specify a gateway, add a new route, and many other options. Modifying these settings, on the other hand, is not typically advised unless you have a solid understanding of how the network operates.
You may also like: How to dual-boot Windows 11 and Linux on your PC
-
ARP
An Address Resolution Protocol, or arp, table is maintained by Windows 10. This table stores IP to Media Access Control, or MAC, entries that the system has successfully resolved. You have the ability to view the entire table with the arp tool, as well as modify the entries and use it to determine the MAC address of a remote computer.
There is typically no need for concern regarding MAC addresses; however, there are circumstances in which knowing this information could prove useful.
For instance, when diagnosing issues with the network at the data link layer (switching), when limiting access to the network for particular devices, or when filtering content that passes through the network.
Here is how to get started with arp on Windows 10:
- Open Start.
- Search for Command Prompt, right-click the top result, and select the Run as administrator option.
- Type the following command to view the current arp table cache on Windows 10 and press Enter: arp -a
- Type the following command to determine the MAC address of a remote device and press Enter: arp -a IP
It is imperative that the IP address of the destination be substituted for the one found in the command. For instance, the following command will show you the destination’s actual IP address, which is 10.1.4.120: arp -a 10.1.4.120
- Confirm the MAC (physical) address for the remote device.
Following the completion of the steps, you will have the ability to view the complete ARP table as well as the MAC address associated with a particular IP address.
If you are interested in learning about all of the available options, you can use the “arp /?” command to generate a list of the options along with brief explanations of each one.
You may also like Windows 11 Blocking EdgeDeflector: How to fix
-
NETSH
Netsh, also known as Network Shell, is a command-line program that is compatible with Windows 10 and enables users to view and modify virtually any type of network configuration. You can use the tool, for instance, to view the current configurations of the network, manage wireless connections, reset the network stack to fix the majority of problems, enable or disable the firewall, and a great deal more.
Here is how to get started with the netsh command-line tool:
- Open Start.
- Search for Command Prompt, right-click the top result, and select the Run as administrator option.
- Type the following command to view a list of the available commands (contexts) and press Enter: netsh /?
- Type the following command to view the list of available subcommands (subcontexts) for a specific option and press Enter: netsh CONTEXT-COMMAND
Alter the CONTEXT-COMMAND in the command so that it corresponds to the command that includes the additional options. For instance, the following command displays all of the available commands for managing the firewall with netsh: the command is netsh advfirewall /?
After you have finished the steps, you will have the knowledge necessary to navigate the netsh contexts and subcontexts command to manage the networking settings.
Reset system network stack
Here is how to reset the network stack to resolve common connectivity problems:
- Open Start.
- Search for Command Prompt, right-click the top result, and select the Run as administrator option.
- Type the following command to reset the winsock stack and press Enter: netsh winsock reset
- Restart your computer.
When you have finished the steps, the winsock configuration will be reset, and if all goes well, the issues you were having connecting to a network and the internet should be resolved.
Export and import network configuration
Here is how to export the network configuration with netsh on Windows 10:
- Open Start.
- Search for Command Prompt, right-click the top result, and select the Run as administrator option.
- Type the following command to export the current configuration for all the network adapters and press Enter: netsh -c interface dump>PATH\TO\EXPORTED.txt
Change the PATHTOEXPORTED.txt that is found in the command to the full path and name of the file that will store the configuration settings. For instance, the netshconfig.txt file can be updated with the configuration by using the following command: using the command “netsh -c interface dump>c:netshconfig.txt”
After you have finished the steps, you will be able to view the exported configuration by opening the file in any text editor of your choice.
Import network configuration
Here is how to import the network configuration settings with netsh:
- Open Start.
- Search for Command Prompt, right-click the top result, and select the Run as administrator option.
- Type the following command to import the network configuration and press Enter: netsh -c interface dump>PATH\TO\IMPORTED.txt
Change the path and name of the file you want to have the exported configuration saved to in the command so that it reads “PATHTOEXPORTED.txt.” For instance, importing the settings contained in the netshconfig.txt file can be accomplished by using the command: netsh -f c:. netshconfig.txt
The new networking configuration will be imported and applied to Windows 10 once you have finished the steps.
Enable and disable firewall
Here is how to enable the Windows 10 firewall with netsh, use these steps:
- Open Start.
- Search for Command Prompt, right-click the top result, and select the Run as administrator option.
- Type the following command to enable the default firewall and press Enter: netsh advfirewall set currentprofile state on
After you have completed the steps above, the Windows Defender Firewall will be enabled on the device.
Disable firewall
Here is how to disable the Windows 10 firewall with netsh:
- Open Start.
- Search for Command Prompt, right-click the top result, and select the Run as administrator option.
- Type the following command to disable the default firewall and press Enter: netsh advfirewall set currentprofile state off
As soon as you’ve finished going through all of these steps, the Windows Defender Firewall will be turned off on the device.
You may also like: Best Free Antivirus for Windows 11
You can change settings and troubleshoot networking issues on Windows 10 with the help of a variety of tools, including Command Prompt, PowerShell, and graphical applications.
These tools are all accessible through the Start menu. On the other hand, for this tutorial, we will only cover the basics of using a few of the most widely used tools that are accessible through the Command Prompt.
Would you like to read more about Windows 10 networking command tools-related articles? If so, we invite you to take a look at our other tech topics before you leave!