Section 3.8: Testing IP Connections

The iPConfig utility is a command-line utility that can be used to display the TCP/IP configuration of your computer. This information can be used to verify that the client computer has received a valid IP configuration from DHCP. It can also display the IP configuration, and parameters for the network connection on your computer. This information can be used to verify that the client computer is configured with the correct WINS and/or DNS server IP addresses.

Table 3.3: IPConfig Switches

Switch Function
/all Displays the configuration all network interfaces.
/release Releases the IP address for a specified network adapter card.
/renew Renew the IP address for the specified network adapter card.
/flushdns Clears all entries from the DNS Resolver Cache on the local computer.
/registerdns Renews the local computer's DHCP lease and reregisters DNS names.
/displaydns Displays the contents of the DNS Resolver Cache on the local computer.
/showclassid adapter Displays all the DHCP class IDs allowed for the specified network adapter card.
/setclassid adapter Modifies the DHCP class ID for the specified network adapter card
/? Displays a list of all the IPConfig switches and their functions

Note: DNS clients cache the name resolution information it receives from DNS responses to its name resolution queries and uses this information to resolve future queries locally. When a query cannot be resolved locally, the client sends the query to the DNS server. However, when a server or remote host renews its IP address lease in DHCP, the local client computer will not hold the correct information in cache and will thus resolving names incorrectly. In this event you can use the /flushdns switch of the IPConfig utility to clear the cache on the local client computer.

3.8.2: Using the ping Utility

The ping utility is another command-line utility that ca be used to test low-level communication over IP to another host on the network in the form of an echo request. If the ping utility fails, it returns an error message. You can receive various messages when you use the ping utility:

Table 3.4: Ping Errors

Error Message Problem
Destination host unreachable There is an IP routing problem between your computer and the remote host
Unknown host hostname None of the client's name resolution mechanisms recognize the name that you typed - check that you typed the host name correctly
Request timed out The name resolution mechanisms have recognized the name, but the remote host did not receive the request or did not respond to it - check connectivity to the remote host
3.8.3: Using the tracert Utility

The tracert utility is similar to the ping utility, except that it reports back from each router on the path from your client computer to the remote host. If you know the network topology in your organization, you can determine which router is unresponsive or slow.

3.8.4: Using the net and nbtstat Utilities

The net command can be used to view the computer's network settings. The Net config workstation command is a net command that is used for testing NetBIOS name resolution. The Net config workstation command reports the NetBIOS name and the domain name of the computer while the nbtstat command is used to check the state of current NetBIOS over TCP/IP connections, to update the Lmhosts cache, and to determine your registered name. This command can also be used to troubleshoot and preload the NetBIOS name cache.

Table 3.5: Nbstat Commands

Command Description
nbtstat -n Lists the NetBIOS names registered by the client
nbtstat -c Displays the NetBIOS name cache
nbtstat -R Manually reloads the NetBIOS name cache by using entries in the Lmhosts file with a #PRE parameter
nbtstat /? List all the nbstat commands