DNS Primer - Sample DNS File
(Page 3 of 5 )
Sample DNS File for yourdomain.named.hosts located in /var/named
@ IN SOA www.yourdomain.com. postmaster.www.yourdomain.com. ( 2002020101 ;Serial 10800 ; Refresh 3 hours 3600 ; Retry 1 hour 604800 ; Expire 1 week 86400 ) ; Minimum 24 hours ; ; (yourdomain.com) Name and Mailserver Definition ; IN NS www.youdomain.com. IN NS auth00.ns.uu.net. IN MX 10 www.yourdomain.com. ; ; (yourdomain.com) Localhost Definition ; localhost IN A 127.0.0.1 ; ; (yourdomain.com) Hosts Definition ; yourdomain.com. IN A 111.111.111.111 www.yourdomain.com. IN A 111.111.111.111 ftp.yourdomain.com. IN A 111.111.111.111 mail.yourdomain.com. IN A 111.111.111.111 |
The first line is the (SOA) record for my DNS server. It is qualified as being an IN (Internet) record. www.yourdomain.com is the name of the name server itself. and postmaster.www.yourdomain.com is the e-mail address of the person responsible for this domain (you need to replace the first '.' with an '@' sign).
The remainder of the stuff is:
Serial Number: I use today's date with a two digit ending, in case you change it more that once per day. You must change this number with each change or your changes will not be read!
Refresh: In seconds, Is how often hosts re-query name server for record information.
Retry: In seconds, Is the number of seconds a remote host will wait if it can't get authoritative information about a host in your domain.
Expire: In Seconds, Is how long a secondary name server will cache information about a host in your domain before asking for updated values.
Minimum: In seconds, Is the default period of time that answers from this name server are used before new values will be asked for.
The NS record defines my domain's name server. Its IP address must be present both in this file and in the reverse IP address mapping file.
MX or Mail Exchange is the server that handles the mail. You can have a different mail server to handle all the mail. You can add you ISP's address to cache mail if yours goes down. They should be setup to do this.
Next: named.local >>
More Miscellaneous Articles
More By Codewalkers