Enabling IP Address Assignment


Windows XP Professional provides three methods for assignment of IP addresses to TCP/IP clients, as well as an additional technique that allows more than one IP address to be assigned per interface:

  • DHCP

  • APIPA

  • Static IP Addressing

  • Alternate IP Configuration

Choosing an IP Address Assignment Method

You can choose one of three methods for the assigning of an IP address to an interface. In addition, there is a technique that can add some flexibility to your decision making process. Each of the three addressing schemes available in Windows XP Professional is designed to meet different connectivity needs.

Choosing DHCP

DHCP dynamic addressing allows the automatic assignment of a public address for a specified period of time. A configured DHCP server provides a database of available IP addresses. The server can also be set up to provide configuration options for DHCP clients, including addresses of DNS and WINS servers, gateway addresses, and other information. DHCP provides an efficient IP configuration option for larger networks, providing simplified client configuration and reuse of IP addresses.

At startup, each DHCP client requests configuration data from the server, allowing auto-configuration of the IP address, subnet masking, and other options. The IP address is assigned to each client for an amount of time determined by the server, called a lease, which can be renewed periodically. Halfway through the lease duration, the DHCP client requests a lease renewal. If this attempt is not successful, the IP address is returned to the database and made available to other DHCP clients. For more information about the DHCP lease process, see DHCP Lease Process later in this chapter.

Choosing APIPA

Automatic Private IP Addressing (APIPA) is appropriate for simple networks that have only one subnet. With APIPA, if no DHCP server is available, the computer automatically assigns itself a private IP address. If a DHCP server later becomes available, the computer changes its IP address to one obtained from the DHCP server.

Using APIPA, a Windows XP Professional based client assigns itself an IP address from a range reserved for authorized private class B network addresses (169.254.0.1 - 169.254.255.254), with a subnet mask of 255.255.0.0. A computer with an authorized private address cannot directly communicate with hosts outside its subnet, including Internet hosts. APIPA is most suitable for small, single-subnet networks, such as a home or small office. APIPA is enabled by default if no DHCP servers are available on the network.

Note 

APIPA assigns only an IP address and subnet mask; it does not assign a default gateway, nor does it assign the IP addresses of DNS or WINS servers. Use APIPA only on a single-subnet network that contains no routers. If your small office or home office network is connected to the Internet or a private intranet, do not use APIPA.

Choosing Static IP Addressing

Static addressing involves the manual assignment of a designated fixed address. If your network does not include a DHCP server, and APIPA cannot be used, use manual IP addressing. You must configure the IP address and subnet mask to meet the client computer s connectivity requirements.

Choosing Alternate IP Configuration

With alternate IP Configuration, you can configure an interface that has more than one address. If you need to connect to more than one network (presumably from different locations), you can configure a second address (either static or APIPA) for the same interface. Alternate IP Configuration will allow your Windows XP Professional based computer to look for the first address and, if that address is not available, to look for the second.

Configuring DHCP

In an effort to make implementing the TCP/IP protocol more manageable, Microsoft worked with other industry leaders to create an Internet standard called Dynamic Host Configuration Protocol (DHCP) for the automatic allocation of TCP/IP configuration. DHCP is not a Microsoft standard, but a public Request for Comments standard, RFC 2131, that Microsoft has implemented.

By implementing a DHCP server within an enterprise, a network administrator is able to establish a range of valid IP addresses to be used by each subnet, as well as a series of options for configuring the subnet mask, the default gateway, and addresses for DNS and WINS servers. An individual IP address from the range, and the options associated with that range, are assigned dynamically to any DHCP client requesting an address. If DHCP is available company-wide, users can move from subnet to subnet and always have a valid IP address. DHCP permits the administrator to assign a lease time that defines how long an IP address configuration remains valid. A Microsoft Windows NT version 3.5 or later or a Windows 2000 based server running the DHCP service, or any computer or network device running RFC 2131 compliant software, can act as a DHCP server.

For more information about installing and configuring the DHCP service in Windows 2000, see Dynamic Host Configuration Protocol in the Networking Guide of the Microsoft Windows 2000 Server Resource Kit.

DHCP Lease Process

The first time that a Windows XP Professional based client (with DHCP enabled) attempts to join a network, it automatically follows an initialization process to obtain a lease from a DHCP server. Figure 22-1 shows the lease process.

click to expand
Figure 22-1: The DHCP lease process

The lease process involves the following steps:

  1. The Windows XP Professional DHCP client requests an IP address by broadcasting a message (known as a DHCPDiscover message) to the local subnet.

  2. The client is offered an address when a DHCP server responds with a DHCPOffer message containing an IP address, and associated configuration information, available for lease to the client.

  3. The client selects the offered address and replies to the server with a DHCPRequest message.

  4. The client is assigned the address and the DHCP server sends an acknowledgment message (DHCPAck) approving the lease. Other DHCP option information, such as default gateway and DNS server addresses, might be included in the message.

  5. After the client receives acknowledgment, it configures its TCP/IP properties using any DHCP option information in the DHCPAck message, and completes the initialization of TCP/IP.

    If no DHCP server responds to the client request, the Windows XP Professional based client can proceed in one of two ways:

