Section 96. About Command-Line Tools

96. About Command-Line Tools

Open Connection Properties and Enable Clients, Protocols, and Services

Add a Network Client or Service

Configure TCP/IP Settings

Use Command-Line Tools

It is essential that computers on the WiFi network be properly configured for the TCP/IP protocol. Because most WiFi routers can also act as DHCP servers, you should definitely configure all the computers on the WiFi network to receive their TCP/IP configuration from the router (this includes IP addresses and subnet masks). There are three TCP/IP-related command-line tools you can use to quickly check the TCP/IP configuration of a computer, check the connection between two devices (such as between two computers or between a computer and your WiFi router), and trace the route that packets take when sent from a computer to a particular destination (meaning a particular IP address). These commands are

Ipconfig: A command-line tool that can be used to quickly check the IP configuration. The ipconfig command can be used with different switches to show additional IP configuration information. The command can also be used to release and renew the current IP settings. Some of the different switches you can use with the ipconfig command are as follows:

Command Description

ipconfig

By itself, the ipconfig command shows the DNS suffix (the domain), IP address, subnet mask, and default gateway from the computer.

Ipconfig/all

Shows the information provided by the ipconfig command (without the switch), the MAC address of the Ethernet adapter, whether the adapter is configured for DHCP and autoconfiguration, the DHCP server for the computer, the DNS servers for the computer, when the IP lease was obtained, and when the IP lease expires.

Ipconfig/release

Releases (meaning removes) all the IP settings for the adapter.

Ipconfig/renew

Causes the adapter to send out a request to the DHCP server for a renewal of the IP settings.

Ping: An excellent way to check the connection between two computers or other devices on an IP network is to use the ping command. Ping stands for Packet InterNet Gopher and uses echo packets to test the connection. The command syntax is pingip address, where ip address is the IP address of the target device. The ping command can also be used with the DNS name (the Fully Qualified Domain NameFQDN) of a device such as mycomputer.localdomain.com.

Tracert: The traceroute command (tracert on a Windows XP computer) sends data packets to a specified IP address or DNS name. The command is useful in that it shows you how many hops it takes for the data to move from source to destination. Because you have only one WiFi router as the central connecting point on the internal network, tracert should show only one hop from source to destination. The tracert command can also be used to determine how many hops (or routers) are involved when you attempt to connect to a remote network destination such as an IP address on the Internet.

So, in a nutshell, ipconfig allows you to view (and renew, if necessary) the current IP configuration for a network adapter (including WiFi network adapters). The ping command allows you to see whether you can connect to a device on the network; for example, you could ping your router's LAN interface if you are having a connection issue. The tracert command allows you to view the actual path the data takes; you can use that information to determine whether there is a connectivity issue on the network.

Note

You will find that ipconfig and ping are useful on small networks to help you troubleshoot connectivity problems. The tracert command is also useful, however, although because you have only a single router on your network, it doesn't necessarily provide you with a look at how data is being routed or rerouted on a network. Tracert is actually more useful on larger networks that have multiple routers. The command can then be used to determine whether a particular router is down and how data is being redirected to bypass the malfunctioning router.