DNS Resolution Process – Domain Name Services – ANS-C01 Study Guide

DNS Resolution Process

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

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

  • A record: Associates an IPv4 address with a hostname.
  • AAAA record: Same as an A record but for IPv6.
  • MX record: Mail Exchange Record, identifies mail servers for the domain.
  • NS record: Name server that points to the authoritative DNS server for a zone.
  • PTR record: A reverse DNS lookup where given an IP address, a domain name is returned.
  • SPF record: Determines if the email sender is authorized to send emails from this domain.
  • SRV record: Service locator, a generic service pointer used to show a server’s hostname and the ports it is listening on.
  • CNAME record: Canonical name, an alias that references one host by multiple domain names.
  •  DNAME record: Delegation of an entire part of a DNS tree to a new name. Compare this to a CNAME, which is a single record.
  • LOC record: Location record, has physical geographic location information including latitude, longitude, and altitude of where the domain resides.
  • SOA record: The start of authority record, has information about the domain that includes information that other servers for the zone can use to identify changes, the primary name server information, refresh intervals for data freshness, information on the domain administrator such as the contact’s email address.
  • TXT record: Used to store data in the domain for outside services to query. TXT records provide data for validation, proof of domain ownership, and many other uses.