Network Troubleshooting Basics: The Ipconfig Command

Ryan D. Lang
May 17, 2011
Updated • Mar 13, 2018
Network
|
18

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.

  • Click Start, click Run, type in "cmd" & hit enter.
  • Type in ipconfig & hit enter. (you can use ipconfig /all for detailed information)

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.

ping router

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.

  • ipconfig /release - Releases all IPv4 addresses (requires DHCP)
  • ipconfig /renew - Renews all IPv4 addresses (requires DHCP)
  • ipconfig /flushdns - Flushes the DNS cache

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).)

ifconfig

route

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.

Closing

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.

Summary
Network Troubleshooting Basics: The Ipconfig Command
Article Name
Network Troubleshooting Basics: The Ipconfig Command
Description
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).
Author
Publisher
Ghacks Technology News
Logo
Advertisement

Previous Post: «
Next Post: «

Comments

  1. Raghavan said on August 17, 2017 at 9:24 am
    Reply

    Hi Team,

    First time i used above commands and laptop connected with network. But second time i facing the same issue and i used same commands but not working. Please help me on this issue

  2. Anonymous said on July 24, 2012 at 1:20 pm
    Reply

    what is ipconfig command used?

  3. Keith said on May 17, 2011 at 3:26 pm
    Reply

    Thanks for the quick refresher. I appreciate it when sites like yours that revisit basic computer management. I am surprised how many tech workers don’t know the basics. Keep them coming!

    1. Ryan D. Lang said on May 17, 2011 at 8:26 pm
      Reply

      Thanks for the positive feedback. It’s encouraging and appreciated.

  4. Dave Hansel said on May 17, 2011 at 2:28 pm
    Reply

    “While this is a basic tutorial, there are some advanced tips and topics included.”

    Good tutorial for beginners; however, our definitions of the word “advanced” vary greatly.

    1. Ryan D. Lang said on May 17, 2011 at 8:21 pm
      Reply

      Fair enough. That said, a lot of people don’t know their way around the Linux and Mac terminal. Advanced might be too strong of a word for this one, but have a look at the ping article. That touched on ICMP.

      I’ll make sure not to disappoint on the next article. 8)

  5. Brian said on May 17, 2011 at 2:12 pm
    Reply

    Also worth noting is a Windows computer set for DHCP will assign itself an address of 169.154.x.x if it can’t get an address. Typically, if you see an address in this range when you do an ipconfig you have a problem and you are not on the network, Internet, etc. even though you technically have an IP address.

    1. Ryan D. Lang said on May 17, 2011 at 8:23 pm
      Reply

      I didn’t know that. Thanks for the useful tip. I’ll make a note of it.

Leave a Reply

Check the box to consent to your data being stored in line with the guidelines set out in our privacy policy

We love comments and welcome thoughtful and civilized discussion. Rudeness and personal attacks will not be tolerated. Please stay on-topic.
Please note that your comment may not appear immediately after you post it.