ipconfig Commmand


ipconfig Commmand

The ipconfig command is used by Windows clients and servers to display current TCP/IP network configuration parameter values. Windows 95 and 98 clients use a similar command called winipcfg . The command can be used on systems running DHCP to determine the TCP/IP configuration values that have been configured by DHCP (Dynamic Host Configuration Protocol). Here are the syntaxes for the commands:

 C:\>  ipconfig /?  USAGE:    ipconfig [/?  /all  /release [adapter]  /renew [adapter]              /flushdns  /registerdns              /showclassid adapter              /setclassid adapter [classidtoset] ]    adapter    Full name or pattern with '*' and '?' to 'match',               * matches any character, ? matches one character.    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 /all syntax shows all parameters configured on the device. If this switch is not used, only the IP address, subnet mask, and default gateway are displayed. In the output that follows , I added the more syntax which allows the output to be displayed one page at a time.

 C:\>  ipconfig /all  more  Windows 2000 IP Configuration   Host Name . . . . . . . . . . . . : Laptop101009   Primary DNS Suffix  . . . . . . . :   Node Type . . . . . . . . . . . . : Hybrid   IP Routing Enabled. . . . . . . . : No   WINS Proxy Enabled. . . . . . . . : No Ethernet adapter Local Area Connection 2:   Connection-specific DNS Suffix  . :   Description . . . . . . . . . . . : Sierra Wireless GPRS Adapter   Physical Address. . . . . . . . . : 00-A0-D5-FF-FF-83   DHCP Enabled. . . . . . . . . . . : Yes   Autoconfiguration Enabled . . . . : Yes   IP Address. . . . . . . . . . . . : 10.88.72.78   Subnet Mask . . . . . . . . . . . : 255.0.0.0   Default Gateway . . . . . . . . . : 10.88.72.254   DHCP Server . . . . . . . . . . . : 10.88.72.253   DNS Servers . . . . . . . . . . . : 10.250.1.10   Primary WINS Server . . . . . . . : 10.1.2.1   Secondary WINS Server . . . . . . : 10.2.2.3   Lease Obtained. . . . . . . . . . : Monday, April 21, 2003 8:19:09 PM   Lease Expires . . . . . . . . . . : Thursday, April 24, 2003 8:19:09 PM Ethernet adapter Local Area Connection:   Media State . . . . . . . . . . . : Cable Disconnected   Description . . . . . . . . . . . : Intel(R) PRO/100 VE Network Connection   Physical Address. . . . . . . . . : 00-08-02-63-D4-54 C:\> 

The output shown next uses the /renew syntax. This syntax reloads the DHCP configuration parameters and can only be used on devices using DHCP:

 C:\>  ipconfig /renew  Windows 2000 IP Configuration Ethernet adapter Local Area Connection 5:         Connection-specific DNS Suffix  . : gateway.2wire.net         IP Address. . . . . . . . . . . . : 172.16.1.33         Subnet Mask . . . . . . . . . . . : 255.255.0.0         Default Gateway . . . . . . . . . : 172.16.0.1 Ethernet adapter Local Area Connection:         Media State . . . . . . . . . . . : Cable Disconnected C:\> 

The /release syntax releases the current DHCP configuration for DHCP clients. You can use this syntax to force the client to give up an address that you want to assign to another adapter:

 C:\>  ipconfig /release  Windows 2000 IP Configuration IP address successfully released for adapter "Local Area Connection 5" C:\> 

The /flushdns syntax clears the local DNS cache of all the entries, as shown here:

 C:\>  ipconfig /flushdns  Windows 2000 IP Configuration  Successfully flushed the DNS Resolver Cache.        /registerdns Refreshes all DHCP leases and re-registers DNS names 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.        /displaydns  Display the contents of the DNS Resolver Cache. 

