By Fatskills Exam Guides Team — the exam nerds behind 28,500+ quizzes and 2.1M practice questions across 500+ global exams.
Name resolution translates human-readable names (like google.com) into machine-readable addresses (like 142.250.190.46). You use it every time you browse the web, send an email, or connect to a server—without it, the internet would require memorizing IP addresses.
google.com
142.250.190.46
Without name resolution, modern networking collapses. It enables: - User-friendly access: No one remembers 172.217.3.110—they remember google.com.- Scalability: Servers can change IPs without breaking user access (e.g., cloud migrations).- Security: DNS (the most common system) can block malicious domains or route traffic through filters.- Load balancing: Distribute traffic across servers by resolving the same name to different IPs.
172.217.3.110
A multi-step lookup to convert a name into an address: 1. Local cache: Check if the name was recently resolved (e.g., browser cache, OS cache).2. Hosts file: A static local file (/etc/hosts on Linux/macOS, C:\Windows\System32\drivers\etc\hosts on Windows) that maps names to IPs.3. DNS (Domain Name System): A hierarchical, distributed database that resolves names recursively.4. Fallback: If DNS fails, some systems use alternative protocols (e.g., mDNS for local networks).
/etc/hosts
C:\Windows\System32\drivers\etc\hosts
DNS is organized like a tree: - Root servers (.) direct queries to top-level domains (TLDs).- TLD servers (.com, .org) direct queries to authoritative servers for domains (e.g., google.com).- Authoritative servers hold the actual IP mappings for a domain.- Recursive resolvers (e.g., your ISP’s DNS server) perform the full lookup on your behalf.
.
.com
.org
DNS stores different types of records for different purposes:
A
google.com → 142.250.190.46
AAAA
google.com → 2607:f8b0:4009:80e::200e
CNAME
www.google.com → google.com
MX
google.com → mail.google.com
TXT
google.com → "v=spf1 include:_spf.google.com ~all"
NS
google.com → ns1.google.com
300
printer.local
\\SERVER
www.example.com
8.8.8.8
example.com
Client → Recursive Resolver → Root Server → TLD Server → Authoritative Server → Response
224.0.0.251
Use dig (Linux/macOS) or nslookup (Windows) to resolve a domain:
dig
nslookup
dig google.com
Expected output:
;; ANSWER SECTION: google.com. 300 IN A 142.250.190.46
nslookup google.com
Non-authoritative answer: Name: google.com Address: 142.250.190.46
Override DNS by editing the hosts file to block or redirect a site.
sudo nano /etc/hosts
Add:
127.0.0.1 facebook.com
Save (Ctrl+O, Enter, Ctrl+X) and flush the cache:
Ctrl+O
Enter
Ctrl+X
sudo dscacheutil -flushcache # macOS sudo systemd-resolve --flush-caches # Linux (systemd)
powershell ipconfig /flushdns
Test: Try accessing facebook.com—it should fail or redirect to localhost.
facebook.com
localhost
Use dnsmasq (Linux/macOS) to create a local DNS server for testing.
dnsmasq
bash sudo apt install dnsmasq # Debian/Ubuntu brew install dnsmasq # macOS
/etc/dnsmasq.conf
ini address=/test.local/192.168.1.100
bash sudo systemctl restart dnsmasq
bash dig test.local @127.0.0.1
192.168.1.100
1
86400
60
Ctrl+Shift+Del
ipconfig /flushdns
sudo dscacheutil -flushcache
8.8.4.4
1.1.1.1
1.0.0.1
ns1.example.com
ns2.example.com
dnsping
DNSPerf
Prometheus
Grafana
hcl resource "aws_route53_record" "www" { zone_id = "ZONE_ID" name = "www.example.com" type = "A" ttl = 300 records = ["192.0.2.1"] }
internal.example.com
10.0.0.1
203.0.113.1
netflix.com
v=spf1 include:_spf.google.com ~all
You’re setting up a new website and want to ensure users can always reach it, even if the primary server fails. What DNS record type should you use to implement failover?
A) A with a high TTL B) CNAME pointing to a load balancer C) A with multiple IPs and health checks D) MX with a backup mail server
Correct Answer: C Explanation: A records with multiple IPs and health checks (e.g., AWS Route 53 failover) allow DNS to switch to a backup IP if the primary fails. CNAME (B) doesn’t support multiple IPs, and MX (D) is for email.Why the Distractors Are Tempting: - A: High TTLs improve caching but don’t enable failover.- B: CNAME can point to a load balancer, but it’s a single point of failure unless the balancer itself has redundancy.- D: MX records are irrelevant for web traffic.
A user reports that example.com resolves to an old IP address, even after you updated the DNS record. What’s the most likely cause?
A) The authoritative server is down.B) The user’s browser or OS cache hasn’t been cleared.C) The domain registrar hasn’t propagated the changes.D) The CNAME record is misconfigured.
Correct Answer: B Explanation: DNS caches (browser, OS, or recursive resolver) often hold stale records. Clearing the cache (ipconfig /flushdns or browser cache) usually fixes this.Why the Distractors Are Tempting: - A: If the authoritative server were down, the domain wouldn’t resolve at all.- C: Registrar changes (e.g., nameservers) take time, but record updates on existing servers are near-instant.- D: A misconfigured CNAME would cause resolution errors, not stale IPs.
You’re deploying a local network with IoT devices that need to discover each other without a central server. Which protocol should you use?
A) DNS with a local BIND server B) mDNS (Multicast DNS) C) NetBIOS D) LLMNR
Correct Answer: B Explanation: mDNS is designed for local networks without a central server. Devices broadcast their names (e.g., printer.local) and respond to queries.Why the Distractors Are Tempting: - A: BIND is overkill for simple local discovery and requires a server.- C: NetBIOS is legacy and Windows-specific.- D: LLMNR is a Microsoft fallback but less reliable than mDNS.
Join 4M+ learners. Unlock unlimited quizzes, wrong-answer tracking, flashcards + reminders, study guides, and 1-on-1 challenges.