Skip navigation

Implementing WINS

Use WINS to resolve computer names and IP addresses

Three services are central to TCP/IP in a Windows NT environment: DHCP, DNS, and WINS. (For more information about these services, see "Related Articles in Windows NT Magazine," page 180.) Last month, I explained how to use a DHCP server to set up IP addresses and other information for computers on your network (see "Configuring DHCP," April 1999). NT Server 4.0 includes WINS and DNS.

These services help computers on different subnets find one another and help you reduce broadcast traffic on your network.

WINS and DNS provide name resolution, which is the process of converting a computer name to an address. When you connect to a resource on the network (e.g., a shared file, a printer), you usually use a Uniform Naming Convention (UNC) path such as \\SERVER1\FINANCE or \\PRINTSERVER\HPLJ4. The data you transmit on the network must go to an IP address rather than a computer name. WINS and DNS then resolve a name to the IP address.

The names WINS and DNS are misleading. WINS is the Windows Internet Naming Service, but the service has nothing to do with the Internet. DNS is the Domain Name System, which refers to Internet domains rather than the NT domain model. Although both services provide name resolution, they perform different tasks. WINS converts Microsoft NetBIOS computer names on your network to IP addresses, and DNS converts Internet-style names to IP addresses. The services' functionalities are converging in Windows 2000 (Win2K).

I'll discuss DNS in detail next month. This month, I discuss WINS, including what the service does and how to install and configure it.

What Is WINS?
WINS is a Microsoft application that resolves NetBIOS names, which are the names we usually use to refer to computers (e.g., SERVER1, PAYROLLSERVER). WINS resolves these names as IP addresses in the form Imagine that a computer needs to access a file on SERVER1. The computer could broadcast the message "Is SERVER1 listening?" and wait for SERVER1 to reply. However, this approach introduces two problems. First, every computer receives the broadcast and must decide whether to respond. Second, broadcasts don't cross routers. Thus, every computer on the local subnet receives the broadcast, but no computers on other subnets receive it. If SERVER1 is on a different subnet, it doesn't receive the broadcast. The computer needs a more direct method for determining the server's IP address.

One solution is the LMHOSTS file, which is a list of computer names and IP addresses that the client system can use, much like a telephone directory, to look up computers' IP addresses. The administrator must update this list manually and might have to replicate it to clients on a regular basis. In a relatively static environment, this solution works fairly well. However, IP addresses can change frequently. Keeping up with these changes is impossible. WINS provides an automated solution to the problem. A WINS server is a database of IP addresses and computer names that updates dynamically as IP addresses change. Many networks use DHCP to assign IP addresses, which is why administrators often install WINS with DHCP.

The WINS server must have a fixed IP address so that a WINS client computer can send a message to the WINS server and request the IP address of the computer it needs to communicate with. This message isn't a broadcast, because the client knows the WINS server's IP address and sends the message directly. The WINS server also knows which computer sent the request and can reply directly to the originating IP address.

A WINS client can be any computer running NT, Windows 9x, or Windows for Workgroups (WFW) with the TCP/IP software on the NT Server CD-ROM. As each computer starts up, it registers with the WINS database and provides its name and IP address. The computer might also register entries such as whether it's a PDC or BDC, whether it's a master browser, and the name of the domain for which it acts as the domain controller. The WINS database stores this information and makes it available to the other WINS clients. WINS registration doesn't generate excessive network traffic because it isn't a broadcast.

To see the information that the WINS database stores, open the WINS Manager from the Administrative Tools folder. As Screen 1 shows, the right pane of the WINS Manager contains summary information such as how many requests for information the WINS database has received and how many times it was able to provide that information.

To see the database mappings, select Show Database from the Mappings menu. As you can see in Screen 2, the WINS database is a map of NetBIOS names and IP addresses. Each name shows up more than once but in different forms (e.g., GOSHAWK\[20h\] and GOSHAWK\[03h\]). These names, combined with the hexadecimal value, represent not only the registered computer name but also the service the computer provides. For example, if you need to connect to a share on a computer (e.g., a directory), then you need to connect to the Server service on that computer. This service handles incoming requests for shared resources. The Server service registers as a hex value of \[20h\]. The hex values are the 16th bit of the computer's NetBIOS name. (That's why NetBIOS names can have only 15 characters—the 16th character denotes the resource type.) Table 1 lists some hex codes and their resource types.

Some network components whose IP addresses you need (e.g., printers) can't register with the WINS database. You can add these IP addresses in WINS Manager under Mappings, Static Mappings. The addresses might be the same fixed IP addresses that you had to exclude from your scope in the DHCP server. You can also import an LMHOSTS file, which is useful if you're converting to WINS.

WINS must run on an NT server with a fixed IP address. The service requires 3.2MB of RAM. These requirements are the same as the requirements for DHCP and DNS. Thus, you often run all three services on one computer. A BDC is a candidate for running the services, unless you use the BDC heavily for logon authentication. In this case, you might want to place the services on a member server. You need only one or two WINS servers on a network rather than one for each subnet.

To install WINS, start the Network applet in Control Panel, or right-click the Network Neighborhood icon and select Properties. Then, select the Services tab. (You can add WINS and DNS at the same time if you want.) After you add WINS, you must reboot the server. You can then find WINS Manager in the Administrative Tools folder.

Many NT administrators prefer to administer the network from a computer other than the server—often an NT workstation. You can install NT's client network administration tools on your workstation. These tools are on the NT Server 4.0 CD-ROM under \clients\ srvtools\winnt\i386. Run the setup program in this directory to install the tools. The setup program doesn't place shortcuts in your Administrative Tools folder, so you must add them. Look for the file winsadmin.exe, and create a shortcut for it.

Configuring DHCP for WINS
As I explained last month, you can configure the DHCP server to provide more than just the IP address and subnet mask when a computer asks for an IP address: You can also configure it to provide the WINS server's address. This method is more efficient than going to each computer to configure TCP/IP properties. The client obtains the WINS server's address from the DHCP server. A computer that uses DHCP to obtain an IP address can automatically become a WINS client and use WINS services. Thus, you don't configure DHCP to assign permanent addresses. To change the WINS server's address, you just change the entry on the DHCP server. Clients receive updated information as they renew their leases. If clients have permanent addresses, they don't check back with the DHCP server and therefore don't realize the WINS server has moved.

To configure your DHCP server to provide WINS information, open DHCP Manager and select DHCP Options from the menu. You can configure WINS values globally or for the scope. Configuring values globally is usually preferable, because you have one or two WINS servers covering all your subnets. Screen 3 shows how to configure DHCP options for a WINS scope.

You must use the Edit Array option to specify an IP address. The option for the WINS server address is 044. You must also configure the WINS node type, which is option 046. The node type refers to how clients resolve addresses: B-node is for only broadcasts (i.e., the client doesn't use WINS); P-node is for point-to-point or directed messages (i.e., WINS only); M-node is for a mixed process (i.e., the client uses a broadcast first, then a WINS query if it doesn't receive an answer); and H-node is for a hybrid process, which reverses the previous method (i.e., H-node uses a WINS query and tries a broadcast only if the WINS database doesn't contain the name, in case the target computer isn't participating in the WINS process). H-node is the most common node type on NT systems and is the default.

Plan for the Future
WINS is worth setting up, especially if you're using DHCP. You might have heard the rumor that Win2K will eliminate WINS. Actually, Win2K incorporates WINS into DNS as dynamic DNS. So learning about WINS now isn't a waste of time: You can use the service now and well into the future.

Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.