Ipconfig
From Wikipedia, the free encyclopedia
- The correct title of this article is ipconfig. The initial letter is shown capitalized due to technical restrictions.
ipconfig in Windows is a wrapper for the command line utility to print the local computer's network current configuration and to control the Windows Service that acts as its DHCP Client. Similar GUI tools named winipcfg & wntipcfg also exist. The former pre-dates ipconfig.
ipconfig in Mac OS X serves as a wrapper to the IPConfiguration agent, and can be used to control the BootP and DHCP client from the command line interface. Like most UNIX-based operating systems, Mac OS X also uses ifconfig for more direct control over network interfaces, such as configuring static IP addresses.
Contents |
[edit] Available command-line switches in Windows
/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.
[edit] Sample output in Windows
[edit] Show connection status
C:\>ipconfig /all Windows 2000 IP Configuration Host Name . . . . . . . . . . . . : wikipedia Primary DNS Suffix . . . . . . . : Node Type . . . . . . . . . . . . : Hybrid IP Routing Enabled. . . . . . . . : No WINS Proxy Enabled. . . . . . . . : No DNS Suffix Search List. . . . . . : wikipedia.org Ethernet adapter Local Area Connection 2: Connection-specific DNS Suffix . : wikipedia.org Description . . . . . . . . . . . : Intel(R) PRO/100 VE Netwon #3 Physical Address. . . . . . . . . : 00-D0-B7-A6-F1-11 DHCP Enabled. . . . . . . . . . . : Yes Autoconfiguration Enabled . . . . : Yes IP Address. . . . . . . . . . . . : 192.168.0.100 Subnet Mask . . . . . . . . . . . : 255.255.0.0 Default Gateway . . . . . . . . . : 192.168.0.3 DHCP Server . . . . . . . . . . . : 192.168.0.1 DNS Servers . . . . . . . . . . . : 192.168.0.1 Primary WINS Server . . . . . . . : 192.168.0.75 Lease Obtained. . . . . . . . . . : 27 May 2004 09:04:06 Lease Expires . . . . . . . . . . : 30 May 2004 09:04:06
[edit] Release and Renew DHCP lease
C:\>ipconfig /release Windows 2000 IP Configuration IP address successfully released for adapter "Local Area Connection 2"
C:\>ipconfig /renew Windows 2000 IP Configuration Ethernet adapter Local Area Connection 2: Connection-specific DNS Suffix . : wikipedia.org IP Address. . . . . . . . . . . . : 192.168.0.100 Subnet Mask . . . . . . . . . . . : 255.255.0.0 Default Gateway . . . . . . . . . : 192.168.0.1
[edit] Flushing the DNS cache
C:\>ipconfig /flushdns Windows 2000 IP Configuration Successfully flushed the DNS Resolver Cache.
[edit] Registering DNS resource records
C:\>ipconfig /registerdns Windows 2000 IP Configuration Registration of the DNS resource records for all adapters of this computer has been initiated. Any errors will be reported in the Event Viewer in 15 minutes.