About DNS and BIND
DNS is a network-based service that resolves domain names to IP
addresses. For a small, isolated network you can use entries in
the /etc/hosts
file to provide the
name-to-address mapping. However, most networks that are connected
to the Internet use DNS.
DNS is a hierarchical and distributed database.
Consider the fully qualified domain name (FQDN) wiki.us.mydom.com
. In this
example, the top-level domain is com
, mydom
is a subdomain
of com
, us
is a subdomain of mydom
, and
wiki
is the host name.
Each of these domains are grouped into zones for administrative purposes. A DNS server, or name server, stores the information that's needed to resolve the component domains inside a zone. In addition, a zone's DNS server stores pointers to the other DNS servers that are responsible for resolving each subdomain.
If an external client requests its local name server to resolve a FQDN, such as
wiki.us.mydom.com
to an IP address for which that server isn't
authoritative, the server queries a root
name server for the address of a
name server that's authoritative for the .com
domain. This server then
provides the IP address of another name server authoritative for the
mydom.com
domain, which in turn provides the IP address of the
authoritative name server for us.mydom.com
, and so on.
The querying process ends with the IP address for the FQDN being provided to the external client that made the request. This process is known as a recursive query, where the local name server handles each referral from an external name server to another name server on behalf of the resolver.
Iterative queries rely on the resolver being able to handle the referral from each external name server to trace the name server that's authoritative for the FQDN. Most resolvers use recursive queries and so can't use name servers that support only iterative queries.
Most Oracle Linux releases provide the BIND implementation of DNS. The
bind
package includes the DNS server daemon (named
), tools
for working with DNS, such as rndc, and some configuration files,
including the following:
-
/etc/named.conf
-
Contains settings for
named
and lists the location and characteristics of the zone files for the domain. Zone files are typically stored in/var/named
. -
/etc/named.rfc1912.zones
-
Contains several zone sections for resolving local loopback names and addresses.
-
/var/named/named.ca
-
Contains a list of the root authoritative DNS servers.