How Windows Clients Discover a Domain Controller Using DNS SRV Records
Windows Server · Active Directory · DNS

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.

A practical learning note for Windows Server administrators

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?

Dynamic Host Configuration Protocol: getting a client onto the network.

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:

1. Discover Client broadcasts that it needs network configuration.
2. Offer DHCP server offers an available IP address and configuration.
3. Request Client requests the offered address.
4. Acknowledge Server confirms the lease and configuration.

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.
Why is DHCP important for Active Directory? In a typical domain environment, DHCP provides the client with the address of an internal DNS server that can resolve the Active Directory DNS zone and its SRV records. This helps the client find a Domain Controller.
Important: DHCP does not normally tell the client which Domain Controller to use. It provides network settings, including DNS server information. The client then uses DNS-based discovery to locate a suitable Domain Controller.
🌐

2. What does DNS do in Active Directory?

Domain Name System: finding services and resolving names.

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

The DNS record used to locate Domain Controllers.

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
_ldapThe LDAP service used by Active Directory.
_tcpThe TCP transport protocol.
dcIndicates that the record is for Domain Controllers.
_msdcsThe Microsoft-specific DNS namespace used for Active Directory service discovery.
example.comThe 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.
Not every lookup is identical Windows can also query site-specific SRV records to find a Domain Controller in the client’s Active Directory site. This helps clients use a nearby DC when one is available.
⚙️

4. How the Domain Controller discovery process works

From network configuration to a suitable Domain Controller.
  1. 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.
  2. The client contacts its configured DNS server. The Windows DC Locator process uses the Netlogon service to help find a suitable Domain Controller.
  3. The client queries for SRV records. For example, it can query _ldap._tcp.dc._msdcs.example.com.
  4. DNS returns the service information. The response identifies Domain Controller hostnames and includes service details such as priority, weight and port.
  5. The client resolves the Domain Controller hostname. It uses DNS address records, such as A or AAAA records, to obtain an IP address.
  6. The client checks Domain Controller availability. DC Locator uses an LDAP UDP-based discovery check to verify that a candidate DC is available.
  7. The client selects and remembers a suitable DC. The Netlogon service caches discovered Domain Controller information to help with later requests.
Remember Finding a Domain Controller is not the same as completing user authentication. Discovery identifies a suitable server; authentication and access to domain resources involve further communication with Active Directory.
📍

5. Why Active Directory Sites matter

Helping clients find a suitable Domain Controller nearby.

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.

Practical example Imagine a company with offices in Mumbai and London. If both locations have Domain Controllers and the AD Sites and Services subnets are configured correctly, a client in Mumbai can discover a Domain Controller in the Mumbai site instead of unnecessarily using one in London.
💻

6. Test DNS and Domain Controller discovery

Useful commands for Windows administrators.

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.

Before running tests Replace 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?

A practical troubleshooting checklist.

If a domain-joined computer cannot locate a Domain Controller, start with the basics. DNS configuration is one of the first things to investigate.

  1. Check the IP configuration. Run ipconfig /all and verify the IP address, subnet mask, default gateway and DNS server addresses.
  2. 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.
  3. Test name resolution. Try resolving the domain name and a known Domain Controller hostname.
  4. Check the SRV records. Query _ldap._tcp.dc._msdcs.example.com and confirm that the expected records are returned.
  5. Check Domain Controller discovery. Run nltest /dsgetdc:example.com to see whether Windows can locate a DC.
  6. Check the Domain Controller itself. Verify that DNS and Netlogon are functioning and that the DC has registered the expected records.
A common configuration mistake Configuring a domain-joined client to use only an external DNS resolver, such as a public DNS service, can prevent it from resolving internal Active Directory records. The client should use DNS servers that host or can resolve the AD DNS namespace. External name resolution can be handled through appropriate DNS forwarding or other DNS infrastructure.
Useful Domain Controller-side check On a Domain Controller, the Netlogon service registers important AD locator records in DNS. If records are missing, investigate the DNS zone, Netlogon service and DC registration before changing client settings.
🔄

8. DHCP vs. DNS: What’s the difference?

Two services that work together, but do different jobs.
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

The main points to remember.
  1. Windows clients normally use DNS-based discovery to locate Domain Controllers.
  2. DHCP provides network configuration, including DNS server addresses.
  3. DHCP does not normally tell a client which Domain Controller to use.
  4. Active Directory Domain Controllers register service information in DNS.
  5. SRV records advertise services such as LDAP and Kerberos.
  6. _ldap._tcp.dc._msdcs.example.com is an important DC locator record.
  7. The SRV response includes a target hostname, port, priority and weight.
  8. The client resolves the target hostname to an IP address and checks DC availability.
  9. Active Directory Sites help clients locate suitable Domain Controllers.
  10. Resolve-DnsName and nltest are useful troubleshooting tools.
🔗

10. Official documentation and further reading

Microsoft documentation used to support this article.
✍️

About this article

Attribution and editorial note.

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.

© 2026 · Windows Server & Active Directory learning notes

Designed as a responsive, standalone HTML page. The styles are included in this file; no external CSS framework or JavaScript library is required.

Thanks 2 ChatGPT and Google <3 keep the vibes high

Geef een reactie