DNS Database Records

The database records used in a zone file are called standard resource records or sometimes just RRs. All resource records have the same basic format:

The name field identifies the domain object affected by this record. It could be an individual host or an entire domain. Unless the name is a fully qualified domain name, it is relative to the current domain.

A few special values can be used in the name field. These are

A blank name refers to the last named object. The last value of the name field stays in force until a new value is specified.

@ An at-sign refers to the current origin. The origin is the default domain name used inside the zone file. You can set the origin in the database file with the $ORIGIN directive. If a $ORIGIN directive is not used, the origin is the domain name from the zone command in the named.conf file.

* An asterisk is a wildcard character that can be used to match any character string.

The time-to-live (ttl) field defines the length of time that this resource record should be cached. This permits you to decide how long remote servers should store information from your domain. You can use a short TTL for volatile information and a long TTL for stable information. If no TTL value is specified, the default TTL value defined by the $TTL directive is used. (Zone file directives are discussed later in the chapter.)

The class field is always IN, which is shown in the syntax above. There really are three possible values: HS for Hesiod servers, CH for Chaosnet servers, and IN for Internet servers. All of the information you deal with is for TCP/IP networks and Internet servers, so you will not use the other values.

The type field defines the type of resource record. There are 40 different types of records; almost all of which are experimental, obsolete, or unused. The types used in this chapter, which are the most commonly used record types, are listed in Table 4.2.

Table 4.2: DNS Database Record Types

Record Name

Record Type


Start of Authority


Marks the beginning of a zone's data, and defines parameters that affect the entire zone

Name Server


Identifies a domain's name server



Maps a hostname to an address



Maps an address to a hostname

Mail Exchanger


Identifies the mail server for a domain

Canonical Name


Defines an alias for a hostname

The last field in the resource record is the data field, which holds the data that is specific to the type of resource record. For example, in an A record, this contains an address. The format and function of the data field is different for every record type.

In addition to resource records, BIND provides four zone file directives that are used to simplify the construction of the zone file or to define a value used by the resource records in the file.

Was this article helpful?

0 0

Post a comment