Professional Windows Server 1002003 Security A Technical Reference [Electronic resources]

Roberta Bragg

نسخه متنی -صفحه : 415/ 314
نمايش فراداده

ipconfig

Displays the current TCP/IP settings of the local machine.

Syntax

ipconfig [/all | /release [adaptername] | [/renew [adaptername] | /flushdns 
| /displaydns | /registerdns | /showclassid adaptername | /setclassid 
adaptername [newclassID]]

Options

None

Displays the IP address, subnet mask, and default gateway for each interface on the machine.

/all

Yields verbose output showing additional TCP/IP settings.

/release [adaptername]

Releases an IP address acquired using DHCP. On a multihomed machine, specify an adapter name using the name that appears for the adapter when you type ipconfig without parameters.

/renew [adaptername]

Requests a new IP address from a DHCP server (available only when the computer is configured as a DHCP client)

/displaydns

Displays the contents of the local DNS name cache on the client. When DNS resolves a DNS name into an IP address, the results are temporarily cached.

/flushdns

Flushes the list of locally cached DNS names on the client. Flushing the cache removes these mappings and can be useful when troubleshooting DNS-related problems. Flushing the DNS cache on the client doesn't remove mappings that have been preloaded from the local

Hosts file. (You must remove these mappings from the

Hosts file to do this.)

/registerdns

Causes the client to reregister its hostname with DNS servers without restarting the client machine. This may also be used with Dynamic DNS.

/showclassid

adaptername

Displays all the DHCP class IDs allowed for the adapter. WS2003 DHCP clients support DHCP class options that can be viewed using this command and configured using ipconfig /setclassid.

/setclassid adaptername [newclassID]

Changes the DHCP class ID for the adapter.

Examples

Display summary of TCP/IP settings on local machine:

ipconfig
Windows IP Configuration
Ethernet adapter Local Area Connection:
Connection-specific DNS Suffix  . :
IP Address. . . . . . . . . . . . : 172.16.11.105
Subnet Mask . . . . . . . . . . . : 255.255.255.0
IP Address. . . . . . . . . . . . : 172.16.11.104
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 172.16.11.196

Display full details:

ipconfig /all
Windows IP Configuration
Host Name . . . . . . . . . . . . : test
Primary DNS Suffix  . . . . . . . : mtitcanada.com
Node Type . . . . . . . . . . . . : Hybrid
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
DNS Suffix Search List. . . . . . : mtitcanada.com
Ethernet adapter Local Area Connection:
Connection-specific DNS Suffix  . :
Description . . . . . . . . . . . : Realtek 
RTL8029(AS) PCI Ethernet Adapter
Physical Address. . . . . . . . . : 00-00-B4-A0-47-74
DHCP Enabled. . . . . . . . . . . : No
IP Address. . . . . . . . . . . . : 172.16.11.105
Subnet Mask . . . . . . . . . . . : 255.255.255.0
IP Address. . . . . . . . . . . . : 172.16.11.104
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 172.16.11.196
DNS Servers . . . . . . . . . . . : 172.16.11.104
172.16.11.100

Display contents of client DNS name cache:

ipconfig /displaydns
Windows IP Configuration
localhost.
--------------------------------------------------
Record Name . . . . . : localhost
Record Type . . . . . : 1
Time To Live  . . . . : 31338848
Data Length . . . . . : 4
Section . . . . . . . : Answer
A (Host) Record . . . :
127.0.0.1
1.0.0.127.in-addr.arpa.
--------------------------------------------------
Record Name . . . . . : 1.0.0.127.in-addr.arpa
Record Type . . . . . : 12
Time To Live  . . . . : 31338847
Data Length . . . . . : 4
Section . . . . . . . : Answer
PTR Record  . . . . . :
localhost
bach.mtitworld.com.
--------------------------------------------------
Record Name . . . . . : bach.mtitworld.com
Record Type . . . . . : 1
Time To Live  . . . . : 261
Data Length . . . . . : 4
Section . . . . . . . : Answer
A (Host) Record . . . :
172.16.11.100
test.mtitcanada.com.
--------------------------------------------------
Record Name . . . . . : test.mtitcanada.com
Record Type . . . . . : 1
Time To Live  . . . . : 2665
Data Length . . . . . : 4
Section . . . . . . . : Answer
A (Host) Record . . . :
172.16.11.104
Record Name . . . . . : test.mtitcanada.com
Record Type . . . . . : 1
Time To Live  . . . . : 2665
Data Length . . . . . : 4
Section . . . . . . . : Answer
A (Host) Record . . . :
172.16.11.105

Flush client DNS name cache:

ipconfig /flushdns
Windows IP Configuration
Successfully flushed the DNS Resolver Cache.

Verify that client DNS name cache has been flushed:

ipconfig /displaydns
Windows IP Configuration
localhost.
--------------------------------------------------
Record Name . . . . . : localhost
Record Type . . . . . : 1
Time To Live  . . . . : 31338835
Data Length . . . . . : 4
Section . . . . . . . : Answer
A (Host) Record . . . :
127.0.0.1

Note the mapping that remains in the cache. This is preloaded from the

Hosts file on the client.

Reregister client's DNS information with DNS server:

ipconfig /registerdns
Windows 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.

Display DHCP class IDs for the client on the "Local-Area Connection" adapter:

ipconfig showclassid "Local Area Connection"
Windows IP Configuration
DHCP Class ID for Adapter "Local Area Connection":
DHCP ClassID Name . . . . . . . . : Default BOOTP Class
DHCP ClassID Description  . . . . : User class for BOOTP Clients

Notes

The DNS name cache in WS2003 also supports negative caching of unresolved or invalid DNS names. However, these negative DNS responses are cached for only a short period of time.

See Also

DNS , ping,

TCP/IP