DNS uses the name service component to provide the actual name-to-IP address mapping that enables computers to locate each other on an internetwork. The name service uses a client-server mechanism in which clients query name servers for host address information.
DNS name servers maintain a database of information about hosts in a specific zone. Each DNS zone must include a name server containing authoritative information about all hosts within the zones it supports. A DNS name server can be either a primary name server or a secondary name server.
In addition to local host information, name servers maintain information about how to contact other name servers. Name servers in an internetwork are able to contact each other and retrieve host information. If a name server does not have information about a particular domain, the name server relays the request to other name servers up or down the domain hierarchy until it receives an authoritative answer for the client's query.
One DNS name server in each administrative zone maintains an authoritative database of hostname and address information for an entire domain. This name server is the primary name server, and the domain administrator updates it with hostnames and addresses as changes occur.
All name servers maintain information about how to contact name servers that are at higher or lower levels within the DNS hierarchy. The process of maintaining information about name servers in higher-level domains is called linking to the existing DNS hierarchy. The administrator also enters information into the database about name servers in lower-level domains when creating a subdomain.
Secondary name servers have read-only copies of the primary name server's DNS database. Secondary name servers provide redundancy and load balancing for a domain.
Periodically, and when a secondary name server starts up, the secondary name server contacts the primary name server and requests a complete copy of the primary name server's DNS database. This process is called a zone transfer.
If necessary, a primary name server can also function as a secondary name server for another zone.
Resource records (RRs) contain the host information maintained by the name servers and make up the DNS database. Different types of records contain different types of host information. For example, an Address record provides the name-to-address mapping for a given host, while a Start of Authority (SOA) record specifies the start of authority for a given zone.
A DNS zone must contain several types of resource records for DNS to function properly. Other RRs can be present, but the following records are required for standard DNS:
The DNS zone must contain NS records for each primary and secondary name server in the zone. The DNS zone must contain NS records to link the zone to higher- and lower-level zones within the DNS hierarchy.
The name server must contain one SOA record specifying its zone of authority.
For example, the name server for a zone must contain the following:
Table lists the types of resource records and their field differences.
Table . Resource Record Types and Field Differences