AD-integrated DNS
AD depends on DNS to find domain controllers, and DCs usually host DNS themselves. In an AD-integrated zone the records are stored as objects in AD and replicate with it, so every DNS server on a DC is a writable primary.
| Replication scope | Stored in | Use for |
|---|---|---|
| All DNS servers in the forest | ForestDnsZones partition | _msdcs.<forest root> and zones everyone needs. |
| All DNS servers in the domain | DomainDnsZones partition | The domain's own zone (default). |
| All DCs in the domain | Domain partition | Legacy compatibility with Windows 2000 DCs. |
| Custom application partition | Partition you create | A zone only some DCs should hold. |
Records AD registers
_ldap._tcp.dc._msdcs.<domain>,_kerberos._tcp,_kpasswd,_gc._tcp: SRV records for DCs, KDCs and GCs, also per site under_sites.<DSA GUID>._msdcs.<forest>: CNAME used for replication between DCs.- A/AAAA records for each DC and the domain name itself.
Good practice
- Secure dynamic updates only, so only domain members can register and own their records.
- Aging and scavenging (for example 7-day no-refresh and 7-day refresh) on zones and on one DNS server, to clean stale records.
- Forwarders or root hints for internet names; conditional forwarders (stored in AD) for partner forests.
- Reverse lookup zones for every subnet; DNSSEC and DNS policies where needed.
Get-DnsServerZone
Add-DnsServerPrimaryZone -NetworkId 10.20.0.0/16 -ReplicationScope Domain
Set-DnsServerZoneAging corp.contoso.com -Aging $true -RefreshInterval 7.00:00:00 -NoRefreshInterval 7.00:00:00
Set-DnsServerScavenging -ScavengingState $true -ScavengingInterval 7.00:00:00 -ApplyOnAllZones
Add-DnsServerConditionalForwarderZone -Name partner.com -MasterServers 192.0.2.10 -ReplicationScope Forest
DHCP
- Authorization: a Windows DHCP server in a domain must be authorized in AD (
CN=NetServices) or it will not hand out leases. This stops rogue Windows DHCP servers. - Failover: two servers share scopes in load-balance or hot-standby mode; no clustering needed.
- DNS registration: let DHCP register A and PTR records for clients that cannot, using a dedicated low-privilege DNS dynamic update credential account. Do not run DHCP on a DC with default credentials, or records can be hijacked.
- Options to set: 003 router, 006 DNS servers (your DCs), 015 DNS domain name.
Install-WindowsFeature DHCP -IncludeManagementTools
Add-DhcpServerInDC -DnsName dhcp01.corp.contoso.com -IPAddress 10.0.0.20
Add-DhcpServerv4Scope -Name "HQ Clients" -StartRange 10.0.10.50 -EndRange 10.0.10.250 -SubnetMask 255.255.255.0
Set-DhcpServerv4OptionValue -ScopeId 10.0.10.0 -Router 10.0.10.1 -DnsServer 10.0.0.10,10.0.0.11 -DnsDomain corp.contoso.com
Add-DhcpServerv4Failover -Name HQ-Failover -PartnerServer dhcp02 -ScopeId 10.0.10.0 -LoadBalancePercent 50 -SharedSecret (Read-Host)
Get-DhcpServerInDC
Time: the Windows time hierarchy (NTP)
Kerberos rejects tickets if clocks differ by more than 5 minutes, so time is part of authentication. Windows Time (W32Time) builds a hierarchy automatically (NT5DS):
- The PDC emulator of the forest root domain syncs with a reliable external NTP source or hardware clock.
- Other DCs sync with the PDC emulator of their domain or a DC higher in the tree.
- Member servers and clients sync with the DC that authenticated them.
# On the forest root PDC emulator only
w32tm /config /manualpeerlist:"0.pool.ntp.org,0x8 1.pool.ntp.org,0x8" /syncfromflags:manual /reliable:yes /update
Restart-Service w32time
w32tm /resync /rediscover
# Everywhere: check
w32tm /query /status
w32tm /query /source
w32tm /monitor
w32tm /stripchart /computer:dc01 /samples:5 /dataonly
- When you move the PDC emulator role, configure the new holder and reset the old one:
w32tm /config /syncfromflags:domhier /reliable:no /update. - Virtual DCs: turn off hypervisor time sync for the time provider (or at least for the PDC emulator) so it does not fight NTP.
- Use a WMI-filtered GPO targeting the PDC emulator role holder so time settings follow the role.
Other services tied to AD
DFS Namespaces
Domain-based namespaces (\\corp.contoso.com\files) are stored in AD and served by any namespace server, using site costs to pick the closest target.
Certificate services
Enterprise CAs publish to AD so clients trust them automatically. See PKI and AD CS.
RADIUS (NPS)
Uses AD accounts and groups for network access. See AAA.
IPAM
IP Address Management discovers DCs, DNS and DHCP servers and tracks address use. Deprecated feature but still shipped.