Home > Articles > Operating Systems, Server > Microsoft Servers

This chapter is from the book

Name Resolution and Server Location

Name resolution is an important building block for Microsoft Networking, as with any network service. After our discussion in Hour 1, "Understanding Networking: The Telephone Analogy," you're probably comfortable with the fact that any network name needs to be resolved to a network address—that is, when you point your browser to http://www.jotto.com, the name gets resolved via DNS (Domain Name Service) to the network address 205.134.224.21.

The great news is that the latest versions of Microsoft networking do just this: they use DNS as their primary means of name resolution and server location. The bad news is that there are a couple of backward-compatible issues that you will need to understand to effectively troubleshoot. Furthermore, even if you are an old hand at DNS, you'll need to learn a bit more about how Microsoft does it. All the methods of Microsoft name resolution and server location (which in aggregate are called the Windows Locator Service) can be summarized as

  • NetBIOS standalone (broadcast or static name files)

  • NetBIOS point-to-point and flat (non-hierarchical) name server (WINS)

  • Hierarchical name server (DNS)

Let's start by discussing how standalone NetBIOS works, both from name resolution and server lookup ("browse") standpoints, and then we'll be equipped to understand both WINS and DNS.

NetBIOS: Standalone

First of all, what is NetBIOS?

NetBIOS (Network Basic Input/Output System) provides name and session services to the file-sharing and print-sharing programs between two computers. You're using NetBIOS when you share files between two Windows 9x family computers.

NetBIOS handles name services for Microsoft file and print services. It also serves to carry messages pertaining to the creation of workgroups on the network and makes sure that no duplicate workstation names exist within the workgroup or domain.

When a duplicate workstation name does exist, NetBIOS tells you about it in a hurry. For example, when a technician duplicates a known-good hard drive (see Hour 18, "Managing Change: Establishing Consistency and Standards") to a known-bad hard drive and then reboots both stations, he or she immediately sees the following Windows error, which is in fact a NetBIOS error:

Microsoft Networking:

The following error occurred while loading protocol number 0.

Error 38: The computer name you specified is already in use on the
network. To specify a different name, double-click the Network icon in
Control Panel.

NetBIOS has queried the network to see if the name exists, and, in fact, it does. Of course, the tech simply goes to the Control Panel, clicks the Identification tab, and changes the PC name to fix this problem.

The question becomes: How does NetBIOS know that the name is in use? Well, when there's a name server in use, NetBIOS simply queries the name server for its own name before announcing itself.

What do you do when you don't have a name server? There are two methods you could use: broadcast and static host tables.

Broadcasting means that each NetBIOS station communicates with the subnet's TCP/IP broadcast address for the purposes of finding out "who else is out here," and announcing itself. It's pretty simple, and works similarly to NetBEUI (a nonroutable protocol that transports NetBIOS), except that it's using TCP/IP. (We'll discuss the good points and bad points of NetBEUI in a little while.)

What about static host tables? First of all, what is a static host table? By definition, a static host table is a file or database that is local to a workstation; it does not look changes up from the network the way that DNS does.

Here's one example of a static host table. As you probably already know, a Windows PC's TCP/IP stack can use a HOSTS table on its hard drive to resolve hostnames to IP addresses. The HOSTS table is used for normal TCP/IP networking (as in Telnet sessions to a host system as well as pings). A HOSTS file looks like this:

192.168.10.5 elmo

192.168.10.5 grover

This means that 192.168.10.5 is the numeric address for elmo, and 192.168.10.6 is the numeric address for grover.

Each Windows PC can also use an LMHOSTS file—a different kind of static host table—which is formatted much the same as a HOSTS file but used for NetBIOS name resolution. Why? Well, a HOSTS file only specifies a name-to-address mapping; it does not indicate what service is offered by which host.

Contrast this to LMHOSTS, where one can actually specify, "Hey, if you're looking for the main server to logon to, here it is!" For example,

192.168.10.5 elmo

192.168.10.5 grover #DOM:feldmonster

specifies that grover is not only IP address 192.168.10.5, but is also the main server for the domain feldmonster. See the difference? Again, the HOSTS file only specifies name resolution; the LMHOSTS file specifies where services are located; for this reason, the entry is known as a mapping rather than just a resolution.

