NetBIOS Legacy of WINS

To understand the need for WINS, you must understand the history of NetBIOS, which started more than 10 years ago as a high-level programming language interface to IBM PC-Network broadband LANs for PC-DOS applications. Microsoft used this NetBIOS interface for designing its networking components. NetBIOS is a session-level interface that applications use to communicate over NetBIOS-compatible transports. It establishes logical names on the network, establishes sessions between two logical names on the network, and supports reliable data transfer between computers that have established a session. Protocols implemented under Microsoft networking components, including TCP/IP, include a NetBIOS interface or a mapping layer. This layer allows nonnative NetBIOS components to fit into a NetBIOS environment. NetBIOS-based communications use NetBIOS names to uniquely identify resources and other nodes on the network.

NetBIOS names are 16 bytes in length. The NetBIOS name space is flat, meaning that names can be used only once within a network. (DNS, in contrast, uses a fully qualified domain name (FQDN), which combines the host name with the name of its domain. A NetBIOS name such as "WINserver01" might be "WINserver01.itreskit.com" as an FQDN.) For more information about NetBIOS names, see "NetBIOS Names" later in this chapter.

NetBIOS names are registered dynamically when computers and services start and when users log on. A NetBIOS name can be registered as a unique name, which maps to a single address, or as a group name, which maps to multiple addresses. Each of these name types is discussed in "Microsoft WINS Servers" later in this chapter.

NetBIOS Name Resolution

NetBIOS name resolution is the process of successfully converting 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 name, exclusive to a single process on a single computer, or a group name, which might address multiple processes on multiple computers.

An example of a process that uses a NetBIOS name is the File and Printer Sharing for Microsoft Networks service on a computer running Windows 2000. When your computer starts, File and Printer Sharing for Microsoft Networks registers a unique NetBIOS name based on the name of your computer. The name registered by the 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 to make it 15 characters long.

When you initiate a file-sharing connection by name to a computer running Windows 2000, that connection uses File and Printer Sharing for Microsoft Networks on the file server you specify. File and printer sharing always corresponds to a specific NetBIOS name. For example, when you attempt to connect to a computer called CORPSERVER, the NetBIOS name corresponding to File and Printer Sharing for Microsoft Networks on that computer is:

CORPSERVER [20]

Note the use of spaces to pad the computer name. Before you can establish a file and print sharing connection, a TCP connection must be created. To establish that TCP connection, the NetBIOS name CORPSERVER [20] must be resolved to an IP address.

The exact mechanism by which NetBIOS names are resolved to IP addresses depends on which NetBIOS node type is configured for the computer seeking to resolve a name. RFC 1001 defines the NetBIOS node types; they are also listed in Table 7.1.

Table 7.1 NetBIOS Node Types

NetBIOS name resolution mode

Description

B-node

Uses IP broadcast messages to register and resolve NetBIOS names to IP addresses. Windows 2000–based computers can use modified B-node name resolution.

P-node

Uses point-to-point communication with a NetBIOS name server (in Windows 2000–based networks, this is the WINS server) to register and resolve computer names to IP addresses.

M-node

Uses a mix of B-node and P-node communication to register and resolve NetBIOS names. M-node first uses broadcast resolution; then, if necessary, it uses a server query.

H-node

Uses a hybrid of B-node and P-node. An H-node computer always tries a server query first and uses broadcasts only if direct queries fail.

Computers running Windows 2000 use B-node name resolution by default and use H-node when configured with a WINS server.

In order for remote NetBIOS names to be resolved, you must configure your computers running Windows 2000 with the IP address of a WINS server. You must configure Active Directory–enabled computers running Windows 2000 with the IP address of a WINS server if they are to communicate with computers running Windows NT, Windows 2000, Windows 95, or Windows 98 that are not Active Directory enabled.

Broadcasts in NetBIOS Name Resolution

Name resolution in a NetBIOS network in a small and self-contained network is broadcast-based. A name registration request can be broadcast and heard by all B-, H-, and M-nodes on the local network. If no objections are received, the application broadcasting the request assumes that it has permission to use the name and issues a name overwrite demand. If the name is already in use, a negative name registration response is sent by the node using the name. In this case, the requesting application does not have permission to use the name.

In a larger, interconnected series of subnets, broadcast-based name resolution creates certain problems. First, nodes may interact with one another within a broadcast area, but they cannot interact across routers in a routed network. Second, broadcasts for name resolution generate significant network traffic. Third, every node within the broadcast area must examine each broadcast datagram, consuming resources on every node. Broadcast-based name resolution works fine within a small LAN, but as the LAN grows and merges into a WAN, this method is not effective. Large LANs experience bandwidth problems, and once routers are introduced, the broadcast-based name resolution becomes inoperable.

WINS avoids the problems of NetBIOS name resolution by providing dynamic database maintenance for name registration and resolution. WINS reduces broadcast traffic while allowing the clients to locate remote systems easily across local or wide-area networks.