WINS and NetBIOS Names

Windows 2000 is the first Microsoft operating system with the capability to rely completely on DNS for name resolution. The primary naming system for Microsoft networks before Windows 2000 was based on NetBIOS names. A computer’s NetBIOS name, sometimes called its “computer name,” is assigned by the administrator who first installs the operating system. Modifying the network properties on the operating system can also change the NetBIOS name. Although Windows 2000 relies heavily on DNS for name resolution, the installer must still assign the computer a computer name. This name is then used for the computer’s hostname as well as its NetBIOS name. Each computer has its own NetBIOS name that it broadcasts to all other computers on the network.

As you can imagine, maintaining NetBIOS names on a local area network is extremely easy, because whenever it is booted up, a computer always either broadcasts its NetBIOS name or adds itself to the NetBIOS name database on a WINS server.

However, using NetBIOS names in a subnetted environment suffers the major limitation that routers do not forward broadcasts. Therefore computers in different subnets are never aware of each other.

One method of eliminating this problem is using an LMHOSTS file (see Example 1.1). Much like a HOSTS file, an LMHOSTS file is a text file listing NetBIOS names and their corresponding IP addresses. To facilitate NetBIOS name resolution on an internetwork, an administrator has to manually edit and distribute LMHOSTS files to all computers on the internetwork.

Example 1-2. Sample LMHOSTS File

192.168.0.2    nalcott     #PRE  #DOM:ALCOTT  #DC for network
192.168.0.254  proxy       #PRE  #Proxy Server for Network
192.168.0.1    cg141484-a  #PRE

To alleviate some of these problems, Microsoft introduced the Windows Internet Naming Service (WINS) with Windows NT. WINS maintains a NetBIOS name database much like LMHOSTS. However, unlike LMHOSTS, WINS is dynamic. When a computer is first booted up, it will register its NetBIOS name with the WINS server it is configured to use. Each entry in the database has a TTL that removes the entry after it expires. Figure 1.19 displays some example WINS NetBIOS registrations.

Snapshot of WINS Manager in Windows NT 4.0

Figure 1-19. Snapshot of WINS Manager in Windows NT 4.0

NetBIOS Name Resolution

So how does a Microsoft-based client (DOS, Windows for Workgroups, Windows 9x, and Windows NT) know which type of NetBIOS name resolution to use? There are four NetBIOS name resolution modes that tell a client which method to use: B-Node, P-Node, M-Node, and H-Mode.

Tip

The command ipconfig /all displays the current NetBIOS Name Resolution configuration on Windows NT 4.0 and Windows 2000. On Windows 95 and Windows 98, use the WINIPCFG utility.

B-Node

The B-Node (or broadcast) mode uses broadcast messages to resolve NetBIOS names on the network. This is the oldest and most basic form of NetBIOS name resolution used in Microsoft networks. It is also the default NetBIOS name resolution mode for clients not configured with the IP address of a WINS server. Figure 1.20 illustrates B-Node name resolution. When Computer A needs to send data to Computer E, Computer A sends a broadcast message to the network, looking for Computer E. If and when Computer E receives the broadcast, it responds directly to Computer A with its IP address. Computer A then updates its NetBIOS cache with Computer E’s IP address.

B-Node name resolution

Figure 1-20. B-Node name resolution

B-Node resolution works great in small networks. However, as the network grows, the amount of bandwidth consumed by broadcasts grows, thus slowing down the network. Also, as noted earlier, routers do not forward broadcasts. Therefore B-Node name resolution mode will not work in a routed environment.

P-Node

Clients configured to use the P-Node (or point-to-point) mode will use WINS for NetBIOS name resolution. Figure 1.21 illustrates P-Node name resolution. To use P-Node mode, a client must be configured with the IP address of a WINS server. When Computer A needs the IP address for Computer E, it will contact the WINS server it is configured to use. The WINS server will then respond with the IP address. Computer A then updates its NetBIOS cache with Computer E’s IP address.

P-Node name resolution

Figure 1-21. P-Node name resolution

P-Node resolution works great because it alleviates the two problems associated with B-Node mode: too many broadcasts and not working in a routed environment. Since all queries and responses used in P-Node name resolution are directly between the client and the WINS server, no broadcasts take place, which means P-Node mode works in a routed environment.

Some limitations of P-Node mode are that every client must be configured with the IP addresses of WINS servers, and NetBIOS name resolution will fail if no WINS server is available. Another issue to consider is that there must be a WINS server or WINS proxy on each subnet. A WINS proxy listens for broadcasts from clients configured to use B-Node. It takes the request and sends it directly to the WINS server it is configured to use.

M-Node

M-Node (or multiple) mode-configured clients try to resolve NetBIOS names with a broadcast first (B-Node). If the broadcast is not successful, the client tries to resolve the NetBIOS names via a WINS server (P-Node). Figure 1.22 illustrates M-Node name resolution.

M-Node name resolution

Figure 1-22. M-Node name resolution

M-Node mode allows name resolution to continue if a WINS server is down. Please note that since it uses broadcasts first, broadcast traffic may become a problem in a large network.

H-Node

An H-Node (or hybrid) mode client tries to resolve NetBIOS names using WINS first. If WINS fails, the client uses a broadcast. Figure 1.23 illustrates H-Node name resolution.

H-Node name resolution

Figure 1-23. H-Node name resolution

H-Node mode is the default NetBIOS name resolution mode for clients configured with the IP address of a WINS server.

Get DHCP for Windows 2000 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.