Web Site

Domain-name-system.org


» Domain Name System » Topics begins with Z » Zone file


Page modified: Friday, June 23, 2006 20:29:01

A zone file is part of a name server in the Domain Name System. It consists of a list of resource record. A zone file describes a zone completely. It must be present exactly a SOA resource record and at least LV resource record. The SOA-RR is usually at the beginning of a zone file.

Apart from the Syntax-Regeln of the individual RR-types the RFC standards define different global Syntax-Regeln. Principal purpose of these global rules is to improve the legibility from zone files to. A syntax error leads usually to the fact that the entire zone file is regarded as useless. The name server behaves then similarly, as if this zone would be not at all present. To DNS inquiries it reacts with a SERVFAIL error message (if the zone is actually missing, reacts it with NXDOMAIN).

Rules

Rule 1 - Blank lines

Blank lines are permissible.

Rule 2 - Comments

Comments become through "“; "” introduced. Everything which right of one "“; "” emerges, is considered as comment. Comments are transferred with the zone transfer not with.

Rule 3 - instructions of several lines

Is if resource a record on several lines to be distributed, then clips must be used.

Example:

     example.com. 1800 IN SOA ns1.example.com. mailbox.example.com. (100; Serial number 300; Refresh Time 100; Retry Time 6000; Expire Time 600; negative Caching time) example.com. 1800 IN LV ns1.example.com. ns1.example.com. 1800 IN A 172.27.182.17 www.example.com. 1800 IN A 192.168.1.2 xxx.external.net. 1800 IN A 1.2.3.4 

Rule 4 - @ as substitute symbols for zone names

If the name of the zone appears - which Origin so mentioned - without Extension isolates, then it may be replaced by "“@"”.

Example file example.com:

     @ 1800 IN SOA ns1.example.com. mailbox.beispiel.de. (100; Serial number 300; Refresh Time 100; Retry Time 6000; Expire Time 600; negative Caching time) @ 1800 IN LV ns1.example.com. @ 1800 IN A 1.2.3.4 alias.example.com. 1800 IN CNAME @ ns1.example.com. 1800 IN A 172.27.182.17 www.example.com. 1800 IN A 192.168.1.2 

Rule 5 - Zone name may be omitted

If the Origin (name of the zones) at the end of a name appears, then it may be omitted.

Example zone example.com:

     @ 1800 IN SOA ns1 mailbox (100; Serial number 300; Refresh Time 100; Retry Time 6000; Expire Time 600; negative Caching time) @ 1800 IN LV ns1 ns1 1800 IN A 172.27.182.17 www 1800 IN A 192.168.1.2 

Rule 6 - only the first name must be indicated

If two or more successive RRs have the same name, then only first needs to be indicated.

Rule 7 - "“must be indicated IN"” only once

The class field "“IN"” must be indicated only for the first RR.

Example:

     @ 1800 IN SOA ns1 mailbox (100; Serial number 300; Refresh Time 100; Retry Time 6000; Expire Time 600; negative Caching time) 1800 LV ns1; the name may be omitted ns1 1800 A 172.27.182.17 www 1800 A 192.168.1.2 

Rule 8 - TTL

If no TTL is present in a RR, then the last TTL value existing in the zone file is used before. Before if no TTL is present, then the value from the SOA resource record is taken.

Example:

     @ IN SOA ns1 mailbox 100,300,100 6000 1234 LV ns1; =1234 from SOA ns1 A 172.27.182.17; TTL=1234 from SOA www 20 A 192.168.1.2; TTL=20 test A 1.2.3.4 applies off here; TTL=20 from previous entry 

Rule 9 - $ORIGIN

Standard Origin is the file name without Extension. With the $ORIGIN instruction arbitrary other Origins can be defined. A newly defined Origin is valid for all following lines up to the next $ORIGIN instruction.

Example zone example.com:

     @ IN SOA ns1 mailbox 100,300,100 6000 1800 LV ns1 ns1 A 172.27.182.17 www A 192.168.1.2 $ORIGIN sub.example.com. xxx A 1.2.3.4 

Rule 10 - $TTL

With the $TTL instruction a default TTL value can be given.

Example:

     $TTL 1800 @ IN SOA ns1 mailbox 100,300,100 6000 600 LV ns1 ns1 A 172.27.182.17 

Rule 11 - $INCLUDE

With $INCLUDE instructions further files can be merged. These must naturally exhibit a correct syntax. The $INCLUDE instruction has only local meaning. With the zone transfer the expanded zone will transfer.

Example:

     @ IN SOA ns1 mailbox 100,300,100 6000 1800 LV ns1 ns1 A 172.27.182.17 $INCLUDE /var/named/mx-records.txt $INCLUDE /var/named/a-records.txt 

Other

With the well-known BIND name servers existed in addition the $GENERATE instruction, with which PTR resource record can be produced automatically.


Articles in category "Zone file"

We found here 5 articles.

Z

» Zone (DNS)
» Zone C
» Zone file
» Zone transfer
» Zone Walking

Related Websites

We found here 6 related websites.

  • Appendix A: - Zones and Zone files
    Zones are described in zone files (sometimes called master files) (normally located in /var/named) which can contain Directives (used by the DNS software eg ...

  • DNS Demystified - The Zone File
    DNS, the Domain Name System, is one of those things that <BR>scares a lot of Systems Administrator...

  • DNS Sample Domain Zone File
    This file (pri.example.com) is the standard sample zone file used throughout this Chapter and has the following characteristics. ...

  • Tech-Recipes.com - DNS/BIND: Create a basic zone file
    A zone file holds the DNS resource records for all of the domain names associated ... This recipe describes the basic zone file format without any resource ...

  • Zone file
    A zone file contains two parts. First, the SOA section, and then the list of DNS records. A typical zone file will look something like this: ...

  • Zone Files
    Zone files contain information about a namespace and are stored in the named ... Each zone file is named according to the file option data in the zone ...

Page cached: Wednesday, July 5, 2006 14:16:06
Valid XHTML 1.0!  Valid CSS!

Page copy protected against web site content infringement by Copyscape