Manual Chapter : 3-DNS Reference Guide v4.5.10: DNS Resource Records

Applies To:

Show Versions Show Versions

3-DNS Controller versions 1.x - 4.x

  • 4.5.14, 4.5.13, 4.5.12, 4.5.11, 4.5.10
Manual Chapter


D

 

DNS Resource Records


Understanding DNS resource records

A resource record is an entry in a DNS database file, and consists of a name, a TTL, a type, and data that is specific to the type. These resource records, in a hierarchical structure, make up the domain name system (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 name of the previous resource record.

  • ttl
    The second field, ttl (time to live), is optional. This field specifies how long the resource record is stored by the LDNS. If this field is left blank, the default TTL 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, NS, or CNAME.

  • 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.

Note


For more information about resource records, DNS, and related topics, refer to DNS and BIND, by Albitz and Liu.

 

 


Types of resource records

Many types of resource records are currently in use. This section provides an overview of the most common resource record types, and lists other types of resource records. The six most common types of resource records are shown in Table D.1 .


 

Resource Record Type

Description

A (Address)

Maps host names to IP addresses.

CNAME (Canonical Name)

Defines a host alias.

MX (Mail Exchange)

Identifies where to send mail for a given domain name.

NS (Name Server)

Identifies the name servers for a domain.

PTR (Pointer)

Maps IP addresses to host names.

SOA (Start of Authority)

Indicates that a name server is the best source of information for a zone's data; defines the default parameters for a zone.

 

A (Address)

The Address record, or A record, lists the IP address for a given host name. The name field is the host's name, and the address is the network interface address. There should be one A record for each IP address of the machine.

Figure D.1 shows an example of an A record.

Figure D.1 Example of an A record


{name} {ttl} addr-class {type} address
host1.siterequest.com 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 D.2 shows an example of a CNAME resource record.

Figure D.2 Example of a CNAME record


alias {ttl} addr-class {type} Canonical name
wip.siterequest.com IN CNAME host1.siterequest.com
 

MX (Mail Exchange)

The Mail Exchange resource record, MX, defines the mail system(s) for a given domain.

Figure D.3 shows an example of an MX resource record.

Figure D.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 servers for a given domain, creating a delegation point and a subzone. The first name field specifies the zone that is served by the name server that is specified in the name servers name field. Every zone needs at least two name servers.

Figure D.4 shows an example of an NS resource record.

Figure D.4 Example of an NS record


{name} {ttl} addr-class NS Name servers name
siterequest.com IN NS host1.siterequest.com.
siterequest.com IN NS host2.siterequest.com.
 

PTR (Pointer)

A name pointer resource 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 D.5 is used to set up reverse pointers for the special IN-ADDR.ARPA domain.

Figure D.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 resource record, SOA, starts every zone file and indicates that a name server is the best source of information for a particular zone. In other words, the SOA record indicates that a name server is authoritative for a zone. There must be exactly one SOA record per zone.

Figure D.6 shows an example of an SOA record.

Figure D.6 Example of an SOA record


name {ttl} addr-class SOA Origin Person in charge
@ IN SOA ucbvax.Berkeley.Edu. johndoe.berkeley.edu (
1995122103 ; Serial
10800 ; Refresh
1800 ; Retry
3600000 ; Expire
259200 ) ; Minimum
 

The specific fields in an SOA record are defined as follows:

  • Person in charge
    The email address for the person responsible for the name server, with the at character ( @ ) changed to a dot ( . ). For example, johndoe@berkeley.edu becomes johndoe.berkeley.edu.

  • Serial number
    The version number of the 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 between calls, in seconds, that the secondary name servers make to the primary name server to check 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 D.2 lists less common resource record types. For more information on these, see RFCs 1035, 1183, and 1664.


 

Resource Record Type

Description

AAAA

IPv6 address

AFSDB

AFS database location

GPOS

Geographical position

HINFO

Host information

ISDN

Integrated services digital network address

KEY

Public key

KX

Key exchanger

LOC

Location information

MB

Mailbox domain name

MINFO

Mailbox or mail list information

NULL

A null RR

NSAP

Network service access point address

NSAP-PTR

(Obsolete)

NXT

Next domain

PX

Pointer to X.400/RFC822 information

RP

Responsible person

RT

Route through

SIG

Cryptographic signature

SRV

Server selection

TXT

Text strings

WKS

Well-known service description

X25

X25