Computer Networking Basics
A full-service resolver (caching DNS server) with an empty cache looks up the IP address of www.example.com. In what order does it query servers?
- ARoot server → .com DNS server → authoritative DNS server for example.com
- BAuthoritative DNS server for example.com → .com DNS server → root server
- C.com DNS server → root server → web server for www.example.com
Show answer and explanation
Answer: A. Root server → .com DNS server → authoritative DNS server for example.com
A device asks a resolver run by its ISP or organization, and the resolver walks the domain name hierarchy from the top on the device's behalf. It first asks a root server, which refers it to the server managing .com (a TLD server); that server refers it to the authoritative DNS server for example.com, which finally returns the address of www.example.com. The answer is cached for the validity period attached to the record (its TTL, separate from the TTL in the IP header), so later queries are answered immediately. That is why, after a DNS setting changes, the old address may still be used until cached answers expire.
- A. Correct. It walks down the hierarchy, being told whom to ask next at each step.
- B. The hierarchy is walked from the top (the root); at first the resolver does not know which server is authoritative.
- C. It starts from the root, and a web server is never asked for names.