Browser elections occur to select a new master browser under the following circumstances.
A computer initiates an election by sending a special datagram called an election datagram. All browsers can receive election datagrams. When a browser receives an election datagram, it examines that datagram's election criteria. If the browser has better election criteria than the sender of the election datagram, the browser will issue its own election datagram and enter what is called an election in progress state. If the browser does not have better election criteria than the sender of the election datagram, the browser attempts to determine which system is the new master browser.
Figure 3.2 Browser election
The election criteria for a browser is based on the browser's current role in the domain and its current state, using the hierarchy in Table 3.2.
Table 3.2 The hierarchy of criteria for a browser election
Operating System Type | 0xFF000000 |
Windows for Workgroups or Windows 95 | 0x01000000 |
Windows NT Workstation | 0x10000000 |
Windows NT Server | 0x20000000 |
Election Version | 0x00FFFF00 |
Per Version Criteria | 0x000000FF |
PDC | 0x00000080 |
WINS System | 0x00000020L |
Preferred Master | 0x00000008 |
Running Master | 0x00000004 |
MaintainServerList = Yes | 0x00000002 |
Running backup browser | 0x00000001 |
The browser will use all of the appropriate election criteria to determine the sending computer's election criteria.
The following criteria determine whether or not a browser has won an election.
When a browser receives an election datagram indicating that it wins the election, the browser enters the running election state. While in this state, the browser sends out an election request after a delay, based on the browser's current role in the domain.
This delay occurs because Windows for Workgroups browsers go "deaf" for several hundred microseconds after sending an election datagram. This delay reduces the number of election datagrams sent. A browser winning an election may receive a different election datagram, causing it to lose an election later. By having less-likely winners delay longer, the less-likely winners typically don't send election datagrams.
The browser sends up to four election datagrams. If no other browser responds with an election criteria datagram that would win the election, the computer is promoted to master browser. If the browser receives an election datagram indicating that another computer will win the election, and the computer is currently the master browser, the computer will demote itself from master browser and become a backup browser.
To force an election, the client computer will broadcast an election datagram to the domain, indicating that an election should occur. This datagram is created to prevent the client that sends the datagram from winning the election.
When an election occurs, the Browser service on the computer that forced the election will log an event in the Event Viewer System log, indicating that it forced the election. An event is logged for each protocol on which the Browser service forces an election.