Understanding bind dns zone file

Here we will explore the bind dns zone file terms and their usage. The format is defined in RFC 1035

$TTL 86400
useoflinux.com. INSOA ns1.useoflinux.com. vedkumargupta.gmail.com. (
1999112701 ;serial number
 10800 ;refresh
 3600 ; retr [10m]
 604800 ; expire [1d] 
86400) ; min TTL [1h]

useoflinux.com.IN             NS                      ns1.useoflinux.com.
useoflinux.com.  IN             NS                    ns2.useoflinux.com.                              
useoflinux.com.        IN              A                       201.............
www.useoflinux.com.   IN              CNAME                 201............
useoflinux.com  IN  MX          10 mail.useoflinux.com.
mail.useoflinux.com. IN                    A          201............ 

Let us now explore the above bind dns zone file

The entries on this line are:

1. useoflinux.com. – Indicates this server is for the domain useoflinux.com.

2. IN – Indicates Internet Name.

3. SOA – Indicates this server is the authority for its domain, useoflinux.com.

4. ns1.useoflinux.com. – The primary nameserver for this domain.

5. vedkumargupta.gmail.com. – The person to contact for more information.

The lines in the parenthesis, listed below, are for the secondary nameserver(s) which run as slave(s) to this one (ns1 ns2 ns3)  

·   1999112701 – Serial number – If less than master’s SN, the slave will get a new copy of this file from the master.

·   10800 – Refresh – The time in seconds between when the slave compares this file’s SN with the master.

·   3600 – Retry – The time the server should wait before asking again if the master fails to respond to a file update (SOA request).

·   604800 – Expire – Time in seconds the slave server can respond even though it cannot get an updated zone file.

·   86400 – TTL – The time to live (TTL) in seconds that a resolver will use data received from a nameserver before it will ask for the same data again.

More in detail

The SOA resource record contains the following information:  
 Source host – The host where the file was created. ( Also called MNAME)  
 
Contact e-mail – The e-mail address of the person responsible for administering the domain’s zone file. Note that a “.” is used instead of an “@” in the e-mail name.  (Also called RNAME) 
 

Serial number

The revision number of this zone file. Increment this number each time the zone file is changed. It is important to increment this value each time a change is made, so that the changes will be distributed to any secondary DNS servers. (YYYYMMDDnn) for the year (YYYY, four digits), month (MM, two digits), day of month (DD, two digits) and version per day (nn, two digits). The first version of the day should have the value “01”.  
 
Refresh Time 

– The time, in seconds, a secondary DNS server waits before querying the primary DNS server’s SOA record to check for changes. When the refresh time expires, the secondary DNS server requests a copy of the current SOA record from the primary. The primary DNS server complies with this request. The secondary DNS server compares the serial number of the primary DNS server’s current SOA record and the serial number in it’s own SOA record. If they are different, the secondary DNS server will request a zone transfer from the primary DNS server. The default value is 3,600.  
 
Retry time

The time, in seconds, a secondary server waits before retrying a failed zone transfer. Normally, the retry time is less than the refresh time. The default value is 600.  
 
Expire time

The time, in seconds, that a secondary server will keep trying to complete a zone transfer. If this time expires prior to a successful zone transfer, the secondary server will expire its zone file. This means the secondary will stop answering queries, as it considers its data too old to be reliable. The default value is 86,400.  
 
Minimum TTL 

  • The minimum time-to-live value applies to all resource records in the zone file. This value is supplied in query responses to inform other servers how long they should keep the data in cache. The default value is 3,600.

Conclusion

We have explore different terminologies used in bind dns zone file in depth. We have learnt about different terms used in the bind dns zone file.

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments