Defintions

  • Domain - a group of machines administered as a unit and maintained by at least two name servers
company.com - company is the domain
sales.company.com - sales is a subdomain
  • Zone - everything a name server controls. May be one or more domains and subdomains e.g.

Domain FIDO has four subdomains and five sub-subdomains. It is divided into four zones (as there are four nameservers). FIDO is the namesever for sales,retail and wholesale, i.e. it is the authoritive server for these boxes and they make up it's zone of authority. Other is the nameserver for accts, finance and marketing whilst dist and R&D are their own namesevers.

Files

/etc/resolv.conf - lists the local domain name and location of the nameservers for the local system. It is required for every box using DNS and if it is removed, DNS will be disabled.e.g.

domain in2nix.com.
namesever 127.0.0.1
nameserver 172.2.2.2
nameserver 172.2.2.3

i.e. it tries itself first then the servers at the specified IP addresses If a short name is specified, in this example, the domain specified in the domain statement will get appended to the name. e.g.

nslookup fred  - will result is a lookup of fred.in2nix.com

If the domain statement is replaced with a search statement, all the domains listed on the search statement will be appended in turn (maximum of 6 domains, local domain must be first) e.g.

search in2nix.com in2nix.com another.domain.co.uk

will result in these three domains being appended onto fred when resolved.

/etc/named.boot - defines server type of local system and lists locations of stored name information. This file is the file read by the named daemon e.g.

; boot file for name server
;type domain source file or host
directory /var/named
domain in2nix.com
primary in2nix.com named.db
secondary cc.in2nix.com 172.2.2.3 10.100.100.1
cache . named.ca

These entries have the following meaning

  • directory - directory database files are kept in
  • domain - domain name of the server
  • primary - states server is primary for in2nix.com and the file named.db contains all the information required
  • secondary - name server is also secondary for cc.in2nix.com and information for this will either be copied from 172.2.2.3 or 10.100.100.1
  • cache - data in named.ca is placed on the cache. normally this is the location of root domain servers.
  • zone file (in this example it would be named.db) - contains data about all the hosts in the zone. They are in the format (known as resource records) name ttl class record-type record-specific-date

e.g.

; sample host data file (named.db in this example)
@ in SOA in2nix.com tdavis.in2nix.com.
101 ; serial
10800 ; refresh
3600 ; retry
432000 ; expire
IN NS in2nix.com
IN NS cc.in2nix.com
;
in2nix A 172.2.2.2
; HINFO SPARC20
MX 10 in2nix.com
host1 CNAME in2nix.com
host2 A 172.2.2.3
mx 10 in2nix.com
host2 A 172.2.2.4
etc...

Resource Record Types

  • SOA - start of authority
  • NS - name server
  • A - Internet address (name to address)
  • PTR - pointer (address to name)
  • CNAME - canonical name (nickname)
  • TXT - text information
  • WKS - well known services
  • HINFO - host information
  • MX - mail exchanger

Summary

Recent Changes

Contribute to this wiki

Why not help others by sharing your knowledge? Contribute something to this wiki and join out hall of fame!
Contact us for a user name and password