Figure 2.3 illustrates the steps involved with a standard DNS query and the interactions from the different levels of the DNS hierarchy as the client types a URL into a browser window until the IP address is returned.
The client types in the browser a web page to load such as www.tipofthehat.com. The computer queries its local DNS server for www.tipofthehat.com.
FIGURE 2.3 DNS resolution process
The ISP resolver will look at its locally cached records to see if the domain to IP mapping is stored locally; if it is, the IP address is returned to the client.
If the ISP resolver does not contain the data, it will look at its local configuration to get the IP address of a root server and ask it where the .com TLD servers are.
The root server will respond with the IP addresses it can use to contact a TLD .com server.
The resolver queries the .com server asking for the tipofthehat domain. The TLD server will reply with the tipofthehat.com DNS name server address.
The resolver will have the information to contact the tipofthehat.com DNS server, which contains the www A record. The tipofthehat.com IP address is returned to the local resolver and in turn is sent to the client that originally made the request.
Now the client’s browser has the IP address to contact www.tipofthehat.com, which then initiates the connection.
Notice that the local resolver coordinated all of the lookup work on the client’s behalf, and the client waited for the answer to be returned after its request.
Resource records are at the core of DNS functionality. They contain the actual data about DNS resources. Each record contains a name, type, and TTL information, as shown in Figure 2.4. The master copy of each group of resource records is stored in a specific zone, which is a portion of the DNS namespace, and can be distributed throughout the Internet’s DNS system. While there are more than 90 different types of resource records, most are rarely seen. Here, we will cover the records most commonly used in DNS.
FIGURE 2.4 Sample resource record