Zone File

By: Kailash Aghera

Listing 1:

; Zone file for domain.com

; START OF AUTHORITY

@ IN SOA machine.domain.com. postmaster.machine.domain.com. (

2005020501 ; serial number

3600 ; refresh [1h]

600 ; retry [10m]

86400 ; expire [1d]

3600 ) ; min TTL [1h]

; NAME SERVERS

@ IN NS nameserver1.domain.com.

@ IN NS nameserver2.domain.com.

; E-MAIL SERVERS

@ IN MX 10 mailserver1

@ IN MX 15 mailserver2

mailserver1 IN A 192.5.29.17

mailserver2 IN A 192.5.29.18

; Replace mailserver1 and mailserver2 with name of your mail server.

; OTHER HOSTS

sub-domain IN A 192.5.29.2

; CNAME RECORDS

ftp IN CNAME ftpserver

www IN CNAME other-host

(1) Start of Authority (SOA) record:

The first record in any zone file should be a "Start of Authority" (SOA) record. The SOA record provides important administrative information such as name of the server, name of domain administrator etc. The fields of this record are:



machine.domain.com: This is the host name of your server.

postmaster.machine.domain.com: This is the email address of the domain administrator. '@' sign between username (postmaster) and host name (machine.domain.com) in email address is replaced with dot (.). This special form of the email address is always used in SOA records. You should provide the valid email address for this value.

Serial number: Serial number through which we can identify that when the zone file has been updated. This serial number must be increased every time when the domain is updated. In above zone file, the serial number is formatted to show the date that the zone was last updated. The format is yyyymmddrr, where yyyy is the year, mm is the month, dd is the date and rr is the revision number. The two digit revision number allows up to 100 updates a day. It is not necessary to use the serial number in this format only. You can use simple sequential number in serial number but the date format is the most popular because it provides additional information regarding the zone file update.

Refresh cycle: Every refresh cycle, the secondary server (slave server) checks the serial number of the SOA record from the master server to determine whether the zone needs to be transferred or not. In above example, the refresh cycle defines in the seconds. The refresh cycle of 3600 seconds tells the secondary server to check every hour. You can define the refresh cycle in week (w), day (d), hours (h), minutes (m) and seconds (s) using an alphanumeric format. For example, 1h specify 1 hour.

Retry cycle: This is the time that a secondary server will wait before retrying a failed zone download. You can define the refresh cycle in week (w), day (d), hours (h), minutes (m) and seconds (s) using an alphanumeric format. For example, 10m specify 600 seconds.

Expiration time: A time, which a secondary server will keep trying to download a zone file. You can define the refresh cycle in week (w), day (d), hours (h), minutes (m) and seconds (s) using an alphanumeric format. For example, 1d specify 1 day.

Minimum TTL: The last value in the data field of SOA record is minimum time-to-live. The server keeps cache records and the TTL defines how long that is. You can define the refresh cycle in week (w), day (d), hours (h), minutes (m) and seconds (s) using an alphanumeric format. For example, 1h specify 1 hour.

(2) Nameservers:

NS records are used to specify the nameservers for a domain. In the above example '@' refers to the valid domain (i.e. domain.com).

(3) Mail server:

MX records define the mail server for a domain. The name field of the MX record contains the host name and the data field contains the host name of the mail server. The MX record 'mailserver1' has a preference of 10 and the second MX record 'mailserver2' has a preference 0f 20 in the listing 1. The lower the preference number, the more preferred server.

(4) Other host and CNAME Records:

'A' record of the zone file maps the host name to IP address. The A record has simple format. The name field contains the name of the host and the data field contains the IP address to which the host name is mapped. In the listing 1, sub-domain.domain.com maps to the IP address 192.5.29.2.

CNAME stands for Canonical Names. This record is also called "aliases" but is technically referred to as "Canonical Names (CNAME)" entries. These records allow you to use more than one name to point to a single host.

In above zone fine, ftp.domain.com points to ftpserver (enter the valid host i.e. ftp.abc.com) and similarly, www.domain.com points to other-host (i.e. xyz.com).

Kailash Aghera

-

Top Searches on
Computers
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 

» More on Computers
 



Share this article :
Click to see more related articles