Share via


How Computer Browser Service Works

Applies To: Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1, Windows Server 2003 with SP2

How Computer Browser Service Works

In this section

  • Computer Browser Service Architecture

  • Registration and Propagation

  • Computer Browser Service Announcements

  • Browser Elections

  • Number of Browsers in a Domain

  • Multiple Subnets

  • Computer Browser Service Across an IP Router

  • Name Resolution

Computer Browser service is a networking technology used by Windows-based computers to collect, distribute, and obtain browse lists, which are collections of information about workgroups, domains, and the computers within them. The service is essential for computers running Windows 98 or Windows Millennium Edition to browse for resources and it is required in Windows Server 2003, Windows XP, and Windows 2000 for using applications such as My Network Places, Windows Explorer, and the net view command.

Computer Browser service typically uses connectionless server broadcasts to communicate between nodes. Registration, announcements, and browser elections are performed by the service to provide the network with a list of available resources.

Computer Browser service operates ideally in a Windows network where several computers play various browser roles. Together, these browser roles form the browser system.

Computer Browser Service Architecture

The architecture of Computer Browser service is complete when several computers are brought together on a network to perform browse service roles. Individually, these roles are just parts of the browse service, but when combined on the network, they form a browser system that enables efficient sharing of network resource information.

Browser System Roles

There are five browse service roles that computers can play in the browser system:

  • Non-browser

  • Potential browser

  • Backup browse server

  • Master browse server

  • Domain master browse server

The figure below shows an example of browser system roles played by computers on a single subnet.

Browser System Containing Browsers and Non-Browsers on a Subnet

System with Browsers and Non-Browsers on a Subnet

The table below lists each of the browse service roles and describes its function in the architecture of the browser system.

Browser Roles and Functions

Role Function

Non-browser

A non-browser is a computer that has been configured not to maintain a browse list.

Potential browser

A potential browser is a computer that is configured to be capable of maintaining a browse list. Such a computer can act as a backup browse server if instructed to do so by the master browse server. Or, it can be elected as a master browse server.

Backup browse server

The backup browse server receives a copy of the browse list from the master browse server and distributes the list, upon request, to computers in the domain or workgroup. All Windows Server 2003 domain controllers are configured as either master browse servers or backup browse servers.

Master browse server

The master browse servercollects the information necessary to create and maintain the browse list. The browse list includes the names of all servers in the same domain or workgroup as the master browse server and a list of all domains on the network.

Domain master browse server

The domain master browse server collects browse lists from master browse servers on other subnets and also serves as the master browse server for its subnet. This role is typically performed by the primary domain controller (PDC) for a domain.

Registration and Propagation

When a server starts, it immediately broadcasts a Host Announcement message to announce its presence to the master browse server. Host Announcement messages are transmitted again after four, eight, and 12 minutes, and then every 12 minutes thereafter.

Allowing for the loss of a few messages, the server acting as the master browse server adds the new server to its browse list within 12 minutes after the new server starts. The process of adding a new server entry to the master browse server’s browse list is called registration.

After the initial host announcements are sent, new entries are transmitted through unicast sessions:

  • To the browse list from the master browse server and to the domain master browse server.

  • From the domain master browse server to master browse servers when master browse servers and domain master browse servers are located on different subnets.

Unicast sessions provide reliable data delivery of browse list updates.

Within the second 12 minutes after the server starts, the master browse server connects to the domain master browse server to obtain the domain-wide list. Concurrently, the domain master browse server connects to the master browse server and obtains a browse list containing the new server. Master browse servers on remote subnets connect to the domain master browse server at 12-minute intervals, so they are quickly informed of the new server’s existence. Immediately after these remote master browse servers are informed, all of the backup browse servers will connect to their respective master browse servers, and so will also be informed of the new server. The figure below shows the propagation sequence for a host announcement.

Host Announcement Propagation

Host Announcement Propagation

Removing computers from the browse list when they are no longer connected to the network can take longer than adding new ones. To allow for messages that might be lost during transmission, the master browse server does not remove a server from its list until three announcement periods (36 minutes) have passed.

