This article is the second in a series of the basics of network troubleshooting. Last time, the ping command was demonstrated. Now the ipconfig command will be covered (the Linux/Mac ifconfig & route commands will be touched on too). While this is a basic tutorial, there are some advanced tips and topics included.
The Ipconfig Command Basics
The ipconfig command gets its name from the acronym IP (Internet Protocol) and a shortened term for configure. Understanding this served as a mnemonic device for me when I was first learning networking. It is used to display and configure your connection to the Internet. This tutorial will focus on the display and what that means.
Deciphering the Information
To get to ipconfig, we have to get to the command line.
You will get a screen that looks like this.
To find your router's IP number, look next to "Default Gateway" (listed last). For a mnemonic, think of the router as your gateway to the Internet or another network. To find your computers' IP number, look next to "IP Address". Do not worry about the other information like the subnet mask.
In this case, the computer number is 192.168.1.4 while 192.168.1.1 is the router number. It is common for 192.168.1.1 or 192.168.0.1 to be the router's IP address. There are a few reasons for this, which were covered in a previous article.
Ping Your Router (Default Gate)
We are using the ipconfig command so that we can get the IP number of the router. As discussed at the end of the last article on the ping command, we want to ping our router. If we can ping it, then it should be working properly.
To do this, type in ping and the router (default gateway) number as shown.
Some Possible Problems
Consider a case where the connection to the Internet seems down. If you cannot ping the router, or the ipconfig command says the default gateway is 0.0.0.0, then the problem may be in the router.
The first thing to check is whether the router is on and everything is plugged in. The next thing to try would be to either restart the computer or to try and ping the router from another computer.
From here, you may want to call your ISP's help line and let them know what you have tried. An experienced user may restart the router; I have found that mine needs this from time to time. For a beginner, it is better to get some help. You will learn from the experience.
There is a possibility that your router may be failing. That has happened to me once before. Fortunately, a friend helped me troubleshoot the device, so stay in touch with networking pals. The culprit may likely have been heat from a lack of proper ventilation. Be sure your router has proper air flow. While they may run warm, if they are hot to the touch, it may be bad for the device (check your manual or consult your manufacturer).
ipconfig Command Line Options
Ipconfig has several command line options that you can utilize. You can display all of them with the command ipconfig /?. Here is a short selection of the most common uses.
Linux & Mac Use Ifconfig & Route -n
For those running Linux or are on a Mac, the commands to use are ifconfig and route -n. Is ifconfig identical to ipconfig? No. The ifconfig command will show you your computer's IP number and other information.
You just type in the command, ifconfig, into the terminal to find out information about how your computer connects to the Internet. To get your router's IP number, you use the route command with a -n (netstat -r should work too). Both are shown in the screen shots. Make sure you use lowercase letter; the commands are case sensitive. (Side Note: Linux also has a iwconfig command for wireless specific tweaking (e.g. frequency).)
Just a note about the Mac ifconfig command. We are using it to view network settings, which is fine. In doing research for this article, I read that it is not advised to use this to change settings. From what I read, it works, but with possible complications.
We use ipconfig to find the router's IP number. Once you have that, you can ping the router to test if it is responsive. The problem with the ping command is that, while it is fast, is doesn't give you a lot of information. For that, we use the tracert command, which will be covered next.Advertisement
Ghacks is a technology news blog that was founded in 2005 by Martin Brinkmann. It has since then become one of the most popular tech news sites on the Internet with five authors and regular contributions from freelance writers.