<?xml version='1.0'?>
<chapter>
<title>Browser Service</title>
<para>
Microsoft first implemented the Browser Service as a proprietary protocol. 
The Browser service makes systems visible in the "Network Neighbourhood" within 
Windows operating systems such as Windows for Workgroups, Windows 9.x and 
Windows NT and NT2000. The Browser Service also operates in environments such as 
LAN Manager, LAN Server and OS/2 networks. The Browser Service has nothing to do 
with Web browsing or HTTP. The Browser Service registers SMB (NetBIOS) names 
dynamically and makes this dynamic list available to systems on the network. The 
Browser Service runs over SMB (and is described as running over a "mail slot" 
protocol over SMB). SMB runs over either NetBIOS Frames Protocol, NBF, often 
referred to as NetBEUI, or NetBIOS over TCP/IP, or over NetBIOS over IPX/SPX. 
Thus the Browser service is independent of the transport used to carry SMB.
</para>
<para>
Because the Browser Service is concerned with the registration of SMB 
(NetBIOS) names and is dynamic, it is sometimes confused with the NetBIOS Name 
Service (NBNS) that maps NetBIOS names to IP addresses. An example of NBNS is 
Microsoft WINS. The Browser Service and NBNS are two separate services.
</para>
<para>
In very broad terms, the Browser Service can be seen as providing a similar 
function to the Service Advertising Protocol (SAP) in NetWare environments. Lan 
Manager servers broadcast their presence over the network and the Browser 
Service was developed as a solution to the scalability problems of such an 
arrangement. (Novell developed Novell Directory Services, NDS, to reduce or even 
replace the need for SAP traffic.) It is important to note that Windows for 
Workgroups, Windows 9.x systems, Windows NT workstations and NT2000 workstations 
can share files and thus be servers; in such peer to peer networking 
environments every system is potentially a server.
</para>
<section>
<title>History</title>
<para>
With Lan Manager 1.0, servers broadcast their presence over the network and 
client systems listened for such broadcasts to discover servers. This is not 
dissimilar to the early Novell NetWare systems where servers advertised 
themselves over the network by broadcasting Service Advertising Protocol (SAP) 
packets.
</para>
<para>
When Microsoft introduced Windows for Workgroups, each PC could share it's 
resources acting as a server as well as acting as a client. Thus the number of 
servers on the network could potentially equal the number of PCs and become very 
large. The original broadcast system would not scale in such an environment. It 
was at this point that the first implementation of the browser service was 
introduced.
</para>
<para>
With the introduction of Windows NT, the browser service was expanded to 
include domains.
</para>
<para>
Following the development of the next version of SMB, CIFS, Microsoft 
published the latest version of the Browser protocol as a draft of an internet 
draft "CIFS/E Browser Protocol". This draft document specifies version 1.15 of 
the browsing protocol.
</para>
</section>
<section>
<title>Overview</title>
<para>
Browser Servers maintain lists of Servers and the services they offer. Other 
systems, known as Browser Clients (which may also be Browser servers) query the 
Browser Servers for information. When Servers come on line they register 
themselves with the Browser Servers. The Servers are organized in to logical 
groups according to which group they belong to; these can be "Workgroups" or 
Domains" and correspond to SMB / NetBIOS group names.
</para>
<para>
Browser Servers, sometimes simply known as Browsers, can occupy a number of 
rolls, serving the needs of a particular group or sub-net:
</para>
<itemizedlist>
<listitem>
<para>Domain Master Browser (is Local Master Browser for the sub-net it is on)</para>
</listitem>
<listitem>
<para>Local Master Browser</para>
</listitem>
<listitem>
<para>Backup Browser (maintain a copy of the information on the Local Master 
  Browser; they get it by periodically querying the Local Master)</para>
</listitem>
<listitem>
<para>Potential Browser (system that can become a Browser)</para>
</listitem>
</itemizedlist>
<para>
If a client system does not get a response from a Local Master Browser it can 
initiate an election. The Browser systems and Potential Browser systems 
communicate to decide which machine will become the Browser.
</para>
<para>
Client system will contact Browser servers for a list of servers within a 
group or for lists of groups. Typically clients will keep a list of several 
Browsers.
</para>
</section>
<section>
<title>Packets</title>
<para>
The Browser service uses "Mailslots" and is perhaps the only protocol that 
does. The mailslot "frames" are carried in SMB "transact" packets. The opcode 
within the Transact SMB packet is Mailslot Write. Within the data portion of the 
Transact packet is the mailslot frame. The Transact data itself begins with an 
opcode as shown below:
</para>
<table>
<title>Transact data opcodes</title>
<tgroup cols='2'>
<thead>
<row>
<entry>Opcode</entry>
<entry>description</entry>
</row>
</thead>
<tbody>
<row>
<entry>1</entry>
<entry>HostAnnouncement</entry>
</row>
<row>
<entry>2</entry>
<entry>AnnouncementRequest</entry>
</row>
<row>
<entry>8</entry>
<entry>RequestElection</entry>
</row>
<row>
<entry>9</entry>
<entry>GetBackupListReq</entry>
</row>
<row>
<entry>10</entry>
<entry>GetBackupListResp</entry>
</row>
<row>
<entry>11</entry>
<entry>BecomeBackup</entry>
</row>
<row>
<entry>12</entry>
<entry>DomainAnnouncment</entry>
</row>
<row>
<entry>13</entry>
<entry>MasterAnnouncement</entry>
</row>
<row>
<entry>15</entry>
<entry>LocalMasterAnnouncement</entry>
</row>
</tbody>
</tgroup>
</table>
</section>
<section>
<title>Further information</title>
<para>
Microsoft has published the latest version of the Browser protocol as a draft 
of an internet draft "CIFS/E Browser Protocol". The document is available as a 
Microsoft Word document at:
<ulink url='ftp://ftp.microsoft.com/developer/drg/cifs/cifsbrow.doc'>ftp://ftp.microsoft.com/developer/drg/cifs/cifsbrow.doc</ulink>
</para>
<para>
Some information is also available from the MSDN Library: The section 
"Windows Resource Kits" contains a section "Windows 95 Resource Kit" which 
contains "Chapter 11 Logon, Browsing, and Resource Sharing".
</para>
</section>
</chapter>