NOTE

Historical/trivia note: The LM stands for LAN Manager, which is what Windows networking evolved from.

Both the LMHOSTS and HOSTS files live in the C:\WINDOWS directory in the Windows 9x family; the Windows NT families locate these files in the %SYSTEMROOT%\etc\drivers directory (%SYSTEMROOT% on XP defaults to Windows\System32; NT and 2000's default is WinNT\System32.)

LMHOSTS.SAM is a sample file you can look at to see the file format and so on. I strongly recommend that you not use LMHOSTS files (or HOSTS files) as a normal practice unless you have the smallest network in the world; the tedium of updating many of these files makes you wish you were running after really tough network problems instead.

Although you should consider static host mappings (and static host tables in general) to be a day-to-day no-no, you should know about them for two troubleshooting reasons. First, if there's a name resolution problem with a workstation, you might want to see if somebody has been monkeying around with LMHOSTS at a given client computer. Second, you can play with an LMHOSTS file to rule in or rule out name resolution in a given problem. (For example, say that you get a no domain controller could be located error for the feldmonster domain. If you manually insert the correct IP address in the LMHOSTS file—and it works—you definitely have a problem with service location between this workstation and the server.)

Whether or not you're using static mappings, it is highly useful to be able to find out what a particular Windows station thinks that current mappings are. That's where the nbtstat tool comes in. The rub here is that you need to know how to translate hexadecimal values into actual usable service information. For example, here's the output from a machine on my home network, using the nbtstat -n command (I have modified the table to include the actual meanings of the hexadecimal numbers):

  Name        Type     Status  Meaning
-------------------------------------------------------
MONSTER    <20> UNIQUE   Registered  File & Print Server
MONSTER    <00> UNIQUE   Registered  Computer name
FELDMONSTER  <00> GROUP    Registered  Workgroup name
FELDMONSTER  <1E> GROUP    Registered  Backup browser

This might be a little early to discuss this because I haven't covered some of the concepts in the definitions, but it's important to know that nbtstat is usable no matter whether you're using a name server or running standalone with a static host table. One concept that hasn't been covered yet is browsing; but worry not, we'll get to that in the next section.

Ordinarily, the meaning of the hex numbers doesn't appear; but you can get a listing of all NetBIOS hexadecimal numbers from http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/dnarwnet/html/msdn_browse1.asp. You can also retrieve the NetBIOS name table from a given IP address, say, 10.1.2.3, by using the nbtstat -a 10.1.2.3. If you were to do this to an NT 4.0 domain controller, normally, it would look like this (but without my addition of a Meaning column):

  Name        Type     Status  Meaning
-------------------------------------------------------
SHREK     <00> UNIQUE   Registered  Workstation services
FELDMONSTER  <00> GROUP    Registered  Legacy "Lan manager" type domain
SHREK     <20> UNIQUE   Registered  File & Print Server
FELDMONSTER  <1B> UNIQUE   Registered  Primary Domain Controller
FELDMONSTER  <1E> GROUP    Registered  Master Browser, Domain-type
SHREK     <03> UNIQUE   Registered  Messenger service
INet~Services <1C> GROUP    Registered  Internet group name
IS~SHREK.......<00> UNIQUE   Registered  
FELDMONSTER  <1D> UNIQUE   Registered
..__MSBROWSE__.<01> GROUP    Registered  Alias of MasterBrowser for subnet
SHREK     <01> UNIQUE   Registered  Real name:MasterBrowser of subnet

What about Windows 2000 servers? Well, here you would be more interested in DNS, which we'll discuss in a little while.

NetBEUI

NetBEUI is for networks that don't have TCP/IP; typically small networks or workgroups without the need for Internet access. If you have TCP/IP, skip this unless you like history lessons. Or, if you see NetBEUI in your network configuration and you have TCP/IP, read on to see why you should get rid of NetBEUI.

NetBEUI is a nonroutable protocol that transports NetBIOS. Again, it is only used when TCP/IP is not available. It is simply the way the NetBIOS messages are packaged and delivered to the wire. The plus used to be that you didn't need to have a TCP/IP stack loaded on your PC to be able to do useful networking functions. The downside was that because NetBEUI is very simple, it relies on network broadcasts to get a lot of information across: There aren't any network addresses, so everything is addressed to everyone.

A broadcast (when a network node sends information to all other network nodes on a segment) obviously causes a lot of network traffic. NetBEUI does this so it doesn't have to keep track of all the nodes on the network—if a station doesn't differentiate whom to talk to, there doesn't have to be a facility on the network to keep track of who's currently available on the network.

There are two consequences: First, a name server isn't necessary with NetBEUI (good if you don't have a name server); and second, NetBEUI traffic cannot traverse a router (bad if you have a router and you want your people to be able to share files across it).

