There are three kinds of name server in DNS: local name server, authoritative name server and top-level name server. When an application in a host needs the resource record of a domain name, it sends the query to its local name server firstly. If the domain being sought is under its jurisdiction, it directly returns the resource record. If no information about the requested domain is available, the local name server will send a query to the top-level name server. The top-level name server has addresses of all its second-level domains’ name server. Finally, the authoritative name server or local name server of the domain being sought will give the resource record.
Here is a specific example. All the steps are listed in the figure below. A host named cs.mit.edu wants to know the IP address of the host named www.hostease.com. First, the host named cs.mit.edu sends a query to its local name server, marked as dns.mit.edu (step 1). If the local name server doesn’t have any recourse record of this domain, it may send a query to the top-level name server for com, marked as dns.com (step 2).Maybe this name server doesn’t know the address of www.hostease.com. But it must know all of its second-level domains’ name server. So it forwards the request to the name server for hostease.com, marked as dns.hostease.com (step 3), which must have the authoritative resource record. Finally, the resource record requested goes back to the host named cs.mit.edu according to the reverse order(from step 4 to step 6). This is the course of domain address resolution.