The /registerdns syntax initiates a client registration with all the DNS servers configured on each interface. This forces the client to reregister with the DNS servers, guaranteeing updated and current DNS information. Failures will be reported to the Windows Event Viewer fifteen minutes after the registration attempt. Here is the syntax:

 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. C:\> 

The /displaydns syntax displays the records in the local DNS currently in the DNS cache:

 C:\>  ipconfig /displaydns  Windows 2000 IP Configuration    localhost.      Record Name . . . . . : localhost      Record Type . . . . . : 1      Time To Live  . . . . : 31530398      Data Length . . . . . : 4      Section . . . . . . . : Answer      A (Host) Record . . . :                        127.0.0.1    ns2.cwie.net.      Record Name . . . . . : ns2.cwie.net      Record Type . . . . . : 1      Time To Live  . . . . : 86394      Data Length . . . . . : 4      Section . . . . . . . : Answer      A (Host) Record . . . :                        64.38.192.11    1.0.0.127.in-addr.arpa.      Record Name . . . . . : 1.0.0.127.in-addr.arpa      Record Type . . . . . : 12      Time To Live  . . . . : 31530398      Data Length . . . . . : 4      Section . . . . . . . : Answer      PTR Record  . . . . . :      localhost   digitalcrawlspaces.com.      Record Name . . . . . : digitalcrawlspaces.com      Record Type . . . . . : 1      Time To Live  . . . . : 86394      Data Length . . . . . : 4      Section . . . . . . . : Answer      A (Host) Record . . . :                        64.38.192.188 

The /showclassid syntax lists the allowable DHCP class IDs for the adapter. The DHCP class ID string identifies the DHCP client as a member of a specific user or vendor options class when it obtains its address lease from the DHCP server. You can use an asterisk to see the DHCP class ID for all the host's configured adapters as shown here:

 C:\>  ipconfig /showclassid *  Windows 2000 IP Configuration DHCP Class ID for Adapter "Local Area Connection":  DHCP ClassID Name . . . . . . . . : Default Routing and Remote Access Class  DHCP ClassID Description  . . . . : User class for remote access clients  DHCP ClassID Name . . . . . . . . : Default BOOTP Class  DHCP ClassID Description  . . . . : User class for BOOTP Clients There are no DHCP classes for adapter {CAB41D6B-41A7-40DE-AA45-4DF9CE172AD7} C:\> 

The /setclassid syntax can be used to modify the DHCP class ID on a configured adapter. You can set the DHCP class ID for all the configured adapters by using the asterisk in place of the network adapter name. This parameter is available only on computers with adapters that are configured to obtain an IP address by DHCP. In this output, I am setting the wireless adapter called Connection 5 to the Class ID of Test:

 C:\>  ipconfig /setclassid "Local Area Connection 5" TEST  Windows 2000 IP Configuration    DHCP ClassId successfully modified for adapter "Local Area Connection 5" C:\> 

After setting the adapter, I can use the ipconfig command to verify the setting has taken place:

 C:\>  ipconfig  Windows 2000 IP Configuration Ethernet adapter Local Area Connection 5:         Connection-specific DNS Suffix: digitalcrawlspaces.com         IP Address. . . . . . . . . . . . : 10.1.2.173         Subnet Mask . . . . . . . . . . . : 255.255.0.0         Default Gateway . . . . . . . . . : 10.1.1.1         DHCP Class ID . . . . . . . . . . : TEST 

The ipconfig command is one of the most powerful tools in diagnosing local client configuration and hardware problems. The most common syntax you will use is /all , which displays all the configuration information for the local NIC cards. Don't forget that you need to use this command at a DOS prompt. To help view the information, you should use the all syntax, which allows you to view the output one full screen at a time.



CCNP CIT Exam Cram 2 (642-831)
CCNP CIT Exam Cram 2 (Exam Cram 642-831)
ISBN: 0789730219
EAN: 2147483647
Year: 2003
Pages: 213
Authors: Sean Odom

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net