If APIPA is enabled, the client self-configures a unique IP address in the range 169.254.0.1 through 169.254.255.254. For more information about self-configuring IP addresses, see Configuring APIPA later in this chapter.

If APIPA has been disabled, the client network initialization fails. The client continues to re-send DHCPDiscover messages in the background until it receives a valid lease from a DHCP server. The client makes four attempts to obtain a lease, one every five minutes.

In rare cases, a DHCP server might return a negative acknowledgment (DHCPNack) to the client. This can happen if a client requests an invalid or duplicate address. If this occurs, the client must begin the entire lease process again.

Restarting a DHCP Client

When a Windows XP Professional based client that had previously leased an IP address restarts, it broadcasts a DHCPRequest message containing a request for its previously assigned IP address. If the requested IP address is available, the DHCP server responds with an acknowledgment message, and the client joins the network.

If the client cannot use the IP address because it is in use by another client, or if the address is no longer valid because the client has been physically moved to a different subnet, the DHCP server responds with a negative acknowledgment (DHCPNack), causing the client to restart the lease process.

DHCP Lease Renewals

To ensure that addresses are not left assigned when they are no longer needed, the DHCP server places an administrator-defined time limit on the lease, known as a lease duration.

Halfway through the lease duration, the DHCP client requests a lease renewal, and the DHCP server extends the lease. If at any time a computer stops using its assigned IP address (for example, if a computer is moved to another network segment or is removed), the lease expires and the address becomes available for reassignment.

Configuring the Windows XP Professional DHCP Client

When TCP/IP is installed, Windows XP Professional automatically enables the option to obtain an IP address from a DHCP server. You can disable this option if you want to manually enter an IP address. For more information about disabling DHCP, see Configuring an IP Address Manually later in this chapter.

The IP configuration tool (Ipconfig.exe) allows users or administrators to examine the current IP address configuration assigned to the computer, the IP address lease time, and other useful data about the TCP/IP configuration.

Configuring APIPA

In Windows XP Professional, Automatic Private IP Addressing (APIPA) allows home users and small business users to create a functioning, single subnet TCP/IP network without the use of either static addressing or a DHCP server.

Manually configuring IP addresses can be tedious work in all but the very smallest networks and is prone to human error. Generally, autoconfiguration is a better choice. APIPA allows a Windows XP Professional client to assign itself an IP address in the following circumstances:

In these cases, the Windows XPProfessional client selects an IP address from the range of IANA-designated, private class B addresses (169.254.0.1 - 169.254.255.254) with the subnet mask 255.255.0.0. The client performs duplicate-address detection to ensure that the IP address that it has chosen is not already in use. If the address is in use, the client will select another IP address up to 10 times. After the client has selected an address that is verifiably not in use, it configures the interface with that address. In the background, the client continues to check for a DHCP server every five minutes. If a DHCP server is found, the APIPA autoconfiguration information is abandoned and the configuration offered by the DHCP server is used instead.

You can use the Ipconfig.exe command-line tool to determine whether APIPA is enabled.

To determine whether Automatic Private IP Addressing is currently enabled

The resulting text identifies your IP address and other information. Check the line that reads Autoconfiguration Enabled. If the text reads YES and the IP address is in the 169.254.0.1 - 169.254.255.254 range, Automatic Private IP Addressing is enabled.

You can disable automatic private IP addressing in one of two ways:

To disable APIPA by editing the registry

  1. You do this by adding the registry entry IPAutoconfigurationEnabled with a value of 0 (REG_DWORD data type) in the following subkey:

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\ Parameters\Interfaces\interface-name

  2. Use the registry editor Regedit.exe to add the above entry, and then restart the computer.

To disable APIPA for multiple adapters by editing the registry

  1. Set the value of the IPAutoconfigurationEnabled entry to 0x0 (REG_DWORD data type) in the following registry subkey:

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\ Parameters

  2. Use the registry editor Regedit.exe to add the above entry, and then restart the computer.

Configuring an IP Address Manually

If you cannot use DHCP or APIPA for IP address and subnet assignment, the IP address for the Windows XP Professional based client must be manually configured. The required values include the following:

