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).
Blank lines are permissible.
Comments become through "; " introduced. Everything which right of one "; " emerges, is considered as comment. Comments are transferred with the zone transfer not with.
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
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
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
If two or more successive RRs have the same name, then only first needs to be indicated.
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
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
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
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
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
With the well-known BIND name servers existed in addition the $GENERATE instruction, with which PTR resource record can be produced automatically.
We found here 5 articles.
Z» Zone (DNS)» Zone C » Zone file » Zone transfer » Zone Walking |
We found here 6 related websites.
Index | Privacy | Terms Of Use | Sitemap | Feedback