Locating Remote Computers

Names for computers outside the local broadcast subnet can be resolved if the names of the remote computers and their corresponding IP addresses are specified in the LMHOSTS file. For example, suppose your computer, named ClientA, is configured without the WINS client service, but you want to use TCP/IP to connect to a computer, named ServerB, that is located on another TCP/IP subnet. By default, your computer is a B node that uses NetBIOS cache and IP broadcasts and is enabled for LMHOSTS file lookup using an LMHOSTS file provided by your network administrator.

At system startup, the name cache on ClientA is "preloaded" only with entries from the LMHOSTS file that are designated for preloading with the keyword #PRE. (For more information about LMHOSTS keywords, see "Creating Entries in the LMHOSTS File" later in this appendix.) For this example, ServerB is on a remote subnet outside of your local subnet IP broadcast area and is not one of the entries in preloaded cache. A strict B node IP broadcast (as defined in RFCs 1001 and 1002) fails by timing out when no response is received, because ServerB is located on a remote subnet and cannot receive ClientA's broadcast requests.

In this example case, an operation involving name resolution might go through the following steps:

  1. A user on ClientA runs a Windows 2000 command, such as a print file command, using the NetBIOS name of ServerB.

  2. The NetBIOS name cache on ClientA is checked for the IP address that corresponds to the NetBIOS name of ServerB.

  3. Because ServerB's NetBIOS name and IP address were not preloaded, its NetBIOS name is not found in the name cache, and ClientA broadcasts a Name Query Request with the NetBIOS name of ServerB.

  4. Because ServerB is on a remote subnet, and IP broadcasts are not routed to remote subnets, ClientA does not receive a reply to its name request broadcast. (If ServerB were on the local network, ClientA would receive a response to its broadcast and the response would contain the IP address of ServerB.)

  5. Because the LMHOSTS method of name resolution has been enabled on ClientA, Windows 2000 continues to attempt to resolve the IP address from the NetBIOS. The LMHOSTS file in the directory % systemroot %\System32\Drivers\Etc is examined to find the NetBIOS name, ServerB, and its corresponding IP address. If the NetBIOS name is not found in the LMHOSTS file, and no other name resolution method is configured on ClientA, the user receives an error message.