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:
KEY IN TYPE VALUE
KEY is the key to be looked up.
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.
TYPE is the type of Resource Record (SOA, A, PTR, and so forth).
VALUE is the result of the lookup.
Zone file Special Features
Several other special features appear in zone files:
Repetition convention. If the KEY is blank, the key from the previous record is used.
Comments. Lines beginning with a semicolon ; are comments.
$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.
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.