If the server is shut down gracefully, it sends a single Host Announcement message to the master browse server, indicating that it is no longer acting as a server. Upon receipt of this message, the master browse server immediately removes the server from its local list. On a healthy network, the removal of a server’s name takes 36 minutes or less to propagate to all the master browse servers in the domain.

If the server is not shut down gracefully, or if network connectivity is lost, the server remains in the master browse server’s list for up to 36 minutes. After that time, the domain master browse server is notified by the master browse server to remove the server name from its list. Within another 12 minutes, a master browse server on a remote subnet obtains the domain-wide list from the domain master browse server, and within an additional 12 minutes, each backup browse server on the remote subnet is notified to remove the server name from its list. Thus, removing a computer from the browse list can take as long as 72 minutes.

Unlike WINS or DNS server roles, browse server roles are not statically defined. Instead, they are dynamically defined with periodic browser elections. (As a result, it can be difficult to determine the flow of communication that is used by the servers in a specific instance to provide the browse list to a particular browse client.)

If a master browse server is gracefully shut down, it forces an election and a new master browse server is established promptly. This conversion occurs most quickly when a backup browse server, which already has a fully populated list, wins the election.

If a server acting as the master browse server for a subnet is not gracefully shut down, or if the Request Election message is lost, there might be a delay of several minutes until browsing is active again on that subnet. If a client cannot find a master browse server by sending the Get Backup List Request message, the client forces an election. If no client requests a browse list, it can take up to 12 minutes until a backup browse server discovers that there is no master browse server. Whenever a backup browse server discovers that there is no master browse server, it forces an election, and within another 12 minutes, browsing is active again.

Browser Requests

The purpose of Computer Browser service is to make the browse list — a list of workgroups, domains, and the computers within them — available to browse clients. To obtain the list of network resources, the browse client must first select an appropriate computer from which to request a copy of the list. The client selects a computer by sending a broadcast Get Backup List Request message. The master browse server on the subnet responds with a unicast message containing a list of up to three backup browse servers. The browse client then chooses one of the backup browse servers and sends it a message requesting the browse list. The selected browse server sends the contents of its browse list. The figure below shows the flow of the messages.

Browser Request Flow

Browser Request Flow

If the master browse server for the workgroup or domain being queried cannot be found after three attempts, the client forces the election of a new master browse server in the domain.

Computer Browser Service Announcements

Every computer running Windows that has the file sharing component installed and enabled on a network interface broadcasts a periodic (every 12 minutes) Host Announcement message on the local subnet. On the master browse server for the subnet, these messages are used to maintain the list of available servers in the browse list

Browser Announcements

Browser Announcements

Master browse servers receive announcements from, and return lists of backup browse servers to, computers running Windows 98, Windows Millennium Edition, Windows 2000, Windows XP, or Windows Server 2003.

When a computer starts, if the value of the MaintainServerList entry in its registry is Auto, the master browse server is responsible for telling the computer whether or not to become a backup browse server.

When a computer becomes the master browse server by winning an election, its browse list is empty, so it broadcasts an Announcement Request message. All computers that receive an Announcement Request message must reply with an announcement after a random delay of up to 30 seconds. This 30-second range for responses prevents the master browse server from becoming overloaded and losing replies, and it protects the network from being flooded with responses.

A master browse server cannot be directly forced to rebuild the browse list for a workgroup or domain. However, shutting down and restarting a computer that is configured as the preferred master browse server, or stopping and restarting Computer Browser service on that computer, forces the building of a new browse list. This happens because when a preferred master browse server starts, it forces an election, which it wins. The preferred master browse server has no browse list at startup, so it then forces all members of the domain or workgroup to announce themselves.

If a master browse server receives an announcement from another computer that claims to be the master browse server, the master browse server receiving the announcement demotes itself from its role as a master browse server and forces an election. This demotion process ensures that there is never more than one master browse server in each workgroup or domain.

Non-Browser Announcements

