Each TCP/IP host is identified by a logical IP address that identifies a computer's location on the network in much the same way as a street address identifies a house on a street. Microsoft's implementation of TCP/IP enables a TCP/IP host to use a static IP address or to obtain an IP address automatically from a Dynamic Host Configuration Protocol (DHCP) server. For simple network configurations based on local area networks (LANs), it supports automatic assignment of IP addresses. Windows XP Professional includes tools that you can use to troubleshoot TCP/IP and test connectivity.
Each IP address consists of a network ID and a host ID. The network ID, also known as the network address, identifies the systems that are located on the same physical network. All computers in the same physical network must have the same network ID, and the network ID must be unique to the internetwork. The host ID, also known as the host address, identifies each TCP/IP host within a network.
IP addresses are logical 32-bit numbers that are broken down into four 8-bit fields known as octets. Microsoft TCP/IP supports class A, B, and C addresses. The class addresses define which bits are used for the network ID and which bits are used for the host ID. Table 4.4 summarizes class A, B, and C IP addresses.
Table 4.4??Class A, B, and C IP Addresses
By default, client computers, for example those running Windows XP Professional, Windows 2000, Windows Me, Windows NT, Microsoft Windows 98, or Microsoft Windows 95, obtain TCP/IP configuration information automatically from the DHCP Service. However, even in a DHCP-enabled environment, you should assign a static IP address to selected network computers. For example, the computer running the DHCP Service cannot be a DHCP client, so it must have a static IP address. If the DHCP Service is not available, you can also configure TCP/IP to use a static IP address. For each network adapter card that uses TCP/IP in a computer, you can configure an IP address, subnet mask, and default gateway, as shown in Figure 4.2.
Table 4.5 describes the options used in configuring a static TCP/IP address.
Table 4.5??Options for Configuring a Static TCP/IP Address
Option | Description |
---|---|
IP address |
A logical 32-bit address that identifies a TCP/IP host. Each network adapter card in a computer running TCP/IP requires a unique IP address, such as 192.168.0.108. Each address has two parts: a network ID, which identifies all hosts on the same physical network, and a host ID, which identifies a host on the network. In this example, the network ID is 192.168.0, and the host ID is 108. |
Subnet mask |
Subnets divide a large network into multiple physical networks connected with routers. A subnet mask blocks out part of the IP address so that TCP/IP can distinguish the network ID from the host ID. When TCP/IP hosts try to communicate, the subnet mask determines whether the destination host is on a local or remote network. To communicate on a local network, computers must have the same subnet mask. |
Default gateway |
The intermediate device on a local network that stores network IDs of other networks in the enterprise or Internet. To communicate with a host on another network, configure an IP address for the default gateway. TCP/IP sends packets for remote networks to the default gateway (if no other route is configured), which then forwards the packets to other gateways until the packet is delivered to a gateway connected to the specified destination. |
If a server running the DHCP Service is available on the network, it can automatically assign TCP/IP configuration information to the DHCP client, as shown in Figure 4.3. You can then configure any clients running Windows XP Professional, Windows 95, and Windows 98 to obtain TCP/IP configuration information automatically from the DHCP Service. This can simplify administration and ensure correct configuration information.
You can use the DHCP Service to provide clients with TCP/IP configuration information automatically. However, you must configure a computer as a DHCP client before it can interact with the DHCP Service.
The Windows XP Professional implementation of TCP/IP supports automatic assignment of IP addresses for simple LAN-based network configurations. This addressing mechanism is an extension of dynamic IP address assignment for LAN adapters, enabling configuration of IP addresses without using static IP address assignment or installing the DHCP Service. Automatic Private IP Addressing is enabled by default in Windows XP Professional so that home users and small business users can create a functioning, single-subnet, TCP/IP-based network without having to configure the TCP/IP protocol manually or set up a DHCP server.
After the computer generates the address, it broadcasts to this address and then assigns the address to itself if no other computer responds. The computer continues to use this address until it detects and receives configuration information from a DHCP server. This allows two computers to be plugged into a LAN hub to restart without any IP address configuration and to use TCP/IP for local network access.
If the computer is a DHCP client that has previously obtained a lease from a DHCP server and the lease has not expired at boot time, the sequence of events is slightly different. The client tries to renew its lease with the DHCP server. If the client cannot locate a DHCP server during the renewal attempt, it attempts to ping the default gateway listed in the lease.
If pinging the default gateway succeeds, the DHCP client assumes that it is still on the same network where it obtained its current lease, so it continues to use the lease. By default, the client attempts to renew its lease when 50 percent of its assigned lease time has expired. If pinging the default gateway fails, the client assumes that it has been moved to a network that has no DHCP services cur-rently available and it autoconfigures itself as previously described. Once auto-configured, it continues to try to locate a DHCP server every 5 minutes.
Automatic Private IP Addressing can assign a TCP/IP address to DHCP clients automatically. However, Automatic Private IP Addressing does not generate all the information that typically is provided by DHCP, such as the address of a default gateway. Consequently, computers enabled with Automatic Private IP Addressing can communicate only with computers on the same subnet that also have addresses of the form 169.254.x.y.
By default, the Automatic Private IP Addressing feature is enabled. However, you can disable it by specifying an alternate configuration to use if a DHCP server cannot be located (see Figure 4.5), as discussed in the next section.
Auto-Configuration for Multiple Networks Connectivity provides easy access to network devices and the Internet. It also allows a mobile computer user to seamlessly operate both office and home networks without having to manually reconfigure TCP/IP settings.
You specify an alternate configuration for TCP/IP if a DHCP server is not found. The alternate configuration is useful when a computer is used on multiple networks, one of which does not have a DHCP server and does not use an automatic private IP addressing configuration.
Windows XP Professional displays the Local Area Connection Properties dialog box.
Windows XP Professional displays the Internet Protocol (TCP/IP) Properties dialog box with the General tab active.
Windows XP Professional includes the tools diagrammed in Figure 4.6, which you can use to troubleshoot TCP/IP and test connectivity.
Windows XP Professional offers several tools to assist you in troubleshooting TCP/IP, as described in Table 4.6.
Table 4.6??Tools Used to Troubleshoot TCP/IP
Option | Description |
---|---|
Ping |
Verifies configurations and tests connections |
ARP |
Displays locally resolved IP addresses as physical addresses |
Ipconfig |
Displays the current TCP/IP configuration |
Nbtstat |
Displays statistics and connections using NetBT |
Netstat |
Displays TCP/IP protocol statistics and connections |
Route |
Displays or modifies the local routing table |
Hostname |
Returns the local computer's host name for authentication by the Remote Copy Protocol (RCP), Remote Shell (RSH), and Remote Execution (REXEC) tools |
Tracert |
Checks the route to a remote system |
PathPing |
Verifies that the routers on the way to a remote host are operating correctly by detecting packet loss over multiple-hop trips |
These troubleshooting tools are all executed from within a command prompt. For information about how to use all of these commands, except Hostname and Tracert, open a command prompt, type the command followed by /?, and then press Enter. For example, for information about the Ping tool, open a command prompt, type ping /?, and then press Enter.
To use the Hostname tool, open a command prompt, type hostname, and then press Enter. Hostname returns the name of the local computer.
For information about how to use the Tracert tool, open a command prompt, type tracert, and then press Enter.
Windows XP Professional also provides tools for testing TCP/IP connectivity, as described in Table 4.7.
Table 4.7??Tools Used to Test TCP/IP Connectivity
Option | Description |
---|---|
FTP |
Provides bidirectional file transfer between a computer running Windows XP Professional and any TCP/IP host running FTP. Windows 2000 Server ships with the ability to serve as an FTP client or server. |
Trivial File Transfer Protocol (TFTP) |
Provides bidirectional file transfer between a computer running Windows XP Professional and a TCP/IP host running TFTP. |
Telnet |
Provides terminal emulation to a TCP/IP host running Telnet. Windows 2000 Server ships with the ability to serve as a Telnet client. |
RCP |
Copies files between a client and a host that support RCP; for example, a computer running Windows XP Professional and a UNIX host. |
RSH |
Runs commands on a UNIX host. |
REXEC |
Runs a process on a remote computer. |
Finger |
Retrieves system information from a remote computer that supports TCP/IP and the Finger tool. |
After configuring TCP/IP and restarting the computer, you should use the Ipconfig and Ping command-prompt tools to test the configuration and connections to other TCP/IP hosts and networks. Such testing helps ensure that TCP/IP is functioning properly.
You use the Ipconfig tool to verify the TCP/IP configuration parameters on a host. This helps to determine whether the configuration is initialized or if a duplicate IP address exists. Use the Ipconfig tool with the /all switch to verify configuration information.
The result of the Ipconfig /all command is as follows:
The Ping tool is a diagnostic tool that you can use to test TCP/IP configurations and diagnose connection failures. After you have verified the TCP/IP configuration, use the Ping tool to determine whether a particular TCP/IP host is available and functional. To test connectivity, use the Ping tool with the following syntax:
ping IP_address
Figure 4.7 outlines the steps for verifying a computer's configuration and for testing router connections.
By default, the following message appears four times in response to a successful Ping command:
Reply from IP_address
In this practice, you'll use two TCP/IP tools to verify your computer's configuration. Then you'll configure your computer to use a static IP address and verify your computer's new configuration. Next you'll configure your computer to use a DHCP server to automatically assign an IP address to your computer, whether or not there is a DHCP server available on your network. Finally, you'll test the Automatic Private IPAddressing feature in Windows XP Professional by disabling the DHCP server, if there is one on your network.
After completing this practice, you will be able to
To complete this practice, you need
In the following table, record the IP address, subnet mask, and default gateway that your network administrator provides for you to use during this practice. Ask your network administrator if there is another computer that you can use to test your computer's connectivity, and record the IP address of that computer as well. If you are not on a network, you can use the suggested values.
Variable value | Suggested value | Your value |
---|---|---|
Static IP address |
192.168.1.201 |
|
Subnet mask |
255.255.0.0 |
|
Default gateway (if required) |
None |
|
Computer to test connectivity |
N/A |
|
Run the ConfiguringTCP/IP file in the Demos folder on the CD-ROM accompanying this book for a demonstration of configuring TCP/IP.
In this exercise, you'll use two TCP/IP tools, Ipconfig and Ping, to verify your computer's configuration.
The Windows XP Professional IP Configuration tool displays the TCP/IP configuration of the physical and logical adapters configured on your computer.
Local Area Connection setting | Value |
---|---|
Host name |
|
Primary DNS suffix |
|
Connection-specific DNS suffix description |
|
Physical address |
|
DHCP enabled |
|
Autoconfiguration enabled |
|
Autoconfiguration IP address |
|
Subnet mask |
|
Default gateway |
|
A response similar to the following indicates a successful ping:
Pinging 127.0.0.1 with 32 bytes of data: Reply from 127.0.0.1: bytes=32 time<10ms TTL=128 Reply from 127.0.0.1: bytes=32 time<10ms TTL=128 Reply from 127.0.0.1: bytes=32 time<10ms TTL=128 Reply from 127.0.0.1: bytes=32 time<10ms TTL=128 Ping statistics for 127.0.0.1: Packets: Sent = 4, Received = 4, Lost = 0 <0% loss>, Approximate round trip times in milliseconds: Minimum = 0ms, Maximum = 0ms, Average = 0ms
In this exercise, you'll configure TCP/IP to use a static IP address.
The Local Area Connection Properties dialog box appears, displaying the network adapter in use and the network components used in this connection.
The Internet Protocol (TCP/IP) Properties dialog box appears.
The Windows XP Professional IP Configuration tool displays the physical and logical adapters configured on your computer.
Setting | Value |
---|---|
IP address |
|
Subnet mask |
|
If the address is working and configured, you receive the following result:
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128 Reply from 127.0.0.1: bytes=32 time<1ms TTL=128 Reply from 127.0.0.1: bytes=32 time<1ms TTL=128 Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
In this exercise, you'll configure TCP/IP to automatically obtain an IP address. You'll then test the configuration to verify that the DHCP Service has provided the appropriate IP addressing information. Be sure to perform the first part of this exercise even if you have no DHCP server because these settings are also used in Exercise 4.
The Local Area Connection Properties dialog box appears.
The Internet Protocol (TCP/IP) Properties dialog box appears.
Setting | Value |
---|---|
IP address |
|
Subnet mask |
|
Default gateway |
|
To test that TCP/IP is working and bound to your adapter, type ping 127.0.0.1 and then press Enter.
In this exercise, if you have a server running the DHCP Service, you need to disable it on that server so that a DHCP server is not available to provide an IP address for your computer. Without a DHCP server available to provide an IP address, the Windows XP Professional Automatic Private IP Addressing feature provides unique IP addresses for your computer. If the DHCP Service cannot be disabled, simply disconnect your network adapter cable.
There is a pause while Windows XP Professional attempts to locate a DHCP server on the network.
What message appears, and what does it indicate?
Is this the same IP address assigned to your computer in Exercise 3? Why or why not?
Were you successful? Why or why not?
Before you begin this exercise, you'll need to enable the DHCP Service running on the computer that is acting as a DHCP server (or reconnect your network cable if you disconnected it in Exercise 4). In this exercise, your computer obtains IP addressing information from the DHCP server.
After a short wait, a message box indicates that a new IP address was assigned.
Here are some questions to help you determine whether you have learned enough to move on to the next lesson. If you have difficulty answering these questions, review the material in this lesson before beginning the next lesson. The answers are in Appendix A, "Questions and Answers."