To answer a query for DNS information, the local name server must either have the answer to the query or know which name server does. No single system can have complete knowledge of all of the names in the Internet; servers know about their local domains and build up knowledge about other domains one query at a time.
Here's how it works. Assume you want the address of http://www.sybex.com/. In effect, you are asking for the address record for www from the sybex.com database. A query for that address record comes to the local name server. If the server knows the address of http://www.sybex.com/, it answers the query directly. If it doesn't know the answer, but it knows which server handles sybex.com, it queries that server. If it has no information at all, it queries a root server.
The root server does not directly answer the address query. Instead, it points the local server to a server that can answer queries for the sybex.com domain. It does this by sending the local server a name server record that tells it the name of the server for the sybex.com domain and an address record that tells it the address of that server. The local server then queries the sybex.com domain server and receives the address for http://www.sybex.com/.
In this way, the local server learns the address of the host as well as the name and address of the servers for the domain. It caches these answers and will use them to directly answer queries about the sybex.com domain without again bothering the root servers.
Was this article helpful?