How to use IPCONFIG MS-DOS command

  • "ipconfig" is a command used in MS-DOS.
  • It is very useful command to display and manage the network settings of a computer.
  • It show information about IP configurations.
  • This command is available on Windows 95, Windows 98, ME, NT, 2000, XP and Windows Vista Operating Systems.
  • On Windows 9x machines, a graphical tools such as "winipconfig" or "winipcfg" may be used instead.
  • On Linux machine, the "ifconfig" command performs equivalent function.
C:\> ipconfig /? USAGE: ipconfig [/? | /all | /renew [adapter] | /release [adapter] | /flushdns | /displaydns | /registerdns | /showclassid adapter | /setclassid adapter [classid] ] where adapter Connection name (wildcard characters * and ? allowed, see examples) Options: /? Display this help message /all Display full configuration information. /release Release the IP address for the specified adapter. /renew Renew the IP address for the specified adapter. /flushdns Purges the DNS Resolver cache. /registerdns Refreshes all DHCP leases and re-registers DNS names /displaydns Display the contents of the DNS Resolver Cache. /showclassid Displays all the dhcp class IDs allowed for adapter. /setclassid Modifies the dhcp class id. The default is to display only the IP address, subnet mask and default gateway for each adapter bound to TCP/IP. For Release and Renew, if no adapter name is specified, then the IP address leases for all adapters bound to TCP/IP will be released or renewed. For Setclassid, if no ClassId is specified, then the ClassId is removed. Examples: > ipconfig ... Show information. > ipconfig /all ... Show detailed information > ipconfig /renew ... renew all adapters > ipconfig /renew EL* ... renew any connection that has its name starting with EL > ipconfig /release *Con* ... release all matching connections, eg. "Local Area Connection 1" or "Local Area Connection 2" C:\>ipconfig /all Windows IP Configuration Host Name . . . . . . . . . . . . : NetworksHeaven Primary Dns Suffix . . . . . . . : Node Type . . . . . . . . . . . . : Hybrid IP Routing Enabled. . . . . . . . : No WINS Proxy Enabled. . . . . . . . : No Ethernet adapter Wireless Network Connection: Connection-specific DNS Suffix . : Description . . . . . . . . . . . : Intel(R) PRO/Wireless LAN 2100 3B Mini PCI Adapter Physical Address. . . . . . . . . : 00-0C-F1-65-5B-70 Dhcp Enabled. . . . . . . . . . . : Yes Autoconfiguration Enabled . . . . : Yes IP Address. . . . . . . . . . . . : 192.168.1.100 Subnet Mask . . . . . . . . . . . : 255.255.255.0 Default Gateway . . . . . . . . . : 192.168.1.1 DHCP Server . . . . . . . . . . . : 192.168.1.1 DNS Servers . . . . . . . . . . . : 192.168.1.1 Lease Obtained. . . . . . . . . . : Thursday, February 08, 2007 2:27:17 PM Lease Expires . . . . . . . . . . : Thursday, February 15, 2007 2:27:17 PM Ethernet adapter Local Area Connection: Media State . . . . . . . . . . . : Media disconnected Description . . . . . . . . . . . : Intel(R) PRO/1000 MT Mobile Connection Physical Address. . . . . . . . . : 00-0D-60-FB-4E-E9

The command output displays all adapters by name that are available on your computer: e.g. "Local Area Connection", "Wireless Network Connection".

"Ipconfig" command is most often used to diagnose network problem on a Windows machine. If you're using DHCP, you may try releasing and renewing IP address by performing "ipconfig /release" and "ipconfig /renew" commands shown below.
C:\> ipconfig /release Windows IP Configuration No operation can be performed on Local Area Connection while it has its media disconnected. Ethernet adapter Wireless Network Connection: Connection-specific DNS Suffix . : IP Address. . . . . . . . . . . . : 0.0.0.0 Subnet Mask . . . . . . . . . . . : 0.0.0.0 Default Gateway . . . . . . . . . : Ethernet adapter Local Area Connection: Media State . . . . . . . . . . . : Media disconnected C:\> ipconfig /renew Windows IP Configuration Ethernet adapter Wireless Network Connection: Connection-specific DNS Suffix . : IP Address. . . . . . . . . . . . : 192.168.1.100 Subnet Mask . . . . . . . . . . . : 255.255.255.0 Default Gateway . . . . . . . . . : 192.168.1.1

If you face problem related to DNS caching, you may want to use "ipconfig /flushdns" to clear DNS cache value on your computer. DNS uses TTL (Time-To-Live) value which let the intermediate name servers to cache DNS information. If you changed your DNS settings, and your computer doesn't see the change immediately, you may perform "ipconfig /flushdns" to clear the DNS cache.

C:\> ipconfig /flushdns Windows IP Configuration Successfully flushed the DNS Resolver Cache.