Networking

The ipconfig Command

The ipconfig command is a technician's best friend when it comes to viewing the TCP/IP configuration of a Windows system. Used on its own, the ipconfig command shows basic information such as the name of the network interface, the IP address, the subnet mask, and the default gateway. Combined with the /all switch, it shows a detailed set of information, as you can see in the following example:

C:\>ipconfig /all
Windows 2000 IP Configuration
   Host Name . . . . . . . . . . . . : server
   Primary DNS Suffix  . . . . . . . : write
   Node Type . . . . . . . . . . . . : Broadcast
   IP Routing Enabled. . . . . . . . : Yes
   WINS Proxy Enabled. . . . . . . . : No
   DNS Suffix Search List. . . . . . : write
                                       ok.anyotherhost.net
Ethernet adapter Local Area Connection:
Connection-specific DNS Suffix  . : ok.anyotherhost.net
Description . . . . . . . . . . . : D-Link DFE-530TX PCI Fast Ethernet
Physical Address. . . . . . . . . : 00-80-C8-E3-4C-BD
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
IP Address. . . . . . . . . . . . : 24.67.184.65
Subnet Mask . . . . . . . . . . . : 255.255.254.0
Default Gateway . . . . . . . . . : 24.67.184.1
DHCP Server . . . . . . . . . . . : 24.67.253.195
DNS Servers . . . . . . . . . . . : 24.67.253.195
                                    24.67.253.212
Lease Obtained.. . . . : Thursday, February 07, 2002 3:42:00 AM
Lease Expires .. . . . : Saturday, February 09, 2002 3:42:00 AM

As you can imagine, you can use the output from an ipconfig /all command in a massive range of troubleshooting scenarios. Table 7 lists some of the most common troubleshooting symptoms, along with where to look for clues about solving them in the ipconfig /all output.

Table 7 Common Troubleshooting Symptoms That ipconfig Can Help Solve

Symptom

Field to Check in ipconfig Output

User is unable to connect to any other system.

Make sure the TCP/IP address and subnet mask are correct. If the network uses DHCP, make sure DHCP is enabled.

User is able to connect to another system on the same subnet but is not not able to connect to a remote system.

Make sure the default gateway is correctly configured.

User is unable to browse the Internet.

Make sure the DNS server parameters are configured correctly.

User is unable to browse across remote subnets.

Make sure the WINS or DNS server parameters are configured correctly, if applicable.


Using the /all switch might be far and away the most popular, but there are a few others. These include the switches listed in Table 8.

Table 8 ipconfig Switches

Switch

Description

?

Displays the ipconfig help screen

/all

Displays additional IP configuration information

/release

Releases the IP address of the specified adapter

/renew

Renews the IP address of a specified adapter