To configure an IP address manually

  1. In Control Panel, select Network and Internet Connections.

  2. On the Network and Internet Connections sheet, select Network Connections.

  3. In Network Connections, right-click the local area connection that you want to modify.

  4. Select Properties.

  5. On the General tab of the Properties sheet, select Internet Protocol (TCP/IP).

  6. Click Properties.

  7. On the General tab of the TCP/IP Properties sheet, select the Use the following IP address option.

  8. Type the IP address, subnet mask, and default gateway for the selected adapter in the respective text boxes. The network administrator must provide these values for individual users, based on the IP addressing plan for your site.

    The value in the IP Address text box identifies the IP address for this network adapter. The value in the Subnet Mask text box is used to identify the network ID for the selected network adapter.

  9. Click OK to save the IP addressing information.

  10. Click OK to save the connection properties.

Configuring Multiple IP Addresses on a Network Adapter

Multihoming involves the placement of more than one network adapter in a single computer. In addition, Windows XP Professional supports logical multihoming, by which multiple addresses are assigned on a single network adapter. This configuration is useful in an environment in which a single physical network is logically divided into subnets. For more information about multihoming, see Configuring TCP/IP in this book.

To configure a multihomed system using a single network adapter

  1. In Control Panel, select Network and Internet Connections.

  2. In the Network and Internet Connections sheet, select Network Connections.

  3. In Network Connections, right-click the local area connection that you want to modify, and then select Properties.

  4. In the Local Area Connection Properties sheet, click the General tab. Select Internet Protocol (TCP/IP), and then click Properties.

  5. In the Internet Protocol (TCP/IP) sheet, click the General tab. Select Use the following IP address. Add TCP/IP configuration information for the first IP address, and click Advanced.

    Figure 22-2 shows the advanced TCP/IP Settings dialog box.


    Figure 22-2: Advanced TCP/IP Settings dialog box

  6. In the Advanced TCP/IP Settings dialog box, under IP address, click Add to assign one or more additional IP addresses to the same interface.

  7. In the TCP/IP Address box, enter an IP address and a subnet mask to assign an additional address to the same interface. Click Add. Repeat the process for each additional address that you want to assign to that interface.

  8. In the Advanced TCP/IP Settings page, under Default Gateways, click Add to assign one or more additional default gateways to the same interface.

  9. In the TCP/IP Gateway Address box, enter an IP address for an additional default gateway for the same interface. Use the checkbox to indicate whether the gateway s metric is to be assigned automatically. If a metric is not to be assigned automatically, enter the metric. Upon completion, click Add. Repeat the process for each additional default gateway address that you want to assign to that interface.

    Caution 

    As a general recommendation, do not specify multiple default gateways.

    Figure 22-3 shows the TCP/IP Gateway Address dialog box.


    Figure 22-3: TCP/IP Gateway Address dialog box

  10. Click OK three times, so that all changes take effect.

    Note 

    A metric indicates the cost of the route (which, in the case of the Routing Information Protocol indicates the number of hops to the destination). The TCP/IP Gateway Address dialog box allows you to indicate whether the default gateway is to have an automatically assigned or a static metric. If it is to have a static metric, you can enter that metric in a text box. For more information about assigning a static metric, see Configuring TCP/IP in this book.

For more information about the automatic determination of the default gateway address and about interface-based metrics, see Configuring TCP/IP in this book.

Configuring an Alternate IP Address

Laptops and other mobile devices that participate on more than one network often use a static IP address at one location and a dynamically assigned IP address at another. For example, your computer might use dynamic addressing (DHCP) at the office but need to use a static IP address when at home to connect to a broadband ISP.

Windows XP Professional solves this problem by allowing the user to configure the computer to first try DHCP, and then, if the attempt fails, to try alternate static IP address setting(s).

To configure a dynamically assigned private IP alternate address

  1. In Control Panel, select Network and Internet Connections.

  2. In the Network and Internet Connections properties sheet, select Network Connections.

  3. In Network Connections, right-click Local Area Connections and click Properties.

  4. In the Local Area Connection Properties properties sheet, click the General tab. Select Internet Protocol (TCP/IP) and click Properties.

  5. On the Alternate Configuration tab of the Internet Protocol Properties page, select Automatic private IP address to specify a dynamically assigned private address as your alternate IP address.

  6. Click OK.

To configure a static IP alternate address

  1. In Control Panel, select Network and Internet Connections.

  2. In the Network and Internet Connections sheet, select Network Connections.

  3. In Network Connections, right-click Local Area Connections and click Properties.

  4. In the Local Area Connection Properties sheet, click the General tab. Select Internet Protocol (TCP/IP) and click Properties.

  5. On the Alternate Configuration tab, select User configured for a static address as your alternate IP address.

  6. Enter your alternate IP address, alternate subnet mask, and alternate default gateway.

  7. Type the preferred and alternate DNS server address for this network.

  8. Type the preferred and alternate WINS server address for this network.

  9. Click OK.




Microsoft Windows XP Professional Resource Kit 2003
Microsoft Windows XP Professional Resource Kit 2003
ISBN: N/A
EAN: N/A
Year: 2005
Pages: 338
BUY ON AMAZON

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net