Check Your Internet Connection with CMD Commands: How to use the CMD commands of windows to test the connection, the functioning, the availability of a network, the Ping command to know the response times on a connection and to know the IP address corresponding to an Internet site.
When we use an Internet connection, fiber or ADSL, the first thing we usually check is the speed of the Internet. The higher the speed, the faster the download of content from the Internet and the better our connection, at least in theory. In addition to speed, there is also a very important factor, even more than speed, and which very few take into account, which is the stability of the connection.
A connection is stable when no packets are lost in the connection. When we play online or if we are watching the series through Netflix and our connection is not stable (that is, the packets are lost), most likely we will have problems, both in ping and in disconnection, in the case of online games, and pixelation or blocks in the case of Netflix.
Although Windows wanted to make it easier to be able to connect to the Internet, there are some features, such as configuring the connection and controlling its operation, which are not intuitive at all.
Microsoft has focused on allowing anyone to connect to a network with a couple of clicks, but all the performance analysis and administrative options leave a lot to be desired.
Fortunately, if we have the CMD console handy, you can always check our connection. And for this we only need to learn some basic commands.
How to Check Your Internet Connection with CMD Commands
Measuring the stability of our Internet connection is very simple and, furthermore, we do not need any additional program for this, we will do with the well-known “Ping” command .
Ping is one of the connection tools included by default in all versions of Windows. To use it, all we have to do is open a CMD window. To do this, just type “cmd” in the Cortana search bar or in the execution window that appears when using the Windows + R keyboard shortcut.
At this point type in it the command “ping” followed by the parameter -te the IP or domain we want to connect, for example: ping -t 126.96.36.199
This command will start sending packets to the Google server and returning them to our computer.
We have to leave this command running for several hours since, otherwise, we wouldn’t know if our line is truly stable. In 5 minutes it may not fail, but if it fails, it will certainly do so, for example, within 12 hours.
Once finished, we will press the keyboard shortcut ” Control + C ” and wait for CMD to show us the results. In these we can see the number of packages sent, received and lost, as well as their corresponding percentage. The better the% of packets lost, the more stable our connection will be.
If the number of lost packets is very low or zero, our connection works perfectly. If on the contrary the number of lost packets is high, we probably have some problems with the connection.
However, if you do a PING to a web address and there is no response, it means that the DNS servers are not working properly. Maybe it’s time to change them. Don’t worry, it’s a fairly common failure.
A useful command to solve DNS problems that never hurts to know is: ipconfig / flushdns
What to do if many packets are lost and our connection is unstable
If many packages are lost, the problem can be both ours and that of the company . To find out if it is ours, what we should do is, if we have connected the PC to the internet via WiFi (WiFi connections are much more unstable than cable connections), connect the computer via cable directly to the router and try again the stability of the line.
If the problem persists, the next step will be to ping a computer within the same local area network and check if the IP packets are lost. If the ping is stable within the local network then the problems come from outside.
Below is an example of tests that can be performed on a local network to verify operation and identify and isolate any errors present.
The presumed example network has the following parameters:
IP address of the main PC: 192.168.137.3
IP address of another PC on the same network: 192.168.137.5
Gateway (router or equipment in the network with Internet connection): 192.168.137.1
The addresses The Previous IPs can be known using the IPCONFIG command
1) Ping 127.0.0.1, it is the localhost address or the loopback address of our own team, if successful it shows that the TCP / IP protocol is installed and working properly. If not, you need to reinstall it.
2) Ping the PC’s IP address: ping 192.168.137.3.
If successful, show that the network card or adapter is working properly, otherwise uninstall the device and reinstall it.
3) Ping the IP address of the other computer on the network: ping 192.168.137.5
If successful, check that the physical connections between them are correct.
4) Ping the gateway’s IP address: ping 192.168.137.1
If successful, verify that there is a connection with the equipment that provides the Internet.
If there are problems with the computer on the local network, the error is ours and we must check both the router (which may be damaged) and the cables and connectors of our local network.
If, on the contrary, everything works correctly within the local network and problems occur when connecting to the Internet, then it is a problem beyond the router, and the ideal is to call the company to review and solve it.
Tracert, to find out where the problem lies: on 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’s hard to know if it’s our problem or somewhere in the middle of the net.
The tracert command traces a route from our PC to the destination server and shows all the jumps made on the connection. In this way we can find out where our connection is interrupted or where the most ping is added.
If we want to get more information about the track, then the command we should know is pathping. This command is, in broad terms, a maximized version of tracert, which will take longer to complete but, in return, will show us more complete and detailed information.
Verification of router operation
Imagine having to restart the router because you cannot access the Internet. How can we know if synchronization has already been performed and can we navigate again? Obviously, with a PING. Although in this case we will do it at a web address: ping google.it
Ipconfig, to know everything about the network card
The ipconfig command is one that any user should know. This command helps us to quickly see all the network cards installed on the computer (both physical and virtual) and the configuration of each of them. Very useful, for example, to easily know the IP of our computer.
To use this command, we simply need to type the following: ipconfig
We can see all the logical information of the network cards of our PC. In case you want to get more detailed information (such as the MAC of the Windows network card), the command we need to run is: ipconfig / all
Check all open connections with netstat
Finally, a little more advanced than the previous ones, the netstat command is one of the essential elements when it comes to checking, analyzing and diagnosing a network. This command allows us to know all the open connections on our PC, both local and remote.
Open connections are not always active, but the command helps us to see which connections are open waiting to send or receive traffic on the Internet. If we use P2P programs, for example, active connections are activated, and it is one of the reasons why the Internet connection is generally slow, because the PC is not able to manage them all at once.
Getmac, to know the MAC of our PC in a single CMD command
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.