Applies To:
Show Versions3-DNS Controller versions 1.x - 4.x
- 3.0 PTF-02, 3.0 PTF-01, 3.0.0
8
Resource Records
A resource record (RR) consists of a name, a type, and data that is specific to the type. These resource records, in a hierarchical structure, make up the domain name service (DNS).
The standard resource record format, specified in RFC 1035, is as follows:
{name} {ttl} addr-class record type record-specific data
The resource record fields are defined as follows:
- name
The first field, name, is the name of the domain record and it must always start in column 1. For all resource records that are not the first in a file, the name may be left blank. When the name field is left blank, the record takes the previous resource record. - ttl
The second field, ttl (time to live), is optional. This field specifies how long this data is stored by the LDNS. If this field is left blank, the default time to live value is specified in the Start Of Authority (SOA) resource record (described later in this chapter). - address class
The third field is the address class. Currently, only one class is supported: IN, for internet addresses and other internet information. Limited support is included for the HS class, which is for MIT/Athena "Hesiod" information. - record type
The fourth field, record type, defines the type of this resource record, such as "A." - other fields
Additional fields may be present in a resource record, depending on its type.
Although case is preserved in names and data fields when loaded into the name server, comparisons and lookups in the name server database are not case sensitive.
Types of resource records
There are many types of resource records currently in use. This section provides an overview of the most common resource record types, and lists other types of resource records. There are six standard types of resource records:
A (Address)
The Address record, or A record, lists the address for a given machine. The name field is the machine name, and the address is the network address. There should be one A record for each IP address of the machine.
Figure 8.1 shows an example of an A record:
Figure 8.1 Example of an A record
{name} {ttl} addr-class A address
ucbarpa IN A 128.32.0.4
IN A 10.0.0.78
CNAME (Canonical Name)
The Canonical Name resource record, CNAME, specifies an alias or nickname for the official, or canonical, host name. This record must be the only one associated with the alias name. It is usually easier to supply one A record for a given address and use CNAME records to define alias host names for that address.
Figure 8.2 shows an example of a CNAME resource record:
Figure 8.2 Example of a CNAME record
alias {ttl} addr-class CNAME Canonical name
ucbmonet IN CNAME monet
MX (Mail Exchange)
The Mail Exchange resource record, MX, defines the mail system(s) for a given domain.
Figure 8.3 shows an example of an MX resource record:
Figure 8.3 Example of an MX record
name {ttl} addr-class MX pref value mail exchange
Munnari.OZ.AU. IN MX 0 Seismo.CSS.GOV.
*.IL. IN MX 0 RELAY.CS.NET.
NS (Name Server)
The Name Server resource record, NS, defines the name server(s) for a given domain, creating a delegation point and a subzone. The first name field specifies the zone that is serviced by the name server that is specified by the second name. Every zone needs at least two name servers.
Figure 8.4 shows an example of an NS resource record:
Figure 8.4 Example of an NS record
{name} {ttl} addr-class NS Name servers name
IN NS ucbarpa.Berkeley.Edu.
PTR (Pointer)
A Name Pointer record, PTR, associates a host name with a given IP address. These records are used for reverse name lookups.
The example of a PTR record shown in Figure 8.5 is used to set up reverse pointers for the special IN-ADDR.ARPA domain:
Figure 8.5 Example of a PTR record
name {ttl} addr-class PTR real name
7.0 IN PTR monet.Berkeley.Edu.
SOA (Start of Authority)
The Start of Authority, SOA, record starts every zone file. There must be exactly one SOA record per zone.
The following is an example of an SOA resource record:
name {ttl} addr-class SOA Origin Person in charge
@ IN SOA ucbvax.Berkeley.Edu. kjd.ucbvax.Berkeley.Edu. (
1995122103 ; Serial
10800 ; Refresh
1800 ; Retry
3600000 ; Expire
259200 ) ; Minimum
The SOA record-specific fields are defined as follows:
- Person in charge
The email address for the person responsible for the name server, with @ changed to a . - Serial number
The version number of this data file; it must be a positive integer. You must increase this number whenever a change is made to the data. - Refresh
The time interval, in seconds, between calls that the secondary name servers make to the primary name server to see if an update is necessary. - Retry
The time interval, in seconds, that a secondary server waits before retrying a failed zone transfer. - Expire
The maximum number of seconds that a secondary name server can use the data before it expires for lack of receiving a refresh. - Minimum
The default number of seconds to be used for the time to live (TTL) field on resource records which do not specify a TTL in the zone file. It is also an enforced minimum on TTL if it is specified on a resource record in the zone.
Additional resource record types
Table 8.2 lists less common resource record types. For more information on these, see RFCs 1035, 1183, and 1664.