Considering that nowadays it's pretty easy to bring up a name server, why does NetBEUI even exist? Well, if you had less than 30 stations, no server, and no Internet connection, NetBEUI was pretty attractive: There was no need to allocate TCP/IP addresses (therefore requiring tracking of static IP numbers or a DHCP server) and no need for a name server. A lot of people used it for this reason. But if NetBEUI is in use on a network nowadays, it is just there because of inertia: most folks now have a server and the associated TCP/IP infrastructure required for TCP/IP operation.

Accordingly, you really shouldn't be using NetBEUI. Broadcasts are the pits; in large enough quantities, they will lead to broadcast storms (that is, one workstation broadcasts, leading other workstations to broadcast). On a large scale, this creates unnecessary network traffic that can wreak havoc on your network. Get rid of it if you can. (Naturally, the same argument goes for TCP/IP workstations without name servers, by the way, because they must broadcast.)

Browsing

The Windows networking literature refers to browsing as the process of listing all available Windows networking resources, as opposed to when you know a server name and you simply ask for a connection.

When you're using a peer-to-peer network (no server involved), one computer gets arbitrarily designated as browse master; others are designated as backup browsers. Any client computer can get information about network resources, whether the resources are servers, workgroups, NT domains, and so on. For example, when you click your Network Neighborhood icon, the computer list you see is obtained from the browse master of your workgroup or domain. As you can see, browsing is pretty important—if you can't see the resource, you can't use the resource.

The browse master of a workgroup or domain is the machine that's responsible for keeping a list of participating workstations. If the browse master leaves the workgroup, another browser from the backup browser list must take over. If a backup browser erroneously believes that it is in charge, problems spring up. Staying current on service packs usually prevents this type of misbehavior.

TIP

The browse master of a domain is always the primary domain controller (PDC). If it's not, you've got a problem. The Browser Monitor on the NT and Win2K resource kits (BROWMON.EXE) can help you check on browser status on a subnet.

NOTE

Workgroup browsing problems might simply be a typo because no joining is involved when the workstation is set up. It's really easy for the person doing the setup to walk away without verifying browse-ability. I once saw a case in which a user absolutely could not browse others in her workgroup. After checking the network card and cable and finding nothing wrong, we were on the verge of reinstalling Windows—we had tracked the problem down to something about the OS. Before doing this, we checked the Control Panel one last time; this time, we noticed that the workgroup name had a space in front of it. Argh! We removed the space, and suddenly we could see everybody else.

I've also seen a case in which a workgroup was mistyped using a zero rather than the letter O.

TIP

Although an NT domain can exist across subnets (that is, via a router), workgroups cannot. Instead, the workgroup exists twice on the two different segments—each one with its own browse master and browse list. This means that the browse master on network A has no idea what the browse list is for network B. Computers on segment A will not be able to see those on segment B in their network neighborhood, and vice versa.

WINS: The "Flat" NetBIOS Name Server

Windows Internet Naming Service or WINS, was invented to make routable Windows Networking possible. As you'll recall, using TCP/IP in its simplest form (without a name server) means that NetBIOS must use broadcasts or static name tables, both of which are horrible for reasons already outlined.

WINS is the answer to how machines can resolve names without broadcasting and without static name tables. When a client machine is configured to use WINS, instead of broadcasting to register itself and check for duplicate names, it contacts the WINS server. The WINS server keeps track of Windows workgroups, domains, and machine names on a TCP/IP network.

