When a full set consisting of TLD and all needed subdomains is put together,
this is called a hostname. On a local network, this could be a single word. On
the Internet, it requires at least a TLD and root zone and often includes at
least one other subdomain, as in www.icann.org. Another way to define a
hostname is any domain name that is associated with one or more IP
addresses. The “or more” is often used in load balancing between one or more
machines. You can have DNS cycle from one IP address to another each time
the hostname is requested.
DNS Servers
A DNS server receives a request or query and responds by resolving that
query and returning the information mapped to it, if it exists. There is not one
canonical DNS server for the entire Internet. Instead, when a domain is
registered, that registration is listed on a series of ICANN-run servers
scattered around the world. Contained in that registration is information about
where the authoritative DNS information is stored for that domain. This is
usually, but not necessarily, a DNS server or set of DNS servers operated by
the domain name registrar.
DNS requests work in a hierarchical fashion. Here is an example:
- A full request comes in to your Internet service provider’s DNS server. If
the DNS server knows the information, it responds. - If the DNS server recognizes the root name but not a subdomain, it
submits a request itself to a known server with information about that root
name and, if successful, it returns the information it receives. - If the DNS server cannot find any cached information about the
hostname, it contacts an ICANN server using the TLD. The ICANN
server can then respond with the information it has, which at a minimum
is the registered IP address that correlates to the hostname, if it exists.
This hierarchy causes some DNS requests to take longer than others.
Sometimes the search involves multiple DNS servers across a wider and
wider set of data. It also means that one server going down is not catastrophic;
instead, the information can be searched for and found elsewhere.
DNS Records
All DNS records are placed in a zone file (discussed further later in this
chapter, in the section “Setting Up a DNS Server with BIND”). There are
several ways to define the IP address/hostname. Some of these DNS records