Although Windows has wanted to simplify as much as possible the fact of being able to connect to the Internet, there are some features, such as configuring the connection and checking its operation, that are not intuitive at all. Microsoft has focused on anyone being able to connect to a network with a few clicks, but all the administrative and performance analysis options leave a lot to be desired. Luckily, if we have the CMD console at hand it is possible to always have our connection under control. And for this we only have to learn some basic commands.
CMD is the legacy MS-DOS console that allows us to run certain functions and tools on our computer. Thus, we can find CMD commands to solve all kinds of problems in Windows. Unlike PowerShell, CMD is much more limited in operation, but much simpler so that any user can use it without problems. Even if you don’t have any computer skills.
How to open CMD in Windows
To run CMD, all we have to do is type “cmd” in Cortana’s search bar, or in the run window that appears when using the Windows + R keyboard shortcut. Of course, we must bear in mind that we have several ways to open this element of the system, the CMD. As with many of the programs that we run on the Windows computer, we can open it with administrator permissions. For example, if we type CMD in the Windows search box, the corresponding entry for the functionality will appear on the screen.
In order to open this element with administrator permissions, we only have to right-click on it to be able to run it as administrator. This will give us a series of advantages than if we open CMD in a conventional way. Keep in mind that from the CMD we have access to a multitude of functions that we cannot from the graphical interface. Some of these refer directly to the operating system, so to make changes in this regard, we need to open CMD with administrator permissions.
In fact, the most advanced users of the Redmond operating system make use of this same CMD on many occasions to get the most out of Windows. And it is that this will not only be of enormous help to us when it comes to solving problems with the Internet connection, but it goes much further. With everything and with this, below we will talk about some of the most important and useful commands that we can use here for these tasks that we comment on. These commands that we will talk about, will help us to work in the best way with the PC connectivity.
Ipconfig, to know everything about the network card
The ipconfig command is one that any user should know about. This command helps us to quickly see all the network cards installed in the computer (both physical and virtual) and the configuration of each one of them. Very useful, for example, to know the IP of our computer very easily.
To use this command, we simply have to write the following:
We will be able to see all the logical information of the network cards of our PC. In case you want to obtain more detailed information (such as the MAC of the Windows network card), then the command that we must execute is:
ipconfig / all
A useful command to troubleshoot DNS-related problems, and that never hurts to know, is:
ipconfig / flushdns
As you can see first-hand, this is a very complete command to know in detail many of the technical sections of our network connection. In fact, ipconfig could be considered one of the most used commands in these environments. Of course, perhaps a little more complicated either to be able to interpret, in a correct and exact way, all the information that we are going to find on the screen here. To this we have to add that we should also know the best way to take advantage of all this.
Getmac, to know the MAC of our PC in a single CMD command
It is not well known or used, but if you want to know the MAC of any PC, this command can help us save time. Instead of seeing all the information that ipconfig shows us, the getmac command basically focuses on showing us only the physical address, or MAC, of all the network cards connected to the PC.
Ping, a basic CMD to check if we are connected to the Internet
Internet not working or slow? Is this web page down? Are we correctly connected to the network? Or is it our DNS that is causing problems? Surely we have ever asked ourselves these questions. And luckily, they are very easy to solve.
The “ping” command allows us to very easily check the status of our connection and, if we have problems, even identify the cause in a matter of seconds. This command focuses on sending ICMP data packets to a server that we indicate and measuring the response time until this server responds.
For example, to see if our Internet connection works we can execute the command:
CMD will tell us that there is a connection to the server, and it will also show us the response time that it has taken from when we have sent the package until we have received a response. A very high ping time can be a sign that something is wrong (for example, that we have a bad Wi-Fi signal).
In case the server does not respond, it may be that the problem is in our DNS. And to find out, just ping any IP. For example, that of Google’s DNS:
As we are entering the IP manually (184.108.40.206), the ICMP packet does not have to go to the DNS, making sure that this is not responsible for the problem.
Tracert, to find out where the problem is: in our network or outside
We may be connected to the Internet but, for some reason, the connection is not working properly. And in that case it is difficult to know if it is our problem or that of some intermediate point of the network. It can also happen that the ping goes off when we try to connect to a server. And in that case, we need to figure out where exactly it is triggered in order to fix it.
The tracert command traces a route from our PC to the destination server and shows us each and every one of the jumps made by the connection. In this way we can find out where our connection is cut or what is the point where more ping is added.
If we want to get more information about the trace, then the command we must know is pathping. This command is, broadly speaking, a vitaminized version of tracert, which will take longer to complete but which, in return, will show us more complete and detailed information.
Check all open connections with netstat
A little more advanced than the previous ones, the NETSTAT command is one of the essential when controlling, analyzing and diagnosing a network. This command allows us to know all the connections that are open on our PC, both local and remote.
Open connections are not always active, but they help us see which connections are open waiting to send or receive traffic over the Internet. If we use P2P programs, for example, active connections are triggered, and this is one of the reasons why the Internet connection tends to be slow, because the PC is not capable of managing them all at once. Therefore, if we are regular users of P2P networks and their corresponding clients to download files in torrent format, perhaps this command can be very helpful.
Check your DNS with nslookup
If we have doubts about whether our DNS is working correctly, then the command we should run is nslookup. This command for CMD will allow us to find out if the DNS server that we have configured is correctly translating the URLs to their corresponding IP addresses.
If we execute the command “nslookup” as it is in a CMD window, we will be able to translate all the domains we want into their corresponding IP addresses.
Modify routing tables with route
This command is very useful for system administrators as it allows us to view and modify the team’s routing table. Thanks to it, we will be able to have much more control over the operation of the network on our computer, being able to solve possible wrong route problems.
Know TCP / IP statistics with nbtstat
Another command more thought for advanced users who need to have a much more exhaustive control over the network. The nbtstat command allows us to see the statistics of the TCP / IP protocol, as well as all the current connections that are established. To do this, it uses the NetBIOS protocol running over TCP / IP. This command will be extremely useful to all those who wish to know first-hand specific information about their connection from CMD. In addition, the parameters that we can use here, as in many of the commands seen in these lines, significantly increase its functionality.