When a machine contacts the WINS server directly to register itself and look up other hostnames and services (such as domain controllers), this is called point-to-point name resolution; machines that resolve names this way are called p-nodes. Broadcast machines, as you might expect, are called b-nodes; machines configured to do both (hybrid) are called h-nodes.

WINS servers are available for Windows NT, UNIX (as part of the Samba package), and Windows 2000. There is no WINS server for workgroups.

WINS has several limitations:

  • It is flat, rather than hierarchical. In a large organization, this means that it's pretty easy to accidentally duplicate machine names.

  • Although WINS does have replication options (the capability for two or more servers to share data), in practice, this is fairly annoying to administer because there is no master relationship: each server is peer-to-peer, and equally able to mess up the database.

  • In a busy and large WINS system, database corruption happens, not infrequently.

Here's some advice about WINS:

  • If you're using Windows 2000, use DNS instead of WINS.

  • Use NBTSTAT (built-in) and WINSCHK (available from the Windows resource kits) as good rule in/rule out tools when you suspect problems with WINS servers and/or their databases. Bear in mind that you always want to get multiple perspectives from these tools; that is, point them at several different machines to see "which one of these things is not like the others."

  • Make sure that your DHCP servers distribute the correct WINS servers to clients! Sounds simple, but in practice, people do forget this.

  • Don't be shy about deleting the WINS database if you even suspect corruption—remember, the database is dynamic (built by client machines as they connect), so what harm can you really do? It's probably a good idea to do this when things are quiet, though; you'll need to stop the WINS service, delete the database files (typically located in %SystemRoot%\System32\WINS), and then restart WINS. Make sure that your server machines explicitly contact the WINS servers shortly afterward so they can re-register themselves, and be available for clients.

  • Use few (if any) static mappings. They're annoying to keep up with; you should only use them if a server (for instance, a hardware CDROM server) doesn't support WINS.

  • Keep it simple! Don't use more WINS servers than you need.

  • Be consistent! Unless there is a compelling reason not to, make them all replication partners. The last thing you want is an inconsistent database, where server #1 says that a workstation is a certain IP address, and server #2 doesn't know that the workstation exists. A good rule of thumb is, "what you do to one, do to the other." For example, if you delete the WINS database on one machine, make sure to delete it on the other—or the corrupted info will flow back.

Finally, you should know that WINS is "history": it's not something that Microsoft has future plans for. If you must support Windows NT servers and workstations, you need it. But if you don't have to support these, by all means, do not use it; use DNS instead.

DNS: Hierarchical Naming and Service Location

As we'll discuss in Hour 19, DNS is capable of serving up more than just name-to-ip-address translations. DNS can host many types of database records (standard ones include NS, or name server records, and MX, or mail exchanger records), and Microsoft's latest iteration of its networking protocol takes advantage of this by ditching the old NetBIOS and hosting both naming services and service locations in the DNS.

Nothing clears the air like a good example, so let's take a look at what grover, the Primary Domain Controller for an Active Directory domain, would look like if DNS was being used as the resolution mechanism for Windows networking (as is the default behavior for a Windows 2000 network). Using the standard DNS tool, nslookup, to find the primary domain controller, you might type: nslookup _ldap._tcp.dc._msdcs. feldmonster.com, producing this output:

Server: grover.feldmonster.com
Address: 10.1.62.2

_ldap._tcp.dc._msdcs.feldmonster.com   SRV service location:
     priority    = 0
     weight     = 100
     port      = 389
     svr hostname  = rover.feldmonster.com
grover.feldmonster.com internet address = 10.1.62.2

Don't worry too much about the convoluted format of the DNS record; the important thing to understand is that certain types of services have certain types of lookups.

TIP

I highly recommend that you read one particular Microsoft tech note; it covers how to integrate a Windows 2000 domain's name resolution into an existing DNS system. I don't recommend actually doing this—to avoid problems, it's really best to use 100% Microsoft DNS—but it is interesting and instructive to see how traditional DNS and Microsoft DNS mesh. Here's the URL: Integrating Your Active Directory Namespace Into an Existing DNS Infrastructure With Name Overlap.

Again, understand that DNS is used as a name resolution and service location mechanism only. DNS does not perform username and password authentication: That is done by the domain controller, not the DNS servers.

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020