Article ID: 150800 - Last Review: February 22, 2007 - Revision: 3.1 Domain Browsing with TCP/IP and LMHOSTS FilesThis article was previously published under Q150800 On This PageSUMMARY
In TCP/IP-based networks involving routers and multiple segments, it is
generally recommended that you implement WINS for name resolution and
browsing support. However, as an alternative to WINS, it is possible to
have full domain browsing by using only LMHOSTS files on all computers,
although there are some limitations that will be discussed in this article.
In either case, it is important to note that a client only participates in domain browsing when the client is using a workgroup name that is equivalent to the domain name (WorkgroupName = DomainName). Windows NT computers can also "join" the domain to gain this functionality, instead of being in a workgroup. This functionality of LMHOSTS-based domain browsing (over routers) has not been formally documented or tested by Microsoft, and may not be available in future versions of the client and server operating systems. Use this information with discretion. MORE INFORMATION
"Browsing" in a Microsoft network should be considered a distributed
service provided by one or more computers. Each computer can fall into
several browser roles; however, this article focuses on the two most
important ones:
For more information, please see the following article in the Microsoft Knowledge Base: 102878
(http://support.microsoft.com/kb/102878/EN-US/
)
Information on Browser Operation
In order for this distributed browse service to work, the SegMBs need a way
to determine exactly who the DomMB is. They can determine this by locating
the computer that has registered the NetBIOS name "Domain<1b>", because that is only registered by the PDC (which also is the DomMB, as noted above).
For more information, please see the following article in the Microsoft Knowledge Base: 119495
(http://support.microsoft.com/kb/119495/EN-US/
)
List of Names Registered with WINS Service
Domain Browsing with WINSIn a WINS environment, a SegMB would query WINS to determine who registered Domain<1b>. In this case WINS acts as a convenient central resource for this information. There is one more benefit in having WINS to assist browsing: multi-domain browsing.Multi-Domain Browsing with WINSA PDC that is set up to query WINS periodically requests the list of all domains that are registered in the database. (A domain is identified by a "Domain<1b>" registration in the database, and the associated IP address of the PDC that registered it.) The PDC combines this with its own domain browse list, and thus has a complete list of computers in its domain, as well as a list of other domains, all across the WAN. When the PDC then interacts with its SegMB's, it gives them this complete list. You then see the effect of this when you browse the network using File Manager or Network Neighborhood.NOTE: That is the extent of WINS involvement with browsing. It is not involved in the browser election process, nor with helping a client determine who its local segment master browser is, nor with helping the DomMB determine who the SegMBs are; that is done in the process when the SegMB first contacts the DomMB. In certain networks it may not be valuable to use WINS; this can only be determined on a case-by-case basis. You can then use either LMHOSTS or DNS to resolve computer names; however, LMHOSTS are required for domain browsing, as well as other domain management issues such as database replication and domain secure channels. Domain Browsing with LMHOSTSWithout WINS, you need special LMHOSTS entries that designate who all the domain controllers are. This is done in the following convention:199.199.199.1 ComputerName #PRE #DOM:DomainName Windows NT Segment Master BrowsersHaving the above entries is sufficient for a Windows NT computer: Upon becoming a Segment Master Browser, a Windows NT computer determines who the PDC is by sending a query (using the NetGetDcName API) to all LMHOSTS entries with the #DOM:<localdomain> designation. Only the PDC responds. The Windows NT computer then contacts the PDC, informs the PDC that it is a master browser, then continues the process of getting the domain browse list. The PDC then contacts the Windows NT computer to get its local segment browse list. This process repeats every 12 to 15 minutes.Windows 95 and Windows for Workgroups Segment Master BrowsersThese do not perform the NetGetDcName API, so they need entries in the LMHOSTS file that indicate who the PDC is. Assuming the example above is the PDC of the domain, you would have two entries for a Windows 95 or Windows for Workgroups client:199.199.199.1 controller1 #PRE #DOM:domainname 199.199.199.1 "domainname,,,,,\0x1b" #PRE
Note About NetBIOS NamesEvery NetBIOS name is a full 16 characters in length; the first 15 are user definable (or padded with spaces), and the 16th character is reserved to identify the network service that registered the name. The most familiar example of a NetBIOS name is the ComputerName on any Microsoft networking client. When the client is booted, various client network services will register the ComputerName along with their unique extension, such as ComputerName<00> (workstation service), and ComputerName<20> (server service). In this case, the only difference between these two names is the 16th character - and that does make them individually identifiable. A client can register all of its names by broadcast, and by direct datagram to WINS, depending on the client node type. Other companies may also register NetBIOS extensions that are not reserved by Microsoft.For more information, please see the following articles in the Microsoft Knowledge Base: 119493
(http://support.microsoft.com/kb/119493/EN-US/
)
NetBIOS over TCP/IP Name Resolution and WINS
119495
(http://support.microsoft.com/kb/119495/EN-US/
)
List of Names Registered with WINS Service
LMHOSTS ExampleYour domain name is "Globe", your PDC NetBIOS name is "Mongo", and you have other various backup domain controllers. Your LMHOSTS file would look like this:199.199.199.1 "globe \0x1b" #PRE 199.199.199.1 mongo #PRE #DOM:globe 199.199.199.2 otherdc1 #PRE #DOM:globe 199.199.199.3 otherdc2 #PRE #DOM:globe c:\> nbtstat -c NetBIOS Remote Cache Name Table Name Type Host Address Life [sec] ------------------------------------------------------------ globe <1B> UNIQUE 199.199.199.1 -1 MONGO <03> UNIQUE 199.199.199.1 -1 MONGO <00> UNIQUE 199.199.199.1 -1 MONGO <20> UNIQUE 199.199.199.1 -1 OTHERDC1 <03> UNIQUE 199.199.199.2 -1 OTHERDC1 <00> UNIQUE 199.199.199.2 -1 OTHERDC1 <20> UNIQUE 199.199.199.2 -1 OTHERDC2 <03> UNIQUE 199.199.199.3 -1 OTHERDC2 <00> UNIQUE 199.199.199.3 -1 OTHERDC2 <20> UNIQUE 199.199.199.3 -1 Multi-Domain Browsing with LMHOSTSIt is important to note that the main drawback to LMHOSTS browsing is that it does not provide the automatic ability of multi-domain browsing. As previously mentioned, the PDC will query WINS for a list of remote domains and include that information in its browse list. However, the PDC will not parse the LMHOSTS file for the same information, nor will it include other \0x1b entries with the #PRE (cache) directive. Effectively, if your PDC does not query WINS, you will not see other domains through File Manager or Network Neighborhood. However, you can still browse other domains manually, (provided that you know the domain name and that you have special entries in your LMHOSTS file), and there is still a chance that you may browse remote domains based on broadcasts.Manual Method: this is accomplished by including a \0x1b entry for the PDC of any remote domain you want to browse. This technique applies to Windows NT, Windows 95, and Windows for Workgroups. It is effective because of the following sequence of events, necessary for remote domain browsing:
For WinNT computers: c:\net view /domain:<domainname>
Broadcast Method: This works in the case of any network segment that has
members of multiple domains. There is a SegMB of each domain on the
"mutual" segment, and each SegMB announces its domain via broadcast to
a special NetBIOS name <01><02>_MSBROWSE_<02><01>. This broadcast packet includes the domain name and the computer name of the SegMB that announced it.
For Win95 and WFW: c:\net view /workgroup:<domainname> The SegMBs of other domains (on this mutual segment) listen for this information, and add it to their local browse list. A SegMB on this segment has now "discovered" other domains, and send the discovered information to: the DomMB of his domain, and to local clients (in his domain) that request a browse list. A client requests the local domain browse list (from a local SegMB) and see the discovered domains in File Manager and Network Neighborhood. When the client selects the discovered domain, he actually requests a browse list directly from the SegMB that made the announcement in the <01><02>_MSBROWSE_<02><01> packet. Furthermore, since this information was also sent to the client's DomMB, it is propagated to SegMB's on other segments that are part of this domain. Clients on a remote segment can now leverage this information, and browse the remote domain even though there is no remote domain member on their segment. However, this process is very volatile using LMHOSTS files, because you are dependent on the "discovered remote SegMB's" still being active. In a WINS environment, this remote browsing feature is much more stable because WINS provides information about the remote domains to your PDC. Things to consider:
APPLIES TO
| Article Translations
|

Back to the top
