![]() |
![]() |
| ||||||||||||||||||||||||||||||||
Chapter 3Domain Name System (Overview)This chapter provides an overview of the Domain Name System (DNS). Note - One of the most common and important uses of DNS is connecting your network to the global Internet. To connect to the Internet, your network IP address must be registered with whomever is administering your parent domain. This chapter covers the following topics. DNS BasicsThe Domain Name System (DNS) is an application-layer protocol that is part of the standard TCP/IP protocol suite. This protocol implements the DNS naming service, which is the naming service that is used on the Internet. This section introduces the basic DNS concepts. You should have some familiarity with network administration, particularly TCP/IP, and some exposure to other naming services, such as NIS+ and NIS. Refer to Chapter 4, Administering DNS (Tasks) for information regarding initial setup and configuration of DNS. Note - DNS, NIS+, NIS, and FNS provide similar functionality and sometimes use the same terms to define different entities. In this chapter, terms like domain and name server are defined by their DNS functionality. Name-to-Address ResolutionThough DNS supports the complex, worldwide hierarchy of computers on the Internet, the basic function of DNS is actually very simple. DNS provides name-to-address resolution for TCP/IP-based networks. Name-to-address resolution, also referred to as mapping, is the process of finding the IP address of a computer in a database by using its host name as an index. Name-to-address mapping occurs when a program running on your local machine needs to contact a remote computer. The program might know the host name of the remote computer. However, the program might not know how to locate the machine, particularly if the machine is in another company domain, for example. To get the remote machine's address, the program requests assistance from the DNS software running on your local machine, which is considered a DNS client. Your machine sends a request to a DNS name server, which maintains the distributed DNS database. DNS files bear little resemblance to files that contain similar information. For example, the NIS+ host, the ipnodes Table, the local /etc/hosts and the /etc/inet/ipnodes files contain the host names, the ipnode names, IPv4 and IPv6 addresses, and other information about a particular group of computers. The name server uses your machine's host name as part of your request to find or "resolve" the IP address of the remote machine. The name server returns this IP address to your local machine if the host name is in its DNS database. The following figure shows name-to-address mapping between a DNS client and a name server, probably on the client's local network. Figure 3-1 Name to Address Resolution ![]() If the host name is not in that name server's DNS database, the machine is outside of its authority, or, to use DNS terminology, outside the local administrative domain. Thus, each name server is spoken of as being "authoritative" for its local administrative domain. Fortunately, the local name server maintains a list of host names and IP addresses of root domain name servers, to which the server forwards requests. These root name servers are authoritative for huge organizational domains, as explained fully in DNS Hierarchy and the Internet. These hierarchies resemble UNIX file systems, in that the servers are organized into an upside down tree structure. Each root name server maintains the host names and IP addresses of top level domain name servers for a given organization. The root name server sends your request to the known top-level name servers. If one server has the IP address for the host you requested, the server returns the information to your machine. If the top-level servers do not recognize the requested host, the request is passed to second-level name servers. Your request is then passed on down through the vast organizational tree. Eventually, a name server that has information about your requested host in its database returns the IP address back to your machine. The following figure shows name-to-address resolution outside the local domain. Figure 3-2 Name to Address Resolution for a Remote Host ![]() DNS Administrative DomainsFrom a DNS perspective, an administrative domain is a group of machines which are administered as a unit. Information about this domain is maintained by at least two name servers, which are "authoritative" for the domain. The DNS domain is a logical grouping of machines. The domain groupings could correspond to a physical grouping of machines, such as all machines attached to the Ethernet in a small business. Similarly, a local DNS domain could include all machines on a vast university network that belong to the computer science department or to university administration. For example, suppose the Ajax company has two sites, in San Francisco and in Seattle. The Retail.Sales.Ajax.com. domain is in Seattle. The Wholesale.Sales.Ajax.com. domain is in San Francisco. One part of the Sales.Ajax.com. domain would be in one city, the other part in the second city. Each administrative domain must have its own unique subdomain name. Moreover, if you want your network to participate in the Internet, the network must be part of a registered administrative domain. The section Joining the Internet has full details about domain names and domain registration. in.named and DNS Name ServersAs mentioned previously, name servers in an administrative domain maintain the DNS database. Name servers also run the in.named daemon, which implements DNS services. in.named is a public domain TCP/IP program and is included with the Solaris operating environment. Note - in.named is also called the Berkeley Internet Name Domain service, or BIND, because the daemon was developed at the University of California at Berkeley. There are three types of DNS name servers. Each domain must have one master server and at least one slave server to provide backup. Implementing DNS: A Practical Example explains primary and secondary servers in detail. Server Configuration and Data File NamesTo function correctly, the in.named daemon requires a configuration file and four data files. Configuration FileThe master server configuration file is /etc/named.conf. The file contains a list of domain names and the file names that contain host information. See The named.conf File for additional information on the named.conf file. Names of DNS Data FilesIf you are internally consistent, the zone data files can be named anything. This flexibility might lead to some confusion when working at different sites or referring to different DNS manuals and books. For example, the file names that are used in Sun manuals differ from those used in the book DNS and BIND published by O'Reilly & Associates and both of those nomenclatures have some differences from that used in the public-domain Name Server Operations Guide for BIND. In addition, this documentation uses generic names that identify a file's main purpose, and specific example names in code samples. For example, this documentation uses the generic name hosts when describing the function and role of a file. Example names db.doc and db.sales are used in code samples. The required data files are the following.
$INCLUDE FilesAn include file is any file which is named in an $INCLUDE() statement in a DNS data file. $INCLUDE files can be used to separate different types of data into multiple files for your convenience. See The $INCLUDE File. For reference purposes, the following table compares BIND file names from the above mentioned sources. Table 3-1 File Name Examples
| ||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||