DNS

DNS (Domain Name System) is a system for resolving domain names to IP addresses, Kerberos Realms, and other information. It is currently used in the Computer Systems Lab to provide forward and reverse name resolution as well as location of Kerberos and AFS realms.

Structure
DNS is structured as a hierarchical tree. At the root of the tree is a DNS Zone called. or the root zone. The root zone is managed by thirteen nameservers (creatively called a-m.root-servers.net) about half of which are anycasted to locations around the world.

While they form the root of DNS; the root nameservers don't actually know how to answer a query for say www.tjhsst.edu (198.38.16.47). Rather, they know where to go to find the answer. In the case of www.tjhsst.edu, the answer is to go to the EDUCAUSE nameservers which manage the .edu TLD (Top-Level Domain). The .edu nameservers in turn, still don't know the answer, but they know where the answer is, in this case, with ns1 and ns2 which are the Authoritative nameservers for the tjhsst.edu domain. Finally, either ns1 or ns2 will tell you that www.tjhsst.edu has the IP 198.38.16.47 (assuming that is the information you were asking for).

Recursive vs Authoritative Nameservers
There are two types of nameservers that are generally involved in DNS. A single DNS Server can have one or both of these roles although it is considered best practice to separate them for security.

An authoritative nameserver has a database of some type which contains the records for a domain. In general, a domain will have one master nameserver on which the database is updated manually, and one or more slave nameservers which automatically transfer changes from the master.

A recursive nameserver has no knowledge or records of its own, but rather, resolves records for other systems and then caches the response so that it can respond to other queries about the same record without rerunning the lookup sequence outlined above. The amount of time records are cached is controlled by the TTL (Time To Live) which is specified by the Authoritative nameserver for the zone. A higher TTL places less load on the Authoritative nameservers but also means changes take longer to propagate. It is considered good practice to lower the TTL for a domain to around 5 minutes before making major changes to minimize the amount of time a mistake would be cached.

CSL Layout
Both recursive and authoritative DNS for tjhsst.edu are currently provided by ns1 and ns2. Both are Gentoo KVM VMs running ISC BIND (Berkeley Internet Name Daemon), sometimes called named which is the name of the daemon.

Record Types
There are a number of different record types for the various types of information that can be stored in DNS.

A
One of if not the most common record type, an A record simply maps a domain name to an IP address.

One domain name can have more than one A record in which case most DNS servers will alternate which IP address they return. This is called a round-robin and is frequently used for load-balancing.

AAAA
A AAAA record is almost identical to an A record except that it is used for IPv6 addresses instead.

CNAME
A CNAME (Canonical Name) is used to alias one domain record to another. This is frequently used together with apache name-based virtual hosting.

NS
An NS (NameServer) record is used to delegate control of a subdomain to another nameserver or nameservers.

MX
An MX record is used to tell sending mailservers where they can find the mailservers for a particular domain. Without MX records, the default assumption is to send mail to the same address as the domain which is frequently not wanted. MX Records contain both a domain name and a priority which can be used to setup a backup mailserver while still ensuring that mail is delivered to the main server if it is up. Mail Servers with equal priority are rotated similar to A record round-robins.

SRV
SRV (Service) records are used to map domain names to the servers and ports which provide a service under that domain name. Microsoft Active Directory for example, uses SRV records heavily to allow clients to locate the various Domain Services. In the CSL, we use SRV records to help systems locate our Kerberos services. Notice that these records do not have the IN (Internet) type.

AFSDB
AFSDB records function similar to SRV records specifically for AFS.

TXT
TXT records are simply used to store text. These are frequently used to test new record ideas before an official record type is created. For example, many SFP records are still provided as TXT records.

SOA
The SOA record for a domain provides administrative information for the domain. These include the serial number (used to allow slave nameservers to update from the master), the default record TTL and expiration time, and the master nameserver address and domain administrator email address.