3.3.6 Timer Events

DomainAnnouncement timer: When the DomainAnnouncement timer expires and the machine is a local master browser server, it MUST send a DomainAnnouncement (section 2.2.7) by issuing a mailslot write as specified in [MS-MAIL] section 3.1.4.1 with the parameters shown in the following table.

Parameter Name

Value

NetBIOS name of the remote server

[0x01][0x02]__MSBROWSE__[0x02][0x01]

Mailslot name

\MAILSLOT\BROWSE

Data

DomainAnnouncement as specified in section 2.2.7.

The server SHOULD continue processing as described below even in the send fails.

Next, the server MUST increment DomainAnnouncement Timer Count by 1, and MUST set the timer values (in minutes) according to the following table.

DomainAnnouncement timer count value

New DomainAnnouncement timer value

1

1 minute

2

1 minute

3

5 minutes

4

5 minutes

5

10 minutes

6

10 minutes

> 6

15 minutes

Election Delay Timer: When this timer expires, the browser server MUST send a RequestElection frame, as specified in section 3.3.5.11, and increment the election transmission count.

The server SHOULD continue processing as described below even if the send fails.

If this counter is less than 4 and the browser server has "won" the election for the first time, or if the browser server lost the election last time and "won" this time, then the browser server MUST reset the election delay timer, as shown in the following table. Otherwise, the election delay timer has to be set to 1000 msec.

Browser role

Election delay timer

Local master browser

100 msec

Backup browser

A pseudo-random number chosen from the range 200 msec to 600 msec

Potential browser

A pseudo-random number chosen from the range 800 msec to 3000 msec

If the election transmission count is greater than 30, the browser server MUST consider the election as lost. If the browser server whose Current Role is equal to local master browser, the browser server MUST take the actions for losing an election, as specified in section 3.3.5.8.

When this counter reaches 4, the browser server MUST consider itself to have won the election and MUST perform the following actions:

  • The browser server must locate the domain master browser server, which is also the primary domain controller (PDC). This is done by locating the PDC as specified in [MS-ADTS] section 6.3.6.2. If the PDC is successfully identified, the browser server MUST send a Master Announcement frame (as specified in section 2.2.8) to the domain master browser server and start the Master Announcement timer. If the PDC cannot be located, no Master Announcement is sent.

  • A newly elected local master browser server that has an empty Servers List element MUST send an AnnouncementRequest frame, as specified in section 2.2.2 sent by issuing a mailslot write as specified in [MS-MAIL] section 3.1.4.1 with the parameters shown in the following table.

    Parameter Name

    Value

    NetBIOS name of the remote server

    <Machine Group Name>[0x1E]

    Mailslot name

    \MAILSLOT\BROWSE

    Data

    RequestElection as specified in section 2.2.2

The server SHOULD continue processing as described below even in the send fails.

  • A local master browser server MUST register the NetBIOS unique name <machine group>[0x1D]. If the NetBIOS name registration fails, the browser server MUST initiate a new election by sending a new ElectionRequest frame. For more information, see section 2.2.3.

  • If the Servers List element is not empty, the local master browser server MUST initialize the Backup Browser List by enumerating the servers in the Servers List element for servers with the backup browser (BB) flag set (as specified in [MS-RAP] section 2.5.5.2.1). If there are not sufficient backup browsers to meet the criteria, as specified in section 3.3.5.7, the master browser server MUST send BecomeBackup frames to the potential browsers, as specified in section 3.3.5.7.

LocalMasterAnnouncement Timer: When the LocalMasterAnnouncement timer expires, and the machine is a local master browser server, it MUST announce itself to all browser servers for its machine group on its subnet by sending a LocalMasterAnnouncement frame, as specified in section 2.2.9. The LocalMasterAnnouncement frame MUST be sent by issuing a mailslot write as specified in [MS-MAIL] section 3.1.4.1 with the parameters shown in the following table.

Parameter Name

Value

NetBIOS name of the remote server

<Machine Group Name>[0x1E]

Mailslot name

\MAILSLOT\BROWSE

Data

RequestElection as specified in section 2.2.10

The server SHOULD continue processing as described below even if the send fails.

Next, the server MUST increment LocalMasterAnnouncement Timer Count by 1, and SHOULD set the timer values (in minutes) according to the following table.<57>

LocalMasterAnnouncement timer count value

New LocalMasterAnnouncement timer value

1

2 minutes

2

2 minutes

3

4 minutes

4

8 minutes

> 4

12 minutes

Machine Group Expiration Timer: When the Machine Group Expiration Timer for a machine group in the Machine Groups List element expires, the machine group MUST be removed from the Machine Groups List element.

MasterAnnouncement Timer: When the MasterAnnouncement timer expires and the machine is a local master browser server, it MUST send a MasterAnnouncement, as specified in section 2.2.8. The MasterAnnouncement frame MUST be sent by issuing a mailslot write as specified in [MS-MAIL] section 3.1.4.1, with the following parameters.

