Network Administration: Zone Files and Resource Records - dummies

Network Administration: Zone Files and Resource Records

Each DNS zone is defined by a zone file (also known as a DNS database or a master file). For Windows DNS servers, the name of the zone file is For example, the zone file for the zone is named

For BIND DNS servers, the zone files are named db.domain. Thus, the zone file for the domain would be The format of the zone file contents is the same for both systems, however.

A zone file consists of one or more resource records. Creating and updating the resource records that comprise the zone files is one of the primary tasks of a DNS administrator. The Windows DNS server provides a friendly graphical interface to the resource records. However, you should still be familiar with how to construct resource records.

Resource records are written as simple text lines, with the following fields:

Owner   TTL   Class   Type   RDATA

These fields must be separated from each other by one or more spaces. The following list describes the five resource record fields:

  • Owner: The name of the DNS domain or the host that the record applies to. This is usually specified as a fully qualified domain name (with a trailing dot) or as a simple host name (without a trailing dot), which is then interpreted in the context of the current domain.

    You can also specify a single @ symbol as the owner name. In that case, the current domain is used.

  • TTL: Also known as Time to Live; the number of seconds that the record should be retained in a server’s cache before it’s invalidated. If you omit the TTL value for a resource record, a default TTL is obtained from the Start of Authority (SOA) record.

  • Class: Defines the protocol to which the record applies. You should always specify IN, for the Internet protocol. If you omit the class field, the last class field that you specified explicitly is used. As a result, you’ll sometimes see zone files that specify IN only on the first resource record (which must be an SOA record) and then allow it to default to IN on all subsequent records.

  • Type: The resource record type. The most commonly used resource types are summarized in the following table. Like the Class field, you can also omit the Type field and allow it to default to the last specified value.

  • RDATA: Resource record data that is specific to each record type.

Common Resource Record Types
Type Name Description
SOA Start of Authority Identifies a zone
NS Name Server Identifies a name server that is authoritative for the
A Address Maps a fully qualified domain name to an IP address
CNAME Canonical Name Creates an alias for a fully qualified domain name
MX Mail Exchange Identifies the mail server for a domain
PTR Pointer Maps an IP address to a fully qualified domain name for reverse

Most resource records fit on one line. If a record requires more than one line, you must enclose the data that spans multiple lines in parentheses.

You can include comments to clarify the details of a zone file. A comment begins with a semicolon and continues to the end of the line. If a line begins with a semicolon, the entire line is a comment. You can also add a comment to the end of a resource record. You see examples of both types of comments later in this chapter.