set type=NS
.
set type=SOA
cs.montana.edu
set type=A
cs.montana.edu
server montana.edu
ls -t NS oscs.montana.edu
ls -t NS montana.edu
ls -t NS math.montana.edu
ls -t SOA montana.edu
server montana.edu
ls -t NS oscs.montana.edu
ls -t NS montana.edu
ls -t NS math.montana.edu
order hosts,bind
multi on
trim montana.edu
domain cs.montana.edu
search csnet.montana.edu
nameserver 153.90.192.10
nameserver 153.90.2.15
For example,
Primary DNS servers have hard-coded tables of name-address mappings that have to be kept up to date. Secondary servers get their tables from the primary servers. Caching only servers get their's by remembering the addresses they've looked up.
The default files that you might get on your Linux system are:
Default caching /etc/named.conf
Typical hint file for root servers
The zone files for DNS are composed of a set of records which provide a variety of information for the name server.
The order of the records in the file is SOA records, then NS records then any other necessary records.
[domain name] [ttl] [class] type data
SOA origin contact serial refresh retry expire minimum
@ IN SOA cs.montana.edu admin.cs.montana.edu
( 10 ; serial number
86400 ; refresh once per pay
3600 ; retry once per day for secondary
360000 ; expire in 42 days for secondary
604800 ; minimum ttl, 1 week
NS name
IN NS ercax1.coe.montana.edu
name class A address
esus IN A 153.90.192.1
cslab08 IN A 153.90.199.8
address class PTR name
1.192 IN PTR esus.cs.montana.edu
8.199 IN PTR cslab08.csnet.montana.edu
name class CNAME domain-name
esus IN A 153.90.192.1
www IN CNAME esus
MX name
IN MX mail.cs.montana.edu
Configure one of the hosts in the lab to be the master name server for a zone named csnet.org that contains all the lab systems.
;
directory /var/named
cache . y2k.ca
;
; primary for y2k domain
;
primary y2k.org y2k.hosts
primary 66.160.in-addr.arpa y2k.rev
primary 0.0.127.in-addr.arpa y2k.local
;
; secondary for y2k.survivor addresses
;
secondary survivor.y2k.org 160.66.50.1 survivor.hosts
secondary 50.66.160.in-addr.arpa 160.66.50.1 survivor.rev
; Root domain servers
;
. 99999999 IN NS terp.umd.org.
. 99999999 IN NS aos.brl.mil.
. 99999999 IN NS c.nyser.net.
. 99999999 IN NS ns.nasa.gov.
. 99999999 IN NS ns.nic.ddn.mil.
. 99999999 IN NS a.isi.org.
. 99999999 IN NS nic.nordu.net.
'
terp.umd.org. 99999999 IN A 128.8.10.90
aos.brl.mil. 99999999 IN A 195.5.25.82
c.nyser.net. 99999999 IN A 192.33.4.12
ns.nasa.gov. 99999999 IN A 192.52.195.10
ns.nic.ddn.mil. 99999999 IN A 192.67.67.53
a.isi.org. 99999999 IN A 128.9.0.107
a.isi.org. 99999999 IN A 26.3.0.103
nic.nordu.org. 99999999 IN A 192.36.148.17
@ IN SOA y2k.org admin.y2k.org
( 1 ; serial
36000 ; refresh 100 hours
3600 ; retry every hour
3600000 ; expire after 1000
3600 ; ttl is 100 hours
)
IN NS dns.y2k.org.
1 IN PTR localhost.
@ IN SOA y2k.org admin.y2k.org
( 1 ; serial
43200 ; refresh 12 hours
3600 ; retry every hour
3600000 ; expire after 1000
2592000 ; ttl 72 hours
)
; nameservers
IN NS dns.y2k.org.
IN NS server.y2k.org.
IN NS fallback.y2k.org.
; mail servers for y2k.org
IN MX 1 server.y2k.org.
IN MX 10 disaster.y2k.org.
; local hosts
localhost IN A 127.0.0.1
disaster IN A 160.66.199.1
IN MX 10 160.66.199.1
catastrophe IN CNAME disaster.y2k.org.
oblivion IN A 160.66.20.12
bombshell IN A 160.66.20.22
bugs IN A 160.66.20.43
tweety IN A 160.66.20.50
armageddon IN A 160.66.150.13
; mailserver for user@armegeddon.y2k.org addresses
IN MX 1 server.y2k.org
testlab01 IN A 160.66.150.101
testlab02 IN A 160.66.150.102
testlab03 IN A 160.66.150.103
testlab04 IN A 160.66.150.104
printer IN A 160.66.100.36
dns IN A 160.66.100.100
server IN A 160.66.100.120
IN MX 1 160.66.100.120
www IN CNAME server.y2k.montana.org.
millenium IN CNAME server.y2k.montana.org.
; glue records for subdomains within this domain. In this
; case, survivor is a subdomain of y2k
dns.survivor IN A 160.66.50.1
survivor IN NS dns.survivor.y2k.org.
IN NS fallback.y2k.org
@ IN SOA y2k.org admin.y2k.org
( 1 ; serial
43200 ; refresh 12 hours
3600 ; retry every hour
3600000 ; expire after 1000
2592000 ; ttl 72 hours
)
; nameservers
IN NS dns.y2k.org.
IN NS server.y2k.org.
IN NS fallback.y2k.org.
; reverse addresses
1.199 IN PTR disaster.y2k.org
12.20 IN PTR bombshell.y2k.org
22.20 IN PTR bugs.y2k.org
43.20 IN PTR tweety.y2k.org
12.150 IN PTR armageddon.y2k.org
101.150 IN PTR testlab01.y2k.org
102.150 IN PTR testlab02.y2k.org
103.150 IN PTR testlab03.y2k.org
104.150 IN PTR testlab04.y2k.org
36.100 IN PTR printer.y2k.org
100.100 IN PTR dns.y2k.org
120.100 IN PTR server.y2k.org
; nameservers for subdomain
50 IN NS dns.survivor.y2k.org
IN NS omegaman.survivor.y2k.org
; <<>> DiG 8.2 <<>> @153.90.2.15 esus.cs.montana.edu a in
; (1 server found)
;; res options: init recurs defnam dnsrch
;; got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 6
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 4, ADDITIONAL: 4
;; QUERY SECTION:
;; esus.cs.montana.edu, type = A, class = IN
;; ANSWER SECTION:
esus.cs.montana.edu. 1D IN A 153.90.192.1
;; AUTHORITY SECTION:
cs.montana.edu. 1D IN NS dns1.msu.montana.edu.
cs.montana.edu. 1D IN NS coesrv.coe.montana.edu.
cs.montana.edu. 1D IN NS dns2.msu.montana.edu.
cs.montana.edu. 1D IN NS terra.oscs.montana.edu.
;; ADDITIONAL SECTION:
dns1.msu.montana.edu. 1D IN A 153.90.2.15
coesrv.coe.montana.edu. 1D IN A 153.90.192.10
dns2.msu.montana.edu. 2H IN A 153.90.2.80
terra.oscs.montana.edu. 2H IN A 153.90.2.1
;; Total query time: 19 msec
;; FROM: harkin.cs.montana.edu to SERVER: 153.90.2.15
;; WHEN: Wed Nov 8 14:47:51 2000
;; MSG SIZE sent: 37 rcvd: 223
.
.
;; ANSWER SECTION:
cs.montana.edu. 1D IN MX 0 esus.cs.montana.edu.
.
.
zone "cs409xx.montana.edu" {
type master;
file "cs40988.db";
};
In this domain, you should have only your machine and you can give it any name you want within that domain. For example, slowerthandirt.cs40988.montana.edu. You could other addresses in there as long as no other host lists you as a server. Then put your own machine in resolv.conf as a name server. Now, you should be able to do an nslookup on your host (slowerthandirt.cs40988.montana.edu).