DistributedNetworks DistributedNetworks

Domain Name Service  «Prev  Next»
Lesson 10 Zone file generalities
Objective Describe general format of a zone file.

Zone File Generalities

Before we discuss the individual record types that appear in the zone files, let us look at the general format of a Resource Record. Each record has the following general shape:

  1. KEY is the key to be looked up.
  2. IN refers to Internet. In principle, DNS can be used for other networking protocols; in practice, IN is the only thing you ever see in this position of the Resource Record.
  3. TYPE is the type of Resource Record (SOA, A, PTR, and so forth).
  4. VALUE is the result of the lookup.

Zone file Special Features

Several other special features appear in zone files:
  1. Repetition convention. If the KEY is blank, the key from the previous record is used.
    Lines beginning with a semicolon “;” are comments.
  3. $CODE.
    Certain special directives regarding the interpretation of the file by the server are marked by $CODE.
    In our examples you will see the code $ORIGIN. The $ORIGIN code means that all the KEY values in the left column are relative to $ORIGIN; the $ORIGIN value is added to the end of these key values and makes the file easier to read.

Zone File Format
The code below contains examples of the code $ORIGIN.
  1. The key to be looked up
  2. Internet
  3. Type of Resource Record
  4. Result of the lookup
  5. The key is blank, so the previous key is used
  6. All the key values in the left column are relative to corporation.com

@ signs

There is one additional special feature that may appear in zone files: @ signs. An @ sign represents a value to be inserted by the server from its configuration files. For example, if the server is configured to use the file file.zone as the zone file for the corporation.com zone, and an @ sign is used in the left column as a KEY value, the server replaces the @ with corporation.com. The examples in this course do not show @ signs.