You can use several CLI commands to test network connectivity. As a technician, it is essential that you become familiar with a basic set of these commands.

Ipconfig Command Options

The ipconfig command displays basic configuration information of all network adapters. To perform specific tasks, you can add options to the ipconfig command, as shown in Figure 1.

Ping Command Options

Ping tests basic connectivity between devices. You can test your own connection by pinging your computer. To test your computer, ping your NIC. In Windows 7 and Windows Vista, select Start and type cmd. For Windows XP, select Start > Run > cmd. At the command prompt, enter ping localhost.

Try to ping other computers on the network, including the default gateway and remote computers. You can find the address for the default gateway by using the ipconfig command.

Ping a public IP address outside of your network to check if your WAN connection is working properly. You can also test the Internet connection and DNS when you ping a popular website. At the command prompt, enter ping destination_name.

The response of the ping command displays the IP address resolution of the domain. The response shows replies from the ping or that the request timed out because there is a problem.

To perform other specific tasks, you can add options to the ping command, as shown in Figure 2.

Net Commands

Use the net command to manage network computers, servers, and resources like drives and printers. Net commands use the NetBIOS protocol in Windows. These commands start, stop, and configure networking services, as shown in Figure 3.

Tracert Command

Tracert traces the route that packets take from your computer to a destination host. At the command prompt, enter tracert hostname.

The first listing in the results is your default gateway. Each listing after that is the router that packets are traveling through to reach the destination. Tracert shows you where packets are stopping, indicating where the problem is occurring. If listings show problems after the default gateway, it may mean that the problems are with the ISP, the Internet, or the destination server.

Nslookup Command

Nslookup tests and troubleshoots DNS servers. It queries the DNS server to discover IP addresses or host names. At the command prompt, enter nslookup hostname. Nslookup returns the IP address for the host name entered. A reverse nslookup command, nslookup IP_address returns the corresponding host name for the IP address entered.