WINIPCFG.EXE and IPCONFIG.EXE
To determine the local system's IP configuration without opening the Network Properties sheet (where accidental changes can wreck the network functionality of the system) open Start > Run and type in "winipcfg" (no quotes!) and press [Enter]. This will launch the program shown here which displays the system's IP configuration including the
hardware adapter address also known as the MAC address, IP address, subnet mask, and default gateway. If any one of these is blank then the TCP/IP stack will probably malfunction. This is the easiest way to find these four pieces of information on a Windows 9x PC:
In a Windows NT family system there is no winipcfg.exe. So you will have to open a DOS box and type in this command to get this information:
C:\WINDOWS>ipconfig /all
Windows 98 IP Configuration
Host Name . . . . . . . . . : PC01
DNS Servers . . . . . . . . :
Node Type . . . . . . . . . : Broadcast
NetBIOS Scope ID. . . . . . :
IP Routing Enabled. . . . . : No
WINS Proxy Enabled. . . . . : No
NetBIOS Resolution Uses DNS : No
0 Ethernet adapter :
Description . . . . . . . . : 3COM 3C90X Ethernet Adapter
Physical Address. . . . . . : 00-03-FF-09-55-66
DHCP Enabled. . . . . . . . : No
IP Address. . . . . . . . . : 200.200.200.200
Subnet Mask . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . : 200.200.200.200
Primary WINS Server . . . . :
Secondary WINS Server . . . :
Lease Obtained. . . . . . . :
Lease Expires . . . . . . . :
C:\WINDOWS>_
On a Windows 2000 system the available switches are slightly different and as far as the Network+ is concerned the correct answer for determining the TCP/IP configuration and the MAC address of a Windows 98 machine is to use WINIPCFG. Here are the switches and options for using IPCONFIG on a Windows 2000 system:
C:\>ipconfig /?
Windows 2000 IP Configuration
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 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 class id is specified, then the classid is removed.
Examples:
|
> ipconfig |
... |
Show information. |
|
> ipconfig /all |
... |
Show detailed information |
|
> ipconfig /renew |
... |
renew all adapaters |
|
> ipconfig /renew EL* |
... |
renew adapters named EL.... |
|
> ipconfig /release *ELINK?21* |
... |
release all matching adapters,
eg. ELINK-21, myELELINKi21adapter. |
C:\>_
Ipconfig.exe can be used to manually force a request for a new IP address from a DHCP server with the "/renew_all" switch. This is useful when testing a DHCP server. On multihomed (more than one NIC) the adapter name can be specified so that only the specified adapter will attempt a DHCP renewal from the DHCP server. To determine the adapter name use IPCONFIG with no parameters:
C:\>ipconfig
Windows 2000 IP Configuration
Ethernet adapter Local Area Connection:
Connection-specific DNS Suffix . : kendall.mdcc.edu.
IP Address. . . . . . . . . . . . : 147.70.36.48
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 147.70.36.1
C:\>_
To renew this adapter by name would then be:
C:\>ipconfig /renew "Local Area Connection"
IPCONFIG can be used to collect DNS information and save it to a file like this:
C:\>ipconfig /displaydns >> dns.txt
C:\>_
Open the file dns.txt in notepad and the cached DNS entries for any host that the system has accessed recently will have entries listing the host name and the IP address. Here are some sample entries:
zf.akadns.net.
------------------------------------------------------
Record Name . . . . . : zf.akadns.net
Record Type . . . . . : 1
Time To Live . . . . : 13326
Data Length . . . . . : 4
Section . . . . . . . : Answer
A (Host) Record . . . :
63.215.198.83
localhost.
------------------------------------------------------
Record Name . . . . . : localhost
Record Type . . . . . : 1
Time To Live . . . . : 31459653
Data Length . . . . . : 4
Section . . . . . . . : Answer
A (Host) Record . . . :
127.0.0.1
By periodically taking these snapshots and appending them to the existing file (use the command above to do this) in the event that the system loses DNS services the name of the target can be found in the file and then the dot address can be used in the address bar of the browser. When Internet Explorer recognizes a dot address as the hostname of the address in the browser it will make the HTTP request directly to that host address without needing DNS resolution.