Subscribe to Windows IT Pro
May 01, 1999 12:00 AM

Implementing WINS

Windows IT Pro
InstantDoc ID #5212
Rating: (0)
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 131.107.2.200. 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.

Related Content:

ARTICLE TOOLS

Comments
  • Eugenio Perez
    12 years ago
    Feb 04, 2000

    GREAT ARTICLE

You must log on before posting a comment.

Are you a new visitor? Register Here

advertisement

advertisement

Windows is a trademark of the Microsoft group of companies. Windows IT Pro is used by Penton Media Inc. under license from owner.