Looking Up A Domain Name
There are two key parts to the DNS:
- DNS server
- The DNS server is the part of the system that stores the domain name and IP address details. It's a bit like a phone book. There are loads of DNS servers on the Internet, all looking after different domains (just like there are loads of different phone books, each covering a different region).
- DNS resolver
- The DNS resolver is responsible for looking up information in a DNS server. It's the Internet equivalent of the voice at the end of the directory-enquiries service. Typically each organisation has its own DNS resolver (most people use the one provided by their Internet provider).
If, for example, you wanted to speak to the sales team of a company, but didn't know their number the process would go something like this:
- You phone directory enquiries and give them the details.
- Directory enquiries look up those details and give you the main switchboard number.
- You phone the switchboard and ask for sales.
- The switchboard connects you to someone in sales.
Now, say you wanted to find the host name of that same company's web server (we'll use www.example.com), the process is:
- You ask your local DNS resolver for the IP address of www.example.com.
- The DNS resolver asks a root name server.
- The root name server doesn't know the IP address, but responds with the name of a DNS server that looks after the .com domain instead.
- The DNS resolver asks the .com DNS server.
- The .com DNS server doesn't know the IP address, but responds with the name of a DNS server that looks after the example.com domain instead.
- The DNS resolver asks the example.com DNS server.
- The example.com DNS server returns the IP address (220.127.116.11)
- The DNS resolver gives you the IP address.
- Your browser connects to the web server.
It's a little more complicated, but basically the same procedure. All of the hard work is done automatically between the local DNS resolver and the name servers (the bits in the green box). You don't need to care if there's just one name server or one hundred, that's all handled by the resolver on your behalf.