3.22. Changing the Preference for a Domain Controller

Problem

You want a particular domain controller to be used less frequently for client requests or not at all. This may be necessary if a particular domain controller is overloaded, perhaps due to application requests.

Solution

You can modify the Priority or Weight fields in SRV resource records by modifying the registry on the domain controller. Open regedit or regedt32 on the domain controller and browse to the following key: HKLM\SYSTEM\CurrentControlSet\Services\Netlogon\Parameters. To configure the Priority, add a REG_DWORD with the name LdapSrvPriority. To configure the weight, add a REG_DWORD with the name LdapSrvWeight.

After you make the change, the %SystemRoot%\System32\Config\netlogon.dns file should be updated and the DDNS updates sent to the DNS server within an hour. You can also restart the NetLogon service to expedite the process.

Discussion

Each domain controller registers several SRV records that clients use as part of the DC locator process to find the closest domain controller. Two fields of the SRV record let clients determine which server to use when multiple possibilities are returned. The Priority field is used to dictate if a specific server or set of servers should always be contacted over others unless otherwise unavailable. A server with a higher priority (i.e., lower priority field value) will always be contacted before a server with a lower priority. For example, if DC1 has a SRV priority of 5 and DC2 ...

Get Active Directory Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.