How Windows Clients Discover a Domain Controller Using DNS SRV Records
Understand how Active Directory clients locate Domain Controllers, what DNS SRV records do, and why DHCP is important for getting the client ready to communicate with the domain.
How does a client find a Domain Controller?
When a Windows computer needs to communicate with Active Directory, it must locate an available Domain Controller (DC). It normally does this through DNS-based discovery. The client queries DNS for special Service (SRV) records that advertise Active Directory services.
1. What does DHCP actually do?
DHCP (Dynamic Host Configuration Protocol) automatically provides network configuration to clients. Instead of manually configuring every computer, a DHCP server can assign an IP address and provide other network settings.
When a client joins a network, it can use the DHCP process commonly remembered as DORA:
Common DHCP options
| Option | Name | What it provides |
|---|---|---|
| 001 | Subnet Mask | Defines which part of the IP address identifies the network. |
| 003 | Router | Provides the default gateway used to reach other networks. |
| 006 | DNS Servers | Provides the IP addresses of DNS servers the client should use. |
| 015 | DNS Domain Name | Provides the client’s DNS domain name or connection-specific DNS suffix. |
2. What does DNS do in Active Directory?
DNS translates names into IP addresses, but in an Active Directory environment it does more than resolve ordinary hostnames. It also publishes information about services available in the domain.
Domain Controllers register DNS records that advertise services such as LDAP and Kerberos. These records allow clients to discover which servers provide the services they need.
📘 A record
Maps a hostname to an IPv4 address. For example, DC01.example.com might resolve to 192.168.1.10.
📗 SRV record
Advertises a service, including the server hostname, port, priority and weight. Active Directory uses SRV records for service discovery.
In short, an SRV record helps the client discover which server provides a service. The client can then resolve that server’s hostname to an IP address.
3. The important Active Directory SRV record
A commonly used SRV record for locating Domain Controllers is:
_ldap._tcp.dc._msdcs.example.com
Replace example.com with your own Active Directory DNS domain name.
Breaking down the record
| Part | Meaning |
|---|---|
_ldap | The LDAP service used by Active Directory. |
_tcp | The TCP transport protocol. |
dc | Indicates that the record is for Domain Controllers. |
_msdcs | The Microsoft-specific DNS namespace used for Active Directory service discovery. |
example.com | The Active Directory DNS domain name. |
The SRV response contains information such as:
- Priority: Lower values are preferred.
- Weight: Helps distribute selection among records with the same priority.
- Port: The port on which the advertised service is available. LDAP commonly uses TCP port 389.
- Target: The hostname of the server providing the service.
4. How the Domain Controller discovery process works
- The client gets its network configuration. DHCP provides an IP address, subnet mask, default gateway and DNS server information. A statically configured client can have these settings configured manually.
- The client contacts its configured DNS server. The Windows DC Locator process uses the Netlogon service to help find a suitable Domain Controller.
- The client queries for SRV records. For example, it can query
_ldap._tcp.dc._msdcs.example.com. - DNS returns the service information. The response identifies Domain Controller hostnames and includes service details such as priority, weight and port.
- The client resolves the Domain Controller hostname. It uses DNS address records, such as A or AAAA records, to obtain an IP address.
- The client checks Domain Controller availability. DC Locator uses an LDAP UDP-based discovery check to verify that a candidate DC is available.
- The client selects and remembers a suitable DC. The Netlogon service caches discovered Domain Controller information to help with later requests.
5. Why Active Directory Sites matter
In larger environments, an organization may have multiple physical locations connected by WAN links. Active Directory Sites represent the network topology and help clients locate suitable Domain Controllers.
Administrators associate IP subnets with Active Directory Sites. When a client locates a Domain Controller, the DC Locator process can use site-specific DNS records to find a DC in the client’s own site.
A site-specific LDAP SRV record can look like this:
_ldap._tcp.Mumbai._sites.dc._msdcs.example.com
Here, Mumbai is an example Active Directory site name. Your actual site name depends on how the Active Directory environment is configured.
6. Test DNS and Domain Controller discovery
Check the client’s network configuration
ipconfig /all
Displays the client’s IP configuration, including its DNS servers, default gateway and DNS suffix information.
Check which DNS servers are configured
Get-DnsClientServerAddress
PowerShell displays the configured DNS server addresses for the network interfaces.
Query the Domain Controller SRV records
Resolve-DnsName -Type SRV -Name "_ldap._tcp.dc._msdcs.example.com"
Returns the SRV records registered for Domain Controllers in the specified domain.
Use NSLOOKUP as an alternative
nslookup -type=SRV _ldap._tcp.dc._msdcs.example.com
This performs an SRV lookup using the Windows DNS diagnostic utility.
Ask Windows to locate a Domain Controller
nltest /dsgetdc:example.com
Displays information about a Domain Controller located for the specified domain, including its name and other details.
Check the domain secure channel
nltest /sc_verify:example.com
Checks the secure channel between the computer and the specified domain.
Refresh the DHCP lease
ipconfig /release
ipconfig /renew
Releases and requests an IPv4 DHCP lease. Use this when you need to renew DHCP-provided network configuration.
example.com with your actual AD DNS domain. Run these commands from a client that has network connectivity to the relevant DNS infrastructure. Some troubleshooting commands may require elevated permissions.
7. What if the client cannot find a Domain Controller?
If a domain-joined computer cannot locate a Domain Controller, start with the basics. DNS configuration is one of the first things to investigate.
- Check the IP configuration. Run
ipconfig /alland verify the IP address, subnet mask, default gateway and DNS server addresses. - Check the DNS server. Make sure the client is using a DNS server that can resolve the Active Directory DNS zone. In a typical AD environment, this is an internal DNS server, often hosted on a Domain Controller.
- Test name resolution. Try resolving the domain name and a known Domain Controller hostname.
- Check the SRV records. Query
_ldap._tcp.dc._msdcs.example.comand confirm that the expected records are returned. - Check Domain Controller discovery. Run
nltest /dsgetdc:example.comto see whether Windows can locate a DC. - Check the Domain Controller itself. Verify that DNS and Netlogon are functioning and that the DC has registered the expected records.
8. DHCP vs. DNS: What’s the difference?
| Feature | DHCP | DNS |
|---|---|---|
| Main purpose | Provides network configuration to clients. | Resolves names and helps locate services. |
| IP address | Can automatically assign an IP address to a client. | Can resolve a hostname to an IP address. |
| Default gateway | Can provide the default gateway through DHCP options. | Does not normally provide the client’s default gateway. |
| DNS server settings | Can provide DNS server addresses through option 006. | Is the service that answers DNS queries. |
| AD Domain Controller discovery | Does not normally identify the DC directly. | Provides the SRV records used by DC Locator. |
Think of it this way:
DHCP asks:
“What network settings should this computer use?”
DNS answers:
“Where can I find the server or service I’m looking for?”
Both services are important in a typical Active Directory network. DHCP helps configure the client, and DNS helps the client find the services it needs.
9. Quick revision: 10 key takeaways
- Windows clients normally use DNS-based discovery to locate Domain Controllers.
- DHCP provides network configuration, including DNS server addresses.
- DHCP does not normally tell a client which Domain Controller to use.
- Active Directory Domain Controllers register service information in DNS.
- SRV records advertise services such as LDAP and Kerberos.
_ldap._tcp.dc._msdcs.example.comis an important DC locator record.- The SRV response includes a target hostname, port, priority and weight.
- The client resolves the target hostname to an IP address and checks DC availability.
- Active Directory Sites help clients locate suitable Domain Controllers.
Resolve-DnsNameandnltestare useful troubleshooting tools.
10. Official documentation and further reading
- Locating Active Directory Domain Controllers — Microsoft’s explanation of the DC Locator process, DNS discovery and site selection.
- Verify that SRV DNS records have been created — How to verify Active Directory SRV records using DNS Manager and NSLOOKUP.
- DHCP scopes in Windows Server — DHCP scopes and common configuration options.
- Install and configure DHCP Server — Configuring DHCP scopes and common client options.
- Resolve-DnsName PowerShell reference — PowerShell DNS query command documentation.
About this article
This article is an independently written learning guide about DHCP, DNS and Active Directory Domain Controller discovery. ChatGPT was used as an AI-assisted drafting and formatting tool. Technical explanations were checked against the Microsoft documentation linked above.
Examples use example.com as a placeholder domain. Replace it with the DNS name of your own Active Directory domain when testing commands. Always validate configuration changes in a suitable test environment before applying them in production.





Geef een reactie