DNS, DHCP & Name Resolution
Your JD lists DNS and DHCP under Server Administration, so both appear as both a service you maintain and a cause of user-reported failures.
DNS
DNS is a distributed, cached, hierarchical database. Clients ask a resolver, which recursively queries root → TLD → authoritative server.
Record types you must know
| Type | Purpose | Example |
|---|---|---|
| A | Hostname → IPv4 | dc01.corp.local → 10.0.0.5 |
| AAAA | Hostname → IPv6 | same, IPv6 |
| CNAME | Alias to another name | www → web01 |
| MX | Mail exchanger | corp.local → mail.corp.local |
| TXT | Verification, SPF, DMARC | SPF records live here |
| PTR | Reverse lookup — IP → name | 10.0.0.5 → dc01 |
| SRV | Service location, AD sites | _ldap._tcp.dc01 |
| NS | Authoritative name server | ns1.corp.local |
| SOA | Start of zone — serial, admin | zone metadata |
Reverse lookups look people up by IP. Missing PTR entries break logging, monitoring and some authentication flows — and they are one of the most common things missing from a freshly built internal DNS zone.
DNS troubleshooting
ipconfig /flushdns # clear the client cache
nslookup dc01.corp.local # what does this resolver say?
nslookup dc01.corp.local 10.0.0.53 # query a specific server
Resolve-DnsName dc01.corp.local # PowerShell, richer output
Resolve-DnsName -Type SRV _ldap._tcp.dc01.corp.local
dig example.com # full answer with flags
dig +short example.com # just the answer
dig @10.0.0.53 example.com # specific server
dig example.com MX # record type
dig -x 10.0.0.5 # reverse
dig +trace example.com # walk the delegation chain
Authoritative data wrong → nslookup shows the wrong IP from every
server. Fix the record.
Client-side problem → ipconfig /all shows a stale or wrong DNS server
address. Fix the DHCP scope or the client's configuration.
DNS is over UDP 53 — but TCP too
UDP for normal lookups; TCP for zone transfers and for responses over 512 bytes. If UDP 53 is blocked and the answer is large, resolution fails in a way that looks like data loss.
DHCP
DHCP hands out an IP address plus mask, gateway, DNS and lease time.
The DORA process
| Letter | Message | Who sends it |
|---|---|---|
| D | Discover | Client, broadcast, source 0.0.0.0 |
| O | Offer | Server, offers an address |
| R | Request | Client, broadcasts the accepted offer |
| A | Acknowledgement | Server, confirms and records the lease |
The client broadcasts the Request so that any other DHCP server on the segment knows which address has been taken. Interviewers like this because it shows you understand that DHCP is a broadcast protocol.
DHCP troubleshooting
| Symptom | Likely cause |
|---|---|
Machine gets 169.254.x.x | DHCP failed entirely |
| Wrong gateway but valid IP | Scope option wrong, or wrong scope applied |
| DNS works sometimes, not always | Multiple DHCP servers, or stale lease |
| Works on one floor only | VLAN not reaching the DHCP relay / server |
| IP is valid but out of subnet | Wrong mask in scope |
ipconfig /release
ipconfig /renew
ipconfig /all # confirm DHCP server address
On a Windows DHCP server:
Get-DhcpServerv4Scope
Get-DhcpServerv4LeaseStatistics -ScopeId 10.0.0.0
"Random users have been getting 169.254.x.x since this morning" almost always means a scope ran out of leases. Check pending requests and the lease duration before anything else — a too-long lease makes exhaustion far more likely.
Options you must recognise
| Option | Value | Why |
|---|---|---|
| 1 | Subnet mask | |
| 3 | Router / default gateway | |
| 6 | DNS server | |
| 15 | DNS domain name | |
| 51/58 | Lease time | Short leases = faster IP changes after exhaustion |
| 66/67/60 | TFTP server + boot file name | PXE network boot |
Both together
A machine cannot do anything without a DHCP lease, and DHCP options include the DNS server. So DHCP failure causes DNS failure — and the symptom a user reports is "the internet is down" when the real fault is that they have an APIPA address and no DNS server at all.
Common interview questions
Why does my PC have 169.254.x.x?
The machine failed to reach a DHCP server and self-assigned an APIPA
address. Possible causes: DHCP service down, scope exhausted, the VLAN isn't
reaching the DHCP server, or a firewall between the VLAN and the server.
Check ipconfig /all for the DHCP server address it would have used.
What is DORA?
Discover, Offer, Request, Acknowledge. The client broadcasts a Discover, a server offers an address, the client broadcasts a Request naming the accepted offer (so other servers back off), and the server Acknowledges and records the lease.
A user can ping by IP but not resolve names. What now?
Layer 3 is fine, so this is DNS. Verify with nslookup example.com rather
than ping. Check the DNS servers in ipconfig /all, clear the client cache
with ipconfig /flushdns, then query the authoritative server directly to
separate a bad record from a bad client configuration.