Lesson 15 of 60 intermediate

DNS, DHCP & Why AD Breaks When They Break

The hidden dependencies behind logon failures

Open interactive version (quiz + challenge)

Real-world analogy

AD is like a courier company. Kerberos is the signed delivery note. But the phonebook (DNS) tells drivers where each address is, and the city council (DHCP) assigns addresses to new buildings. Break either and the couriers can’t deliver — even though the paperwork is valid.

What is it?

DNS and DHCP are the invisible plumbing Active Directory runs on. Most ‘AD is broken’ tickets are actually DNS or DHCP misconfigurations. Mastering this lesson prevents weeks of misdiagnosis.

Real-world relevance

An office renovates and swaps its switch. Next morning every laptop says ‘cannot contact domain.’ Junior A blames AD. Junior B runs ipconfig, sees DNS pointing at 8.8.8.8 instead of the internal DC, fixes DHCP option 6, and restores the office in 10 minutes.

Key points

Code example

// Logon failure triage — DNS/DHCP lens

1) ipconfig /all
   - IP present? subnet correct? gateway reachable?
   - DNS servers point at internal DCs (NOT public)?
   - Correct DNS suffix?

2) nslookup contoso.local
   Resolve-DnsName _ldap._tcp.dc._msdcs.contoso.local -Type SRV
   - Are SRV records returning?
   - Are the answering IPs the expected DCs?

3) Test-ComputerSecureChannel -Verbose
   - Is the machine's trust with the domain healthy?

4) Ports from client to DC (on-prem):
   - 53/TCP+UDP   DNS
   - 88/TCP+UDP   Kerberos
   - 389/TCP      LDAP
   - 445/TCP      SMB
   - 3268/TCP     Global Catalog
   - 123/UDP      Time (NTP)

Line-by-line walkthrough

  1. 1. Logon failure triage playbook
  2. 2. Step 1 — confirm healthy IP/DNS suffix
  3. 3. Sub-check: non-public DNS
  4. 4. Sub-check: correct DNS suffix
  5. 5. Blank separator
  6. 6. Step 2 — resolve domain and SRV records
  7. 7. Inspect answers for expected DCs
  8. 8. Blank separator
  9. 9. Step 3 — verify machine’s domain trust
  10. 10. Blank separator
  11. 11. Step 4 — confirm required ports to DC
  12. 12. DNS
  13. 13. Kerberos
  14. 14. LDAP
  15. 15. SMB
  16. 16. Global Catalog
  17. 17. NTP time sync

Spot the bug

Problem: After office DHCP change, users get ‘trust relationship failed’ when logging on.
Junior tries to rejoin every laptop to the domain one by one.
Need a hint?
Is the trust issue real, or a symptom of something else broken first?
Show answer
Before rejoining anything, verify DNS and DHCP: do clients receive internal DNS servers via DHCP option 6? Can they resolve SRV records? Can they reach the DC on required ports? Rejoining masks the real fix and creates unnecessary work. Run Test-ComputerSecureChannel only after DNS is validated.

Explain like I'm 5

Before anyone in the company can say ‘yes, you can come in,’ your phone has to know WHERE to call. DNS is the phonebook. DHCP is the operator giving new phones their numbers. Break either and every door stops answering.

Fun fact

Microsoft engineers often joke that ‘it’s always DNS’ — and they’re usually right. Studies of enterprise AD incidents routinely show DNS is the single most common root cause of authentication issues.

Hands-on challenge

On your own machine: run ipconfig /all, note your DNS servers. Run Resolve-DnsName -Type SRV (if you have any domain suffix) or Resolve-DnsName microsoft.com -Type MX. Read the output until every field makes sense.

More resources

Open interactive version (quiz + challenge) ← Back to course: IT Jobs Bootcamp