Get the Most Out of CMD on Windows with These Network Commands

Network connectivity is no longer a luxury but rather a requirement to continue with our daily tasks. Today we are going to make a complete compilation of all the basic network commands for Windows 10. These basic network management commands will become your ally when it comes to solving any inconvenience with the Internet connection.

One of the fastest ways to check network connectivity or diagnose any type of error in the configuration or assignment of IPs, is to do it through the popular cmd in Windows (command line). Although it would be much easier to do it through a graphical user interface, you will see how, once you have learned these commands, it will be much faster to do the task in question.

network-commands

ping

It is one of the most basic commands. However, it is one of the most useful if we want to have greater control of what happens with our network connectivity. What information can you know? If your computer manages to reach a destination with a specific IP address or not, how long does it take (in milliseconds) to travel a data packet both on the way and on the way back. Next, you can see what the output should be if we ping successfully:

Keep in mind that you can not only ping an IP address but also a domain. If you are indicating a valid domain or a valid IP address, the ping will be given successfully and will indicate “Reply from XXXX” or “Reply from XXXX” . That IP address, then, corresponds to the domain which we indicate at the time of pinging.

However, if this command is not executed successfully, it may be because we have not indicated the correct IP address or domain or they are not available and return error messages such as ” Destination host inaccessible ” or ” Response time timed out for this request «.

Note: As each ping is executed with the sending of 4 packages, it is possible to indicate how many packages we want to send. Either 10, 100 or the amount you want.

ping 192.168.1.1 -n 1000

Do you need more response time? You can modify it as follows:

ping 192.168.1.1 -w 3000

Do you need to send packages unlimitedly? With the argument «-t» you can do it:

ping 192.168.1.1 -t

ipconfig

Most likely, you will have already used this command to have information regarding the IP data of your different network interfaces. However, you can not only consult data but perform certain actions. Now this would be the expected departure:

One of the actions you can perform using ipconfig is cleaning the DNS records using flushdns .

ipconfig /flushdns

An interesting fact is that the latter can help when we are trying to solve a problem of Internet connectivity or a particular website. If you have problems with address resolution, this command will allow you to clear the cache stored in the operating system where we run it. After the execution of the command, the DNS server should be able to resolve the domains that we have access to, that is, we should have standardized access to the Internet.

Are you still with the problem? We suggest taking a look at this guide to solve common problems in Wi-Fi .

nslookup

A command suitable for the curious! Through this command, it is possible to know to which IP address a specific domain belongs, that is, a website. However, according to the infrastructure and need of the websites, there is a high probability that the IP address will change every time we perform the query.

netstat

It is considered as a basic network monitoring tool, either for diagnosis or analysis. Although if you are a particular user, this can help you more than anything to have an overview about the connections you are currently having, the protocol you are using, the local and remote address, etc.

One aspect to consider is that not just all the connections you see consist of connections that involve data traffic at that time. If not, rather, it informs you about which ports are open to be able to connect through them.

tracert

The purpose of this command is to verify the jumps given by the data packet that you want to send to a specific destination. These jumps correspond to the fact of which routers it passes before reaching the final server. It is quite effective because it allows you to determine precisely at what time (or on which server) the package can no longer travel to the destination. Thus, we can rely on tracert if we have any inconvenience with connectivity such as high latency.

We see that each jump is numbered for a better distinction. So we also see three latency numbers in milliseconds , which means that for each jump 3 packets are sent, so each of the three times corresponds to each packet. However, it is better to calculate the average so as to have more concrete data about latency, if necessary. In the last part of each jump we see the IP address of each server through which it passes, including the router that is our ally for Internet output. The leap that corresponds to our router, that is, our Internet gateway, is always the first.

pathping

In essence, it shows the same type of information as tracert but much more in detail. What does this mean? That the command may take a little longer to finish executing and at the end, a message of this kind appears:

A few minutes later, it is already possible to see the complete result of the command:

getmac

In a few seconds, you can count on the MAC addresses of all the network interfaces associated with your computer. Which means you can know both the connected and disconnected interfaces. It is good to know that every device has a MAC address if it meets its associated standards. Which ones do we mean? To any of the IEEE 802 standards: to connect via Ethernet cable, Wi-Fi, Bluetooth and more.

If you want to have more control over the MAC addresses of your computer, you can consult this interesting guide on the MAC addresses   that will teach you to change the MACs of any of the interfaces, including wireless networks.