Linux Enterprise Cluster: Build a Highly Available Cluster with Commodity Hardware and Free Software

Windows 2000/XP networking features include several improvements. These improvements have also influenced the method of storing network data in the registry. The main improvements introduced into the networking are: support for NDIS 5.0 (Windows 2000) and NDIS 5.1 (Windows XP), Plug and Play support, power management, and the new INF file format used for installing network components.

Installing Network Components in the Windows 2000/XP Registry

To install Windows 2000/XP networking components, the operating system requires the following:

In addition to the files listed above, the following files are needed to install network components:

Network Adapter Registration Information

Like Windows NT 4.0, Windows 2000/XP also has software registration subkeys for all of the installed network adapter cards. These keys are stored under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkCards\Netcard# (Fig. 8.10).

Fig. 8.10: The HKEY_LOCAL_MACHINE\SOETWARE\Microsoft\Windows NT\CurrentVersion\NetworkCards\2 registry key in the Windows XP registry

Note 

Notice that network adapters are numbered beginning from 1, rather than from 0 as usual.

The HKEY_LOCAL_MACHINE root key also contains two more subkeys containing data on the network adapter:

Each of the driver keys also contains a set of required subkeys: Linkage and Ndi. The typical contents of the Linkage subkey for the network adapter driver are shown in Fig. 8.14. As you can see, this subkey contains the following standard settings: Export, specifying the list of created objects; RootDevice (the setting that specifies the root device); and UpperBind (the setting that specifies protocol binding).

Fig. 8.14: Typical contents of the Linkage key for the network adapter driver

The Ndi key contains subkeys and settings that depend on the type of installed network component. If the network component has an associated service or device driver, then the Ndi key will contain a Service setting. This setting specifies the name of the appropriate service or driver (Fig. 8.15). If there are several services associated to a given network component, then the Ndi key will contain the required CoServices setting (REG_MULTI_SZ data type). This setting will list all services associated with the component, including the main service specified by the Service setting. This setting is required for all NetTrans components (transport protocols), NetClient components (network clients), and NetService components (network services). The components of the Net type (network adapters) have no such setting (Fig. 8.15). As you can see, only the RTL8139 device driver has been associated with the network adapter.

Fig. 8.15: The ..\Ndi\Service setting specifies the name of the service or driver associated with the network component

All further configuration information on Windows 2000/XP network components is stored in the registry under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Network. Notice the subkeys, long strings composed of characters and digits and enclosed in braces (Fig. 8.16). If you look at these keys carefully, you'll immediately notice that their names are actually the ClassGuid values listed in Table 8.3.

Fig. 8.16: The contents of the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Network registry key

If you open these keys sequentially and explore their contents, you'll find everything you need to understand how network components are configured. For example, if you open the subkey named {4D36E972-E325-11CE-BFC1-08002BE10318} (if you remember, this ClassGuid value specifies network adapters), you'll notice the Connection key at the lowest level of hierarchy (Fig. 8.17). It's not difficult to see that this key specifies the LAN connection properties. First, the Name string setting specifies the "Local Area Connection" string that you see in the Network and Dial-up Connections window. Next, the string setting named PnPInstanceID is the link to the subkey under the Enum key, which contains the data concerning the network adapter. Finally, the binary setting named ShowIcon specifies if the toolbar indicator is enabled. The relationship between registry settings and Control Panel applets is illustrated by Fig. 8.18.

Fig. 8.17: Local Area Connection properties in the system registry

Fig. 8.18: Relationship between registry information and the Network and Dial-up Connections applet in Control Panel

Registration Information on the Network Components

Registration information for the network services is stored in the system registry under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services. This registry key contains the service registration keys for network components (including network adapters). To continue our discussion, notice that the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\ {4D36E972-E325-11CE-BFC1-08002BE10318}\0000\Ndi key contains the Service setting, which specifies the name of the respective service or driver (in our example, RTL8139). The RTL8139 subkey that describes the settings for the service associated with the Realtek RTL8139 Family PCI Fast Ethernet adapter is shown in Fig. 8.19.

Fig. 8.19: The HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\RTL8139 key contains configuration data for a Realtek RTL8139 network adapter

The HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services registry key also contains subkeys that describe each network component installed in the system (Fig. 8.20).

Fig. 8.20: The HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services registry key contains subkeys for all installed network components

Категории