3.1 The general idea
Somewhat similar to the 411 service of you phone company, DNS is localized. However, DNS is also hierarchical. Let us
simulate a particular DNS query.
- You want to visit the website funky.town.org. The browser (an HTTP client) issues an HTTP request directed
to funky.town.org.
- Your workstation needs to resolve the domain name to an IP address. it looks up a local cache for an entry.
- If an entry is found locally, you’re done. If not, your workstation determines what is your primary DNS server
(name server). This is usually set by DHCP when your computer first connect to the network. Let’s say
66.218.71.63 is the IP address of the primary name server.
- Your workstation sends a DNS request to 66.218.71.63 and ask “what is the IP address of the domain name
funky.town.org?”
- 66.218.71.63 receives your request. It looks up its local cache (to see if someone else has already made the
same request). If the answer is found in the cache, it replies and the process is done.
Otherwise, it sends the same request to the root name server.
- The root name server cannot track all domain names on the internet. It looks at the domain name
funky.town.org, replies to the name server your ISP, and says “so-and-so knows more about .org domain
names, ask it instead.”
- The name server of your ISP then makes another DNS request to this name server that specializes in .org
domain names. The .org specialist name server looks at the domain name, and determines that yet another
server specializes in domain names ending with town.org. It replies to the DNS server of your ISP with the IP
address of this name server that specializes in town.org domain names.
- The name server that specializes in town.org looks at the domain name, and finds the corresponding IP address.
It replies to the DNS server of your ISP.
- The DNS server of your ISP adds this entry to its local cache, and reply to the request that originated from
your workstation. Your workstation also caches this entry. Then it knows where to send the original HTTP
request.