After a non-browser computer starts, it periodically broadcasts a Host Announcement message on the subnet to announce its availability. Announcements are sent 1 minute, 2 minutes, 4 minutes, 8 minutes, and 12 minutes after the non-browser starts, and every 12 minutes thereafter. If the master browse server has not received an announcement from the non-browser for three consecutive announcement periods (36 minutes), the master browse server removes the non-browser from the browse list.

Potential Browser Announcements

Most computers are potential browsers — that is, they are capable of becoming either backup browse servers or master browse servers. These computers announce themselves in the same manner as non-browsers.

Backup Browse Server Announcements

Backup browse servers announce themselves in the same manner as non-browsers. However, backup browse servers do participate in browser elections. Backup browse servers connect to the master browse server every 12 minutes to obtain updates to the browse list. The backup browse server stores these lists and returns the browse list to any client that sends it a browse request. If the backup browse server cannot find the master browse server, it forces an election.

Browser Announcement Time Configuration

To change how often a computer running Computer Browser service announces itself, add a registry entry called Announce with a value that has the REG_DWORD data type. Set the value of the Announce entry to the number of seconds that the browser should wait between announcements. Add Announce to the following registry subkey:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters

For example, the default value of the Announce entry is 720, which defines an announcement interval of 12 minutes.

The value of the Announce entry must be changed on all computers in the workgroup or domain before all computers can use the new value. Decreasing this value has the effect of decreasing the length of time that an unavailable computer appears on the browse list, but it also increases announcement traffic. On the other hand, increasing the value of Announce reduces the amount of announcement traffic, but it increases the length of time that an unavailable computer appears on the browse list.

Note

  • Do not use a registry editor to edit the registry directly unless you have no alternative. The registry editors bypass the standard safeguards provided by administrative tools. These safeguards prevent you from entering conflicting settings or settings that are likely to degrade performance or damage your system. Editing the registry directly can have serious, unexpected consequences that can prevent the system from starting and require that you reinstall Windows Server 2003. To configure or customize Windows Server 2003, use the programs in Microsoft Management Console (MMC) or Control Panel whenever possible.

Browser Elections

Browser elections occur to select a new master browse server under the following circumstances:

  • When a computer cannot locate a master browse server.

  • When a preferred master browse server comes online.

  • When a Windows-based domain controller starts.

  • When a back-up browse server cannot contact the master browse server to obtain updates to the browse list.

A computer initiates an election by broadcasting a Request Election message. When an election occurs, Computer Browser service on the computer forcing the election logs an event in the system log, indicating that it forced the election.

All browsers can receive Request Election messages. When a browser receives a Request Election message, it examines the election criteria of that message. If the browser has a higher ranking value of the same election criteria than the sender of the Request Election message, the browser sends its own Request Election message and enters an election in progress state. If the browser does not have higher ranking value of the same election criteria than the sender of the Request Election message, the browser attempts to determine which computer is the new master browse server. The following figure shows computers performing a browser election.

Browser Election

Browser Election

The election criteria for a browser are based on the current role of the browser in the domain and its current state, as shown in the following table.

Browser Election Criteria

Election Criteria Value Windows Election Field

Windows 98

0x01000000

Windows XP Professional, Windows 2000

0x10000000

Windows Server 2003, Windows 2000 Server

0x20000000

Election version

0x00FFFF00

Version-specific criteria

0x000000FF

PDC

0x00000080

WINS system

0x00000020

Preferred master

0x00000008

Running master

0x00000004

MaintainServerList = Yes

0x00000002

Running backup browse server

0x00000001

The browser uses all of the appropriate election criteria to determine the election ranking of the sending computer.

The following rules determine whether a browser has won an election:

  • If the election version of the browser is greater than the election version of the sender, the browser wins. If not, the browser uses the next election criterion. (The election version is a constant value that identifies the version of the browser-election protocol; it is not related to the operating-system version.)

  • If the value of the election criteria for the browser is greater than that for the sender, the browser wins. If not, the browser uses the next election criterion.

  • If the browser has been running longer than the sender, the browser wins. If not, the browser uses the next election criterion.

  • If none of the rules above have determined the election, then the server with the lexically (alphabetically, including numbers and symbols) lowest name wins. For example, a server named “A” will win an election to become master browse server over a server named “B.”

