Skip to main content

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​

TypePurposeExample
AHostname → IPv4dc01.corp.local → 10.0.0.5
AAAAHostname → IPv6same, IPv6
CNAMEAlias to another namewww → web01
MXMail exchangercorp.local → mail.corp.local
TXTVerification, SPF, DMARCSPF records live here
PTRReverse lookup — IP → name10.0.0.5 → dc01
SRVService location, AD sites_ldap._tcp.dc01
NSAuthoritative name serverns1.corp.local
SOAStart of zone — serial, adminzone metadata
The PTR record

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
Two causes, different fixes

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​

LetterMessageWho sends it
DDiscoverClient, broadcast, source 0.0.0.0
OOfferServer, offers an address
RRequestClient, broadcasts the accepted offer
AAcknowledgementServer, confirms and records the lease
Why the Request is broadcast

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​

SymptomLikely cause
Machine gets 169.254.x.xDHCP failed entirely
Wrong gateway but valid IPScope option wrong, or wrong scope applied
DNS works sometimes, not alwaysMultiple DHCP servers, or stale lease
Works on one floor onlyVLAN not reaching the DHCP relay / server
IP is valid but out of subnetWrong 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
Scope exhaustion is the classic

"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​

OptionValueWhy
1Subnet mask
3Router / default gateway
6DNS server
15DNS domain name
51/58Lease timeShort leases = faster IP changes after exhaustion
66/67/60TFTP server + boot file namePXE network boot

Both together​

The order that matters

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.

Next​

VLANs & Routing.

Was this page helpful?