Customizing a Network Using the Registry

It's impossible to provide a complete reference for all of Windows NT/2000/XP networking in a single chapter (for example, the Resource Kits usually include a comprehensive volume entitled "Windows NT Networking"). This topic certainly deserves a separate book. However, I hope that this chapter helps you to understand how network settings are stored in the registry, and how these settings are related to the data displayed by Control Panel applets. This topic is one of the most interesting ones, and if you explore it, you'll make many discoveries and invent many new ways of customizing network settings.

The remaining sections of this chapter will describe various methods of customizing network settings using the registry.

Automatic Configuration of IP Addresses

Windows 2000/XP includes many improvements, some of which were noticed immediately and cause heated debates among users. Many of the improvements that simplify administrative procedures, however, aren't as obvious. Automatic configuration of IP addresses is one such feature (Beginning with Windows 2000 Release Candidate 2, this function was called "Automatic Private IP Addressing" or APIPA). Let's see how it works.

When you install Windows 2000 or Windows XP, the standard set of network capabilities includes the TCP/IP protocol. By default, it's assumed that the client computer will get the IP address and subnetwork mask from the DHCP server. Most users who have at least some experience configuring TCP/IP in Windows NT 4.0 networks, know that problems can occur if there is an IP address conflict (or if the DHCP server is unavailable for a time). The APIPA functionality introduced in Windows 2000/XP allows DHCP clients to configure the IP address and subnetwork mask automatically (if the DHCP server is down or unavailable for some reason).

To configure the local computer as a DHCP client, set the Obtain an IP address automatically option on the General tab of the Internet Protocol (TCP/IP) Properties window (Fig. 8.21).

click to expand
Fig. 8.21: The General tab of the Internet Protocol (TCP/IP) Properties window

Note 

All client computers running Windows 2000/XP are configured as DHCP clients by default. if you select the standard networking options when you install the operating system, your computer is already configured as a DHCP client. No additional operations are required.

When the DHCP client starts, it searches for the DHCP server to obtain TCP/IP configuration information (usually, these data include an IP address, a subnet mask, and other DHCP settings). If the client can't get this information from the DHCP server, it will use the APIPA functionality, which automatically assigns it an IP address within a range from 169.254.0.1 to 169.254.255.254. The address range is especially reserved for this purpose and isn't used anywhere else in the Internet. The standard class B subnet mask will be used: 255.255.0.0. Since the client selects an arbitrary IP address from the range just specified, IP address conflicts may occur in the network. If this happens, Address Resolution Protocol (ARP) is used to resolve the conflicts. If the client selects an arbitrary IP address from the reserved range, it then sends an ARP frame to the network. If it doesn't get an answer to this request, the client retains the IP address it's selected. If the selected IP address is already in use, the client will make up to 10 attempts to select another IP address. The client will use this configuration data until the DHCP server becomes available. Obviously, the APIPA feature is very convenient for small networks without routing.

 

If you carefully look at the Internet Protocol (TCP/IP) Properties window shown in Fig. 8.21, you'll certainly notice one of the most appreciated new features introduced with Windows XP—so-called Alternate Addressing—which certainly will be most appreciated by users of mobile computers. The problem is that laptops often participate in more than one network, and are using a static IP address at one location and a dynamically assigned IP address at another. Moving between locations, therefore, each time requires reconfiguring of IP settings. Windows XP has eliminated this problem. Now the user can configure his or her laptop to first use dynamically assigned IP address, and then try alternate IP address, if the DHCP server is unavailable. To use this feature, open the Internet Protocol (TCP/IP) Properties window and set the Obtain an IP address automatically radio button, then go to the Alternate Configuration tab (Fig. 8.22) and configure an alternate IP address. Note that a second address may be either static or APIPA.

click to expand
Fig. 8.22: The Alternate Configuration tab of the Internet Protocol (TCP/IP) Properties window

It may happen, though, that you need to disable APIPA completely. To accomplish this, edit the registry as follows:

  1. Start Regedit.exe (if you work with Windows 2000, start Regedt32.exe).

  2. Open the following registry key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces.

  3. Select the subkey for the adapter that you'll need to disable APIPA, add the IPAutoconfigurationEnabled REG_DWORD value, and set it to 0 (the default value is 1). Initially this value is omitted, and the system assumes the default value (which means that APIPA is enabled).

Note 

Add the IPAutoconfigurationEnabled value only if you need to disable APIPA. If there's more than one network adapter on the computer, and you need to disable the APIPA function for each adapter, add the IPAutoconfigurationEnabled setting under the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters key and set it to 0.

Disabling Dynamic DNS Registration

By default, all Windows 2000/XP computers attempt to dynamically register on the DNS servers specified on the General tab of the TCP/IP properties window. To disable this feature, click the Advanced button on the General tab of the Internet Protocol (TCP/IP) Properties window. The Advanced TCP/IP Settings window will open. Go to the DNS tab (Fig. 8.23) and clear the Register this connection's addresses in DNS checkbox.

click to expand
Fig. 8.23: The DNS tab of the Advanced TCP/IP Settings window

In case you want to do the same operation using the registry, open the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces key, and set the DisableDynamicUpdate value (of REG_DWORD data type) to 1.

Disabling Persistent Network Connections

To disable the option for restoring persistent network connections, start the registry editor, open the HKEY_USERS\.DEFAULT\Software\Microsoft\WindowsNT\CurrentVersion\Network\Persistent Connections key, and locate the SaveConnections setting. The default value for this setting is "yes" (Fig. 8.24). To disable persistent network connections, set this value to "no".

click to expand
Fig. 8.24: The HKEY_USERS\.DEFAULT\Software\Microsoft\WindowsNT\CurrentVersion\Network\Persistent Connections registry key

Note 

To disable persistent network connections for users, set the SaveConnections value to "no" in all existing user profiles. This information is stored in the registry under the following keys: HKEY_USERS\<User_SID>/SOFTWARE\Microsoft\WindowsNT\CurrentVersion\Network\Persistent Connections.

How to Install NetBEUI on Windows XP

As you probably noticed, the NetBEUI protocol is not included in the list of installable protocols in Windows XP. This is because the NetBEUI protocol is no longer supported on Windows XP. However, the files that are required to install NetBEUI (Netnbf.inf and Nbf.sys) are still included with the distribution Windows XP CD, and you can install it, if necessary.

To install NetBEUI on your Windows XP computer, proceed as follows:

  1. Start the Network Connections applet in Control Panel.

  2. Right-click the adapter you want to add NetBEUI to, and then select the Properties command from the right-click menu.

  3. On the General tab, click Install.

  4. Click Protocol, and then click Add.

  5. Click Have Disk, insert your Windows XP CD-ROM, open the Valueadd msft net netbeui folder, click the Netnbf.inf file, and then click Open.

  6. Click OK.



Windows XP Registry
Linux Enterprise Cluster: Build a Highly Available Cluster with Commodity Hardware and Free Software
ISBN: N/A
EAN: 2147483647
Year: 2000
Pages: 144
Authors: Karl Kopper

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