Networking / Beginners

Checking the TCP/IP Configuration with ipconfig

ipconfig is one of the most valuable tools you have available to check and troubleshoot basic TCP/IP settings. As shown in Table-1.

As a reminder, Listings-1 and 2 show the output of the ipconfig /all command with several key items highlighted.

Listing-1 identifies several pieces of key information shown by the ipconfig /all command. The Host Name value is the name of the computer. The Primary DNS Suffix value indicates that the computer joined the network.mta domain. The Node Type of Hybrid value indicates that NetBIOS names are resolved using WINS first and then broadcast.

The NetBIOS name is created from the first 15 characters of the host name. If the first 15 characters of the host name are not unique, duplicate NetBIOS names will result.

Listing-1: ipconfig /all Windows IP configuration
C:\>ipconfig /all

Windows IP Configuration 
   Host Name . . . . . . . . . . . . : Success1  
   Primary Dns Suffix  . . . . . . . : networking.mta 
   Node Type . . . . . . . . . . . . : Hybrid 
   IP Routing Enabled. . . . . . . . : Yes 
   WINS Proxy Enabled. . . . . . . . : No 
   DNS Suffix Search List. . . . . . : networking.mta

Listing-2 shows the configuration of a network interface card (NIC) on the system. Some systems may have more than one NIC, and all of the NICs will be displayed.

Listing-2: ipconfig /all NIC data
Ethernet adapter Local Area Connection: 
   Connection-specific DNS Suffix  . : 
   Description . . . . . . . . . . . : 
          Intel 21140-Based PCI Fast Ethernet Adapter (Emulated) 
   Physical Address. . . . . . . . . : 00-03-FF-31-C4-CA 
   DHCP Enabled. . . . . . . . . . . : No 
   Autoconfiguration Enabled . . . . : Yes 
   Link-local IPv6 Address . . . . . : 
   IPv4 Address. . . . . . . . . . . : 
   Subnet Mask . . . . . . . . . . . : 
   Default Gateway . . . . . . . . . : 
   DNS Servers . . . . . . . . . . . : ::1 
   Primary WINS Server . . . . . . . : 
   NetBIOS over Tcpip. . . . . . . . : Enabled 
Tunnel adapter Local Area Connection* 8: 
   Media State . . . . . . . . . . . : Media disconnected 
   Connection-specific DNS Suffix  . : 
   Description . . . . . . . . . . . : 
   Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0 
   DHCP Enabled. . . . . . . . . . . : No 
   Autoconfiguration Enabled . . . . : Yes 

The Physical Address value shows you the media access control (MAC) address of the NIC.

If it's a DHCP client, DHCP Enabled will be listed as Yes, and you'll also see the IP address of the DHCP server as long as the client was able to get an IP address from the DHCP server. In Listing-2, DHCP Enabled is set to No, so an IP address of a DHCP server is not available.

Autoconfiguration Enabled refers to Automatic Private IP Address (APIPA), and it is Yes by default. If the system couldn't get an IP address from the DHCP server and Autoconfiguration Enabled is sent to Yes, you'll see an IPv4 address that starts with 169.254. If Autoconfiguration Enabled is set to No, then APIPA addresses are not assigned when a DHCP server can't be reached.

An IP address starting with 169.254 in a network with DCHP should send alarm bells ringing in your head. The client is unable to get a DHCP address.

A link-local IPv6 address always starts with fe80 and indicates that an IPv6 address isn't assigned, but IPv6 is enabled.

You can use the subnet mask with the IPv4 address to determine the network ID. In Listing-2, the IP address of and a subnet mask of indicates a network ID of The network ID must be the same as other hosts on the subnetwork, including the default gateway. The default gateway and the IPv4 address share the same subnet mask.

The address of the Domain Name System (DNS) server is needed for most host name resolution. In Listing-2, the same computer is the DNS server. You can tell this from the IPv6 loopback address (::1) and the same IPv4 address ( that is assigned to the computer. If the DNS server address information is misconfigured, you'll probably experience problems with name resolution.

The "Troubleshooting Connectivity with ping" section shows how to use ping to verify name resolution is working.

A Windows Internet Naming Server (WINS) server resolves NetBIOS names. If the network includes a WINS server, the computer configuration should include the IP address in the Primary WINS server section.

If you have a NIC but it isn't connected, it will be listed as follows:

Media State . . . . . . . . . . . : Media disconnected

This is an obvious sign that the cable isn't connected. If it does have a cable connected, check the link and activity lights on the NIC. If there are lights lit but the Media State indicates disconnected, check the cabling to ensure the following:

Ethernet NICs have LED lights to indicate they are connected and have activity. Some have a single LED, and others have two LEDs.

  • The cable is seated completely in the NIC.
  • The cable is seated completely in the wall jack.
  • The cable is seated completely in the switch port (the switch will usually be in a separate room).
  • Each of the cables is wired correctly.
  • The cables are not bent excessively (beyond tolerance) when installing.

One of the simplest ways to check the wiring is to identify a known good path to the switch and use it. For example, if another computer is working, unplug the cable from that computer, and plug it into the computer you're troubleshooting. If the problem computer now works, you know it's the wiring. If it doesn't work, you know the problem is internal to the computer, and you may need to replace the NIC.

Before replacing hardware, you should always reboot the system first. It's a simple step and cures many ills.

Although the ipconfig /all command is very valuable, the ipconfig command has other switches you can use. Table-2 shows these other commands with some comments.

Table-2 Important ipconfig commands
Command and switchComments
ipconfig /release
ipconfig /release6
Releases an IPv4 lease (or an IPv6 lease with release6) obtained from a DHCP server. This doesn't have any effect if a system has a statically assigned IP address instead of a DHCP-assigned IP address.
ipconfig /renew
ipconfig /renew6
Renews the IPv4 lease process (or IPv6 lease process with renew6) from a DHCP server.
ipconfig /displaydnsDisplays host cache (includes names from hosts file and names resolved from a DNS server). This is useful to determine whether a name is in cache with a specific IP address.
ipconfig /flushdnsRemove items from host cache (removes items resolved from a DNS server but not items placed in cache from the hosts file).
ipconfig /registerdnsRegisters the computer's name and IP address with a DNS server. This creates a host (A) record on the DNS server so that the DNS server can resolve the IP address for other computers.

The ipconfig /registerdns command will work in a Microsoft domain using a DNS server. It will not create a record on an Internet DNS server from a home computer.

Here's one way you can use the /displaydns and /flushdns switches. Suppose you are troubleshooting a problem where you can't connect to another computer. You know that the remote computer's IP address is However, when you use ipconfig /displaydns, it shows the remote computer with a different IP address of

Use ipconfig /flushdns This should remove it from cache. If you enter ipconfig /displaydns but the faulty address is still in cache, it indicates it's in cache from the hosts file (not from DNS).

Try to Connect Again If the ipconfig/flushdns command removed the entry from cache, try to connect to the remote computer again. If it's successful, the problem is resolved. If not, use ipconfig /displaydns to see what address is displayed. If it's still not the correct address ( instead of, then DNS is giving the wrong address for the computer. In other words, the problem is with DNS.

Use ipconfig /registerdns Go to the remote computer that you can't connect to, and enter ipconfig /registerdns. This should correct the record in DNS.

Flush DNS and Try Again Go back to the original computer, and enter ipconfig /flushdns to remove the cache entries. Try to connect again, and it should be successful. If not, check the cache with ipconfig /displaydns. If it shows the wrong address ( instead of, you need to let the DNS administrator know.

[Previous] [Contents] [Next]