DNS Guide

index

DNS Architecture BIND Resource Records Zone File

DNS Architecture

Root Internic Keeps records on which registrar a domain is registered with.
Registrar Network Solutions Maintains WHOIS record denoting primary and secondary nameservers for a domain, plus contact information.
DNS Server b.ns.verio.net Maintains the domain's zone file, containing individual resource records.
Host 161.58.175.189 The actual host pointed to by the resource record.

Anatomy of a Basic DNS Lookup

  1. User's machine needs the IP address for www.mindflip.com.
  2. User's machine checks it's TCP/IP DNS settings (MS Windows) or /etc/resolv.conf file (Unix) to determine the machine's DNS resolver servers.
  3. User's machine sends DNS request to resolver server. (Returns 129.250.35.250)
  4. If the resolver knows the answer, it answers immediately; otherwise, it sends a request to the root nameservers to identify the registrar for the domain. (Returns Network Solutions)
  5. Resolver server queries registrar's WHOIS server for the addresses of the domain's primary and secondary DNS servers. (Returns 129.250.35.32).
  6. Resolver queries the primary or secondary DNS server for the IP address of the hostname requested by the user's machine. (Returns 161.58.175.189).
  7. Resolver server returns answer to user's machine.

BIND

BIND, the Berkeley Internet Name Daemon, is the premier DNS software running on the internet. It runs on most Unix platforms, and most versions consist of the following components.
named.conf The master configuration file for named, named.conf usually lives in /etc, /etc/namedb/ or something similar.
named.root The list of addresses of the root nameservers, for resolving non-local and non-cached requests.

Resource Records

SOA start of authority exists at the beginning of the zone file, and sets out the basic parameters for the zone
NS nameserver lists all the authoritative nameservers for the zone
A address maps a hostname to an IP address
CNAME canonical name maps a hostname to another existing hostname
MX mail exchange maps a domain to the hostname of the mailserver for that domain
PTR pointer maps an IP address to a hostname

Zone File

mindflip.com.   86400   IN      SOA     b.ns.verio.net. dns.verio.net. (
                                        2001070800      ; Serial
                                        10800   ; Refresh
                                        1800    ; Retry
                                        1209600 ; Expire
                                        86400 ) ; Minimum TTL
arjuna.mindflip.com.    43200   IN      A       206.50.17.92
krishna.mindflip.com.   43200   IN      A       206.50.17.89
lakshmi.mindflip.com.   43200   IN      A       161.58.175.189
localhost.mindflip.com. 43200   IN      A       127.0.0.1
mailhost.mindflip.com.  86400   IN      CNAME   arjuna.mindflip.com.
www.mindflip.com.       43200   IN      CNAME   lakshmi.mindflip.com.
mindflip.com.   43200   IN      NS      b.ns.verio.net.
mindflip.com.   43200   IN      NS      t.ns.verio.net.
mindflip.com.   43200   IN      MX      10 arjuna.mindflip.com.
mindflip.com.   43200   IN      MX      20 backupmx1.veriomail.com.