Subscribe to Windows IT Pro

 

Get Newsletters

  • Get the Latest News
  • Product Updates
  • Helpful Tricks
  • Productivity Tips

Subscribe Now!

January 01, 1997 12:00 AM

NetBIOS Names and WINS

Windows IT Pro
InstantDoc ID #117
Rating: (2)

My past few columns have dealt with the resolution of NetBIOS names on an IP network. If you want to type net view \\orange, your computer must be able to convert the name "orange" into an IP address such as 204.53.22.82. For a long time, people on a Microsoft TCP/IP network had an unpleasant pair of options for NetBIOS over TCP/IP name resolution: They could either rely on broadcasts or construct a static name resolution table, lmhosts.

With Windows NT 3.5 came a better answer: the Windows Internet Name Service (WINS), a NetBIOS Name Server containing a database that matches NetBIOS names and IP addresses. WINS is a database program that keeps track of which NetBIOS names map to which IP addresses.

If you've ever set up TCP/IP on a Windows for Workgroups (WFW), Windows 95, or NT machine, you've heard of WINS. Every time you set up an IP address for a network card, you get to attach a primary WINS server and a secondary WINS server to that IP address. Clearly, Microsoft thinks WINS is important: If you try to set up an IP address without WINS, you get one of those "Are you sure?" message boxes.

Connecting with WINS
Here's how WINS works from your PC's point of view. First, the PC starts up the IP stack. Part of that stack involves a WINS server. Second, the PC sends a message to the WINS server saying, in effect, "Hey, I understand you're my WINS server; pleased to meet you. I know that whenever I need to match up an IP address with a name, you'll help me out." Then the WINS server says back, "Why, I'm delighted to be of service, PC...PC...What did you say your name and IP address are? Ah yes, let me note that name."

WINS can tell you the name and IP address of any computer on the network that has introduced itself to the WINS server. And because every system wants to be able to do name resolution with WINS, every system registers itself with WINS, so WINS knows about the machines on the network.

This initial contact (or name registration) happens, like so many things in the NT world, because of NT's NetBIOS origins. Microsoft networking began on single-segment networks with a dozen or so computers. The person sitting at a computer could assign any unique name to that computer. Problems arose if the name wasn't unique.

Microsoft networking computers handled this problem with a name registration packet, essentially a broadcast to all other computers on the network saying, "Hey! I want to call my computer BEANIE; is anyone out there already named BEANIE?" As long as no computer complained, the PC took the name BEANIE.

Better than Broadcasting
Broadcasting isn't a good idea for two reasons. First, it forces every computer on the segment to stop and ask itself, "Am I BEANIE?" If the computer isn't named BEANIE, it won't send a message. But the asking wastes some CPU time. Second, all this broadcasting doesn't work over routed networks.

WINS remedies this situation in two ways. First, instead of broadcasting, a WINS client sends a name registration packet straight to the WINS server, in a point-to-point directed IP message. The other computers don't have to look up from what they're doing, so no CPU time is wasted. Second, the communications between WINS client and WINS server are also point-to-point, so routers are no problem. If a second BEANIE tries to start up, it soon finds out that it's not unique. When it tries the name resolution with WINS, the WINS server rejects its request, citing a duplicate name.

Faster and Faster
WINS servers are, according to Microsoft, fast. With NT 3.51, Microsoft claimed that a 486 acting as a WINS server could process 1500 name resolution requests per minute. To make your WINS server even faster, tell it to stop logging the changes to its database. Open the WINS Manager, highlight a server, and click Server/Configuration. Click Advanced>>, and clear Logging enabled. This procedure tells WINS to stop creating a transaction log.

I know that step sounds drastic, but it isn't. You're better off filling in the text field Database backup path in Server/Configuration/Advanced>> to tell WINS to back up its database every three hours. If you don't fill in that field, your WINS server won't back up its entire database, so logging changes to the database would be kind of silly.

Speed vs. Inconvenience
Not having a transaction log will make rebuilding your WINS system's names database harder if a server crashes, but preventing logging also will roughly double the number of resolutions the WINS system can handle per minute. WINS gets its information from computers doing name registrations whenever they boot, probably once a day for most machines. Rebooting the PCs in a network would let WINS restore its database in minutes. Yes, I know, rebooting every machine is not something you'd want to do because it is a great inconvenience to your users, but what about the inconvenience of a consistently slow name resolution system? Further, how many of your computers change their name in a three-hour period? Probably not many. If they don't change their name, they have entries in the backed-up WINS database.