Running Election State

When a browser receives a Request Election message indicating that it wins an election, the browser enters the running election state. While in this state, the browser sends out a Request Election message after a delay. The delay is based on the current role of the browser in the domain:

  • Master browse servers and the primary domain controllers delay for 100 microseconds (ms).

  • Backup browse servers and backup domain controllers randomly delay for 200 ms and 600 ms.

  • All other browsers randomly delay between 800 ms and 3000 ms.

The browser sends up to four Request Election messages. If no other browser responds with a Request Election message that wins the election, the browser that sent the Request Election messages is promoted to master browse server. If the browser receives a Request Election message indicating that another computer wins the election, and the computer is currently the master browse server, the computer demotes itself from master browse server and becomes a backup browse server.

Number of Browsers in a Domain

Computer Browser service uses the following rules to set the number of browsers in a domain:

  • If there is currently a primary domain controller (PDC) in the domain, it is designated as the domain master browse server.

  • Every backup domain controller (BDC) in the domain is a backup browse server for the domain. The only exception to this rule occurs when the PDC has failed. In that case, the BDC becomes the domain master browse server.

Note

  • PDC failure can be a problem because the DOMAIN[1B] entry, used to locate the Domain Master browse server, is only updated if the backup domain controller is promoted.

If the registry of a computer has the value of the MaintainServerList entry set to Yes, the computer is a backup browse server for the domain or IP subnet.

If no backup browse servers are selected for the domain based on the preceding rules, the master browse server sets the number of backup browse servers to be used for the domain, and then selects — from among those computers that have the value of the MaintainServerList entry set to Auto — that number of specific computers to act as browsers.The table below shows the number of backup browse servers that are selected, based on the number of computers in the domain.

Number of Master or Backup Browse Servers in a Domain

Number of Computers* Number of Backup Browse Servers Number of Master Browse Servers

1

0

1

2 to 31

1

1

32 to 63

2

1

* For each additional 32 computers added to a domain, another backup browse server is added.

In a TCP/IP network, each subnet independently enforces the preceding rules.

Multiple Subnets

Users might need to query multiple workgroups and domains to retrieve a list of servers within their workgroup or domain and create lists of other workgroups and domains. The figure below shows Computer Browser service operating with multiple domains and workgroups on the same subnet.

Computer Browser Service Across Multiple Domains

Computer Browser Service Across Multiple Domains

Upon becoming a master browse server, the master browse server for each subnet broadcasts a Local Master Announcement message every minute for the first five minutes. After the first five minutes, the master browse server broadcasts a Local Master Announcement message once every 12 minutes. If a subnet has not announced itself for three consecutive announcement periods, the subnet is removed from the list. Thus, a subnet might remain in the browse list for up to 45 minutes after failing or being shut down.

A Local Master Announcement message contains the following information:

  • The name of the domain or workgroup

  • The name of a master browse server (which might or might not be a PDC) for that domain

  • The version number of the operating system

If the browser computer is running Windows Server 2003 or Windows 2000 Server, the Local Master Announcement message also specifies whether or not the browser computer is the domain PDC.

Computer Browser Service Across an IP Router

When you use domains that are split across routers, the TCP/IP subnets function as independent browsing entities, each with its own master browse server and backup browse servers. Therefore, browser elections occur within each subnet. In contrast, workgroups do not span across an IP router.

Domain master browse servers collect the domain browse list, which includes the set of computers in the domain, and the set of other domains and workgroups. The master browse server on each subnet collects the set of computers in the domain and other domains and workgroups from received announcements; then the master browse server forwards this information to the domain master browse server. The domain master browse server periodically downloads the domain browse list to each master browse server, which in turn updates its backup browse servers.

The figure below shows Computer Browser service functioning across an IP router.

