Introduction to TCP/IP

Previous Topic Next Topic

NetBIOS Name Resolution

NetBIOS name resolution is the process of successfully mapping a NetBIOS name to an IP address. A NetBIOS name is a 16-byte address used to identify a NetBIOS resource on the network. A NetBIOS name is either a unique (exclusive) or group (nonexclusive) name. When a NetBIOS process communicates with a specific process on a specific computer, a unique name is used. When a NetBIOS process communicates with multiple processes on multiple computers, a group name is used.

The NetBIOS name acts as a session layer application identifier. For example, the NetBIOS Session service operates over TCP port 139. All NetBIOS over TCP/IP session requests are addressed to TCP destination port 139. When identifying a NetBIOS application with which to establish a NetBIOS session, the NetBIOS name is used.

An example of a process using a NetBIOS name is the file and print sharing server service on a Windows 2000–based computer. When your computer starts up, the server service registers a unique NetBIOS name based on your computer's name. The exact name used by the server service is the 15 character computer name plus a 16th character of 0x20. If the computer name is not 15 characters long, it is padded with spaces up to 15 characters long. Other network services also use the computer name to build their NetBIOS names so the 16th character is used to uniquely identify each service, such as the redirector, server, or messenger services. Figure 1.13 shows the NetBIOS names associated with the server, redirector, and messenger services.

Figure 1.13    NetBIOS Names and Services
Enlarge figure

Figure 1.13 NetBIOS Names and Services

When you attempt to make a file-sharing connection to a Windows 2000–based computer by name, the server service on the file server you specify corresponds to a specific NetBIOS name. For example, when you attempt to connect to the computer called CORPSERVER, the NetBIOS name corresponding to the server service is "CORPSERVER     <20>" (note the padding using the space character). Before a file and print sharing connection can be established, a TCP connection must be created. In order for a TCP connection to be established, the NetBIOS name "CORPSERVER     <20>" must be resolved to an IP address.

To view the NetBIOS names registered by NetBIOS processes running on a Windows 2000 computer, type nbtstat -n at the Windows 2000 command prompt.

NetBIOS Node Types

The exact mechanism by which NetBIOS names are resolved to IP addresses depends on the node's configured NetBIOS Node Type. RFC 1001 define the NetBIOS Node Types, as listed in Table 1.27.

Table 1.27 NetBIOS Node Types

Node Type Description
B-node (broadcast) B-node uses broadcasted NetBIOS Name Queries for name registration and resolution. B-node has two major problems: (1) In a large internetwork, broadcasts can increase the network load, and (2) Routers typically do not forward broadcasts, so only NetBIOS name on the local network can be resolved.
P-node (peer-peer) P-node uses a NetBIOS name server (NBNS), such as Windows Internet Name Service (WINS), to resolve NetBIOS name. P-node does not use broadcasts; instead, it queries the name server directly. The most significant problem with P-node is that all computers must be configured with the IP address of the NBNS, and if the NBNS is down, computers are not able to communicate even on the local network.
M-node (mixed) M-node is a combination of B-node and P-node. By default, an M-node functions as a B-node. If it is unable to resolve a name by broadcast, it uses the NBNS of P-node.
H-node (hybrid) H-node is a combination of P-node and B-node. By default, an H-node functions as a P-node. If it is unable to resolve a name through the NetBIOS name server, it uses a broadcast to resolve the name.

Windows 2000–based computers are B-node by default and become H-node when configured for a WINS server. Windows 2000 also uses a local database file called Lmhosts to resolve remote NetBIOS names.

For more information about WINS, see "Windows Internet Name Service" in this book. For more information about the Lmhosts file, see "LMHOSTS File" in this book.

© 1985-2000 Microsoft Corporation. All rights reserved.