Contacting a domain controller in Active Directory is done through DNS lookup. Several DNS SRV records are used to find domain controllers in a site. If multiple domain controllers are present in the same site, the client will arbitrarily select one, based on the contents of those records.
By default, the selection is random, and all DCs have an equal change of being picked. The inherit properties of SRV-records allow for this behaviour to be influenced, by changing the weight and priority of those records. This enables fine-tuning and configuration of which DC to favour or even exclude. By default, all SRV records (thus, all DCs) have their weight and priority set to 0.
The weight defines which of the DCs with the same priority, is more favoured than the other. A higher weight means it's favoured more.
Example: a DC with a weight of 200 will be used twice as much as a DC with a weight of 100.
The priority defines which of the DC will selected before the other, regardless of their weight. Lower value DCs will be selected over higher value DCs.
Example: a DC with a priority of 2 will only be selected if all DCs with a lower priority (0 and 1) are unavailable.
Setting the priority and weight can be done through the registry:
Weight: | LdapSrvWeight |
Priority: | LdapSrvPriority |
net stop NETLOGON && net start NETLOGON
« ‹ | December 2024 | › » | ||||
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 31 |