Another way to juice up the WINS server a bit is to modify its runtime priority. Just go to the Registry at hkey_local_machine\system\currentcontrolset\services\wins\parameters and create an entry called PriorityClassHigh. Its type is reg_dword, and its value is either 1 or 0. Zero, the default, says to keep the priority at normal. Set it to 1, and you increase the WINS server priority to high. Before you set the priority, look at the Performance Monitor to see whether the machine is usually busy. If it isn't, changing the priority of the WINS server isn't going to matter much. A high priority setting won't make a WINS server running alone on a slow machine run more quickly; rather, the priority will help the WINS server grab more CPU cycles from the file-and-print services.

Another way to get faster name resolution is to add a CPU to a WINS server. A second CPU improves performance about 25 percent; however, a third, a fourth, or additional CPUs don't improve performance further.

Still another way is to install more WINS servers and distribute the load. But don't install too many because the database replication traffic can be monstrous. For example, when last I heard, Microsoft had only 15 in its entire enterprise!

A reasonable approach is to place WINS servers centrally in the organization, where they have access to all parts of the network. However, look out for multi-homed machines. Since NT 3.5, WINS hasn't worked too well on servers with more than one network card. Microsoft says that it fixed that problem in Service Pack 4 of NT 3.51, but I see messages on the network that say the problem is not really fixed.

What About lmhosts?
One more thing: Does WINS make lmhosts unnecessary? Not entirely, according to Microsoft. Apparently, domain controllers often can't find one another across a large number of routers. The result is problems with trust relationships and domain account database replications. Microsoft says the solution is to put an lmhosts file on each domain controller with references to the other domain controllers. I guess Microsoft will fix that problem in NT 5.0; every day I work with NT 4.0, I see more bugs in it. Maybe the 4.0 version number is jinxed. Remember DOS 4.0? Makes you wonder....

Related Content:

ARTICLE TOOLS

Comments
  • zhiyuan
    7 years ago
    Aug 05, 2005

    few question... hope you guys can help ?

    can the name resolution done over switches and core switch?
    can the clients see the server farm in the other segment ?
    installing Wins on 1 server in teh server farm, other servers pointing to the wins server, do they need netbios to see each other? thanks !

  • zhiyuan
    7 years ago
    Aug 05, 2005

    few question... hope you guys can help ?

    can the name resolution done over switches and core switch?
    can the clients see the server farm in the other segment ?
    installing Wins on 1 server in teh server farm, other servers pointing to the wins server, do they need netbios to see each other? thanks !

  • D Dayem
    8 years ago
    Apr 29, 2004

    It is okey. But i need to know how can I get the WINS Addresses of My ISP, If the administrator of my ISP,for some reason, refuses to give them to me

  • Jim Shaker
    8 years ago
    Apr 26, 2004

    Does WINS get the NetBIOS name from the computer's full name, or do you have to specify a new NetBIOS name when you start up the WINS service??

  • Deborah
    8 years ago
    Apr 15, 2004

    If you set up new replication partners across two domains, how does WINS handle duplicate names on the initial replication?

You must log on before posting a comment.

Are you a new visitor? Register Here

advertisement

advertisement

White Papers

Get your Windows 7 deployment off to the right start by implementing PC lockdown. A locked-down environment is easier and cheaper to support since users are less likely to make unnecessary changes to the core system configuration - read more here!

Essential Guides

Is your iSCSI "lossy"? The reality is that most off-the-shelf Ethernet hardware deployed for iSCSI can lose packets, resulting in slow performance or application downtime. Learn how to assess your current iSCSI infrastructure and engineer an advanced iSCSI SAN infrastructure.

Web Seminars

What's the best way to keep your network safe from malware? In this web seminar, security expert Greg Shields suggests an alternative method to the traditional blacklisting approach that is common with anti-virus and anti-malware solutions.

eLearning Series

We bring the experts direct to you to share their real-world perspective and expertise. During each event, three sessions stream in real time, so you can learn, ask questions, and get solutions.
Upcoming event: Getting the Most with Exchange 2010 with Paul Robichaux

Subscribe to Windows IT Pro!

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