Format of Resource Records

As stated previously, when you use DNS Manager to create your zone files the data for each resource record is automatically formatted. In general, you do not need to worry about the format of resource records. However, if you manually examine the DNS data files, you must understand the record format.

The standard format of a resource record as specified by RFCs 1034 and 1035 is shown following:

<name> [<ttl>] [<class>] <type> <data>

The following table describes the fields in a resource record.

Table 2.4 Resource Record Format

Field

Description

Name

A host name.

TTL

The time-to-live (TTL) value is an optional entry. It is a 32-bit integer that represents, in seconds, the length of time the record is valid, after which it should be discarded.

Class

The class identifies the protocol and is generally IN, for Internet. Microsoft DNS server uses only IN class.

Type

The type specifies a resource record type. The most commonly used types are SOA, NS, A, CNAME, MX, and PTR.

Data

The data field is variable and is different for each record type. This field contains the information that is defined by the record type. The data in this field is specific to a particular host.


Most resource records are represented as single-line text entries. Records can use multiple lines by using a right parenthesis character at the end of the first line and a left parenthesis character at the end of the last line.

Under Microsoft DNS server, each resource record is entered into the zone file with preceding and following blank lines to improve readability. All blank and comment lines begin with a semicolon (;) and end with a carriage return. The semicolon character instructs Microsoft DNS server to ignore the line.

Consider the following example, which is taken from the sample DNS zone file place.dns, located in the \root\system32\dns\examples directory.

; START OF AUTHORITY

;

@ IN SOA nameserver.place.dom. postmaster.place.dom. (

1 ; serial number

36000 ; refresh [1h]

600 ; retry [10m]

86400 ; expire [1d]

3600 ) ; min TTL [1h]

;

; NAME SERVERS

;

;

place.dom

@ IN NS nameserver.place.dom.

@ IN NS nameserver2.place.dom.

nameserver IN A 192.5.29.7

nameserver2 IN A 192.5.29.8

;

; WINS LOOKUP

;

; The WINS LOOKUP is specific to the Microsoft DNS server
; implementation of DNS resource records and may be attached ONLY

; to the zone root. Presence of a WINS record at the zone root
; instructs the name server to use WINS to lookup any requests for A
; (address) records for names which are DIRECT children of zone root,
; and which do NOT have A records in the zone file.

;

@ IN WINS LOCAL 192.5.29.2 192.5.29.3

;

; E-MAIL SERVERS

;

@ IN MX 10 mailserver1

@ IN MX 15 mailserver2

mailserver1 IN A 192.5.29.17

192.5.29.19

;

; CNAME RECORDS

;

; The following records are sometimes called "aliases" but are

; technically referred to as "Canonical Names (CNAME)" entries.

; These records allow you to use more than one name to point to

; a single host.

;

; For example, the entries below mean that:

;

; ftp.place.dom. is really host.place.dom.

; www.place.dom. is really other-host.place.dom.

;

; By using CNAME records, you avoid typing duplicate information

; in your database files.

;

ftp IN CNAME host

www IN CNAME other-host

Note that some line entries contain the @ character in the name field (that is, the first field). When the @ character exists in a name field, Microsoft DNS server assumes the name value is the same as the name of the zone. When the name field is blank, Microsoft DNS server assumes the name value is the same as that for the preceding record.

The name field is followed by the optional TTL field. If this field is blank, Microsoft DNS server assumes that TTL value is the same as the TTL value that was specified in the SOA record by using DNS Manager to configure zone properties. The default TTL value is 60 minutes. You can change this default value by using DNS Manager to edit the SOA value.

Û To change the default TTL value

1. Start DNS Manager.

2. Right-click the folder for the zone whose default TTL value you want to change.

3. Click Properties.

4. Click the SOA Record tab.

5. Increase or decrease the value in the Minimum Default TTL box.

6. Increase by 1 the value in the Serial Number box. The serial number is the number used to identify the version of the file.

7. Click OK, then click OK again.