"server" is the name of the name server, and "lab265" is the name of the zone.
All punctuation is required, and SOA and PTR resource records start in column 1.
options {
directory "/etc/namedb";
pid-file "/var/run/named.pid";
statistics-file "/var/run/named.stats";
};
zone "." {
type hint;
file "named.ca";
};
zone "0.0.127.in-addr.arpa" {
type master;
file "127.0.0";
};
zone "lab265" {
notify no;
type master;
file "lab265";
};
zone "1.168.192.in-addr.arpa" {
notify no;
type master;
file "192.168.1";
};
named.ca is located at
ftp.rs.internic.net/domain/named.root.
@ 86400 IN SOA server.lab265. root.server.lab265. ( 1 8H 2H 1W 1D)
;
; Start of Authority record begins each zone file
;
; 86400 is the time to live (in client resolver cache) in seconds
;
; "root.server.lab265" means "root@server.lab265", e-mail address for questions
;
; 1 = serial #, used by secondary server to check if updates have been made
; 8H = 8 hours, how often secondary server attempts to refresh data from primary
; 2H = 2 hours, how long to wait before retrying failed refresh
; 1W = 1 week, how long to wait before flushing data if no refreshes have been successful
; 1D = 1 day, how long answers from this server can be trusted without checking again
;
NS server.lab265.
;
; NS record specifies name of name server (present in each zone file)
;
1 PTR localhost.
;
; this mandatory pointer record is for 127.0.0.1
; (127.0.0 from named.conf, 1 from PTR record)
;
@ 86400 IN SOA server.lab265. root.server.lab265. ( 1 8H 2H 1W 1D)
NS server.lab265.
1 PTR server.lab265.
;
; this pointer record is for 192.168.1.1 - need one per host
;
@ 86400 IN SOA server.lab265. root.server.lab265. ( 1 8H 2H 1W 1D)
NS server.lab265.
localhost A 127.0.0.1
server A 192.168.1.1
www CNAME server
;
; server record describes host "server.lab265" (lab265 from named.conf)
;
; need one A record for each host + localhost (mandatory)
; need one CNAME record for each alias (optional)
;
©2005, Kenneth R. Koehler. All Rights Reserved. This document may be freely reproduced provided that this copyright notice is included.
Please send comments or suggestions to the author.