Configuring NetBIOS Name ResolutionSome clients require NetBIOS names to communicate with other hosts on a network. A NetBIOS name is a 16-character name where the first 15 characters identify a unique host and the 16th character identifies a service or application running on the host, such as the Workstation or Server service. As with domain names, NetBIOS names must be resolved to an IP address before two hosts can communicate. There are a number of methods available for name resolution and the method employed will depend on the environment. The three standard ways of resolving NetBIOS names to IP addresses are through a local broadcast, using the local cache, or by using a NetBIOS name server (such as a WINS server). With a local broadcast, a broadcast is sent out on the network requesting the IP address of a specific host. One of the disadvantages of this method is the increase in traffic. All hosts maintain a local cache that can be used for name resolution. Each time a host resolves a NetBIOS name to an IP address, the record is added to the local cache and remains valid for 10 minutes. By default, all clients check their local cache before using any of the other resolution methods available. The third option is to use a NetBIOS name server to resolve names to IP addresses. In a Microsoft environment, several other methods for resolving names are also available, such as DNS servers, HOSTS files, and LMHOSTS files. Depending on the requirements of an environment, clients can be configured to use a single method for name resolution or they can use a combination of methods. The exact method a client uses to resolve NetBIOS names is determined by its node type. For example, if a client is configured as an M-Node, it attempts to resolve a NetBIOS name by first performing a local broadcast. If this is unsuccessful , it then tries to resolve the name using a NetBIOS name server. You can check the node type a client is configured for by typing ipconfig /all at the command prompt (see Figure 6.9). The node type can be changed via the local Registry. Table 6.2 summarizes the four node types. Figure 6.9. Checking the node type using the ipconfig command from the command prompt.
Table 6.2. Node Type s
LMHOSTS FilesAs already mentioned, one of the ways that NetBIOS names can be resolved is through the use of a text file known as an LMHOSTS file . One of the benefits of using an LMHOSTS file is that entries from the file can be preloaded into the local cache to facilitate name resolution (because this is the method a client will use to resolve a NetBIOS name). So if a client cannot resolve a NetBIOS name using any of the previous methods, clients can parse the LMHOSTS file to determine whether a record exists.
The LMHOSTS file can be found in the %SYSTEMROOT%\system32\drivers\etc directory. By default, the file is named LMHOSTS.SAM and must be renamed LMHOSTS before it will work. Figure 6.10 provides an example of the contents of an LMHOSTS file. When configuring records within the file, there are several directives that can be used, as outlined in Table 6.3. Figure 6.10. A sample LMHOSTS file.
Table 6.3. Predefined LMHOSTS Directive s
|