Computer Browser Service Across an IP Router

Computer Browser Service Across an IP Router

When a domain spans multiple subnets, the master browse servers for each subnet use a unicast Master Announcement message to announce themselves to the domain master browse server. This message notifies the domain master browse server that the sending computer is a master browse server in the same domain. When the domain master browse server receives a Master Browse Server Announcement message, it returns to the “announcing” master browse server a request for a list of the server’s in that master browse server’s subnet. When that list is received, the domain master browse server merges it with its own server list.

This process, repeated every 12 minutes, guarantees that the domain master browse server has a complete browse list of all the servers in the domain. Thus, when a client sends a browse request to a backup browse server, the backup browse server can return a list of all the servers in the domain, regardless of the subnet on which those servers are located.

Note

  • It is possible on some routers to enable the forwarding of NetBIOS broadcasts. This causes Computer Browser service to work as if all computers were connected to the same subnet. However, this practice propagates broadcast traffic and can create problems with browser elections. Microsoft recommends that you do not enable the forwarding of NetBIOS (UDP port 137 and UDP port 138) broadcast packets across routers.

Name Resolution

Name resolution is critical for browsing to operate properly across IP routers. For most networks, this means that the Windows Internet Name Service (WINS) infrastructure must be working properly:

  • All computers that have the potential to become master browse servers on an IP internetwork must be able to resolve the DomainName<1b> entry for the domain master browse server.

  • The master browse servers must also be able to resolve the ComputerName<00> of the domain master browse server.

The unicast Master Announcement messages sent by the master browse servers on each subnet contain the name of the master browse server computer. The domain master browse server resolves the NetBIOS name ComputerName<00> to obtain the IP address of the master browse server and to request the master browse server’s locally collected browse list.

A browse client must be able to resolve the names of the backup browse servers sent to it by the master browse server on the subnet. When a client views the shared resources of a specific computer, it must be able to resolve the NetBIOS name ComputerName<20>. Therefore, all clients in the domain must be able to resolve the IP address of any server in the domain.

To resolve NetBIOS names so that browsing can work across IP routers, you can use WINS (recommended) or Lmhosts file entries.

Windows Internet Name Service

The Windows Internet Name Service (WINS) resolves IP addresses from NetBIOS names so that messages can be sent to the targeted computer. Implementing WINS eliminates the need to configure the Lmhosts file. Using WINS requires the following configuration:

  • A WINS server is configured on a computer running the Windows Server 2003 family or Windows 2000 Server.

  • Clients are WINS-enabled.

WINS clients can be computers running Windows Server 2003, Windows XP, Windows 2000, Windows Me, and Windows 98.

It is recommended that you implement WINS for name resolution and browsing support.

Windows Me and Windows 98 clients will participate in domain browsing only if they are configured to use a workgroup name that is the same as the domain name.

Lmhosts File

NetBIOS name resolution is typically performed through broadcasts, which will resolve names only on the local subnet. To resolve names of computers located on another subnet, the Lmhosts file (located in the directory systemroot\System32\drivers\etc) must be configured. The Lmhosts file must contain a NetBIOS name–to–IP address mapping for all computers that are not on the local subnet.

To implement communication between subnets and the domain master browse server, the administrator must configure the Lmhosts file with the NetBIOS names and IP addresses of all browsers. To ensure that the master browse server for each subnet can access the domain’s PDC, the PDC for each domain must have an entry in the Lmhosts file for each master browse server. Also, each entry must have the tag #DOM, which designates the named computer as a domain controller.

To guarantee that the domain master browse server can request the local browse list from the master browse server of each subnet, the Lmhosts file on the domain master browse server must contain entries for all the potential master browse servers. Thus, the Lmhosts file on the master browse server of each subnet needs to contain the following information:

  • IP address and NetBIOS name of the domain master browse server

  • Domain name, preceded by the tags #PRE and #DOM

The following is an example of such an Lmhosts file entry:

131.107.7.80 MasterBrowserName #PRE #DOM:domain_name