- Zone file
In
computer networking , a zone file is a database element of thedomain name system (DNS) originally used by the Berkeley Internet Name Domain (BIND) software package and other DNS server software. As such it has derived its definition from the structure of the input data of theBIND program. A zone file typically contains information that defines mappings betweendomain name s andIP address es and other resources, organized in form of so-called zone resource records (RR). Resolving a name into a numeric resource is often called a 'forward' map using a forward-zone file, and the reverse map, translating an address into a name uses 'reverse'-zone files. A zone is the portion of a domain or the entire DNS name space of which management has been delegated. This applies at all levels oftop-level domain s andsubdomain s. The zone file is the database representation of such delegation. The format of the zone file is defined in RFC 1035 as well as the documentation forBIND .A simple example of a zone file: $ORIGIN example.com. ; designates the start of this zone file in the name space $TTL 1h ; The default expiration time of a resource record without its own TTL value example.com. IN SOA ns.example.com. username.example.com ( 2007120710 ; serial number of this zone file 1d ; slave refresh (1 day) 1d ; slave retry time in case of a problem (1 day) 4w ; slave expiration time (4 weeks) 1h ; minimum caching time in case of failed lookups (1 hour) ) example.com. NS ns ; ns.example.com is the nameserver for example.com example.com. NS ns.somewhere.com. ; ns.somewhere.com is a backup nameserver for example.com example.com. MX 10 mail.example.com. ; mail.example.com is the mailserver for example.com example.com. A 10.0.0.1 ; ip address for "example.com" ns A 10.0.0.2 ; ip address for "ns.example.com" www CNAME ns ; "www.example.com" is an alias for "ns.example.com" wwwtest CNAME www ; "wwwtest.example.com" is another alias for "www.example.com" mail A 10.0.0.3 ; ip address for "mail.example.com", any MX record host must be ; an A or AAAA record, it should never be a CNAME record ; as explained in RFC 2181 (section 10.3)
As a minimum, the zone file should specify the default "time to live" (TTL) for a record in a clients cache after which it should repeat the lookup, and the 'Start of Authority' (SOA) record with the name of the primary authoritative nameserver for the zone, the email address of someone responsible for management of the nameserver and the zone, and some information for backup nameservers, that is, other servers that keep a backup copy of the zone information in case the main nameserver is not reachable. The email address has the @ symbol replaced by a period (.). In the zone file, host names that do not end in a period are assumed to be relative to the zone origin. For example, in the example above, "www" refers to "www.example.com", but "example.com." does not refer to "example.com.example.com", but rather to "example.com". Names ending with a period are said to be 'fully qualified' domain names. A list of other record types that can be found in zone files is available.
A zone file is referenced by the configuration file of the nameserver software such as bind, typically by a statement such as:
zone "example.com" { type master; file "/var/named/db.example.com"; };
References
* RFC 1035 (P. Mockapetris, November 1987) - defines the binary format of resource records
See also
*
DNS zone
*List of DNS record types
*MX record
Wikimedia Foundation. 2010.