Parameter Name

Value

NetBIOS name of the remote server

<PDCName>[0x00]

Mailslot name

\MAILSLOT\BROWSE

Data

MasterAnnouncement as specified in section 2.2.8.

The server SHOULD continue processing as described below even if the send fails.

It MUST reset the MasterAnnouncement timer.

NetServerEnum2 Timer: When the NetServerEnum2 timer expires, and the machine is a backup browser server, the machine MUST send a NetServerEnum2 request to the local master browser server on its subnet for its machine group, to get a list of servers in that machine group, as well as a list of machine groups. It MUST then reset the NetServerEnum2 timer.

If the NetServerEnum2 request fails twice in succession, the backup browser server MUST send a RequestElection frame (as specified in section 3.3.5.11). For more information on the election process, see section 3.3.5.8.

If the machine is instead a local master browser server and is a member of the domain, it MUST ask the domain master browser server for a domain-wide list of servers by issuing a NetServerEnum2 request with a ServerType parameter of 0xFFFFFFFF to retrieve the list of servers (as specified in section 3.3.5.6). This request retrieves the complete list of servers within the domain. The local master browser server then MUST issue the same request with the DL flag specified to retrieve the Master List of Machine Groups. It MUST merge the results with its own list of servers and Master List of Machine Groups. The criteria for merging results are implementation dependent.<58>

Server Expiration Timer: When the Server Expiration Timer for a server in the Servers List element expires, the server MUST be removed from the Servers List element, if the local master browser has not received a HostAnnouncement request from that server for more than three times the periodicity specified by the server in the most-recently received HostAnnouncement frame. The server MUST NOT be removed from the Servers List element before the periodicity field in the last HostAnnouncement frame received from the server has elapsed.

If the server being removed from the Servers List element is a member of the Backup Browser List, the local master browser server MUST remove the server from the Backup Browser List. It MUST also reevaluate its Backup Browser List according to the algorithm (as specified in section 3.3.5.7) and it issues BecomeBackup messages to selected servers, ensuring that there are sufficient backup browser servers based on the number of computers in the machine group.

FindMaster Timer: When this timer expires, the browser server MUST signal its expiration to the BecomeBackup processing routine that initialized the timer as specified in section 3.3.5.1.

DomainControllerRoleMonitor Timer: When this timer expires, the browser server MUST query the current domain role for the machine on which it is running by calling SamrQueryInformationDomain as specified in [MS-SAMR] section 3.1.5.5.2.

The browser server first performs a SamrConnect using its own name as the server name and an access mask of SAM_SERVER_CONNECT. The out parameter ServerHandle is used to perform a SamrQueryInformationDomain using the DomainServerRoleInformation value (as specified in [MS-SAMR] section 2.2.4.16). The returned buffer contains a DOMAIN_SERVER_ROLE_INFORMATION structure (see [MS-SAMR] section 2.2.4.1 for a detailed explanation of the fields).

If this call fails, the browser server SHOULD set the DomainControllerRoleMonitor Timer to 1 second.<59>

If the call succeeds, the IsDomainController and IsPrimaryDomainController SHOULD be initialized based on the DomainServerRole value in the returned SAMPR_DOMAIN_GENERAL_INFORMATION structure as specified in the following table.<60>

For DomainServerRole:

Enumeration DOMAIN_SERVER_ROLE value

unsigned long value

DomainServerRoleBackup

2

DomainServerRolePrimary

3

If the call succeeds, the browser server MUST perform the following:

  • If IsPrimaryDomainController is FALSE and the DomainServerRolePrimary is equal to 3, the browser server MUST set IsPrimaryDomainController to TRUE and follow the actions specified in the PromotedToPrimaryDomainController section 3.3.4.1.

  • If IsPrimaryDomainController is TRUE and DomainServerRolePrimary is not equal to 3, the browser server MUST set IsPrimaryDomainController to FALSE and follow the actions specified in the DemotedToBackupDomainController section 3.4.4.1.

Then the browser server SHOULD set the DomainControllerRoleMonitor Timer to 1 second.<61>

The server MUST disable advertising of the domain-related services as specified in [MS-SRVS] section 3.1.6.10, passing  SV_TYPE_DOMAIN_CTRL and SV_TYPE_DOMAIN_BAKCTRL as input parameters.

If IsPrimaryDomainController is TRUE, the server MUST enable advertising of the PDC service as specified in [MS-SRVS] section 3.1.6.9, passing SV_TYPE_DOMAIN_CTRL as the input parameter.

If IsDomainController is TRUE but IsPrimaryDomainController is FALSE, the server MUST enable advertising of the domain controller as specified in [MS-SRVS] section 3.1.6.9, passing  SV_TYPE_DOMAIN_BAKCTRL as the input parameter.

Show: