next up previous

Domain Name System - DNS

This contains links to information used in the lectures.

Overview

DNS allows the mapping of symbolic names to Internet addresses. Originally done statically in a centralised file. Can be done statically in /etc/hosts. As Internet grew there was a need for a dynamic distributed system. DNS ws specified in 1983 and became part of BSD as Berkeley Internet Domain System (BIND) in 1985.

DNS


DNS defines:

DNS Namespace

Although DNS hierarchies can be set up for private networks, the vast majority of DNS use is by the giant hierarchy present on the Internet, that wholly remarkable network of networks that spans the globe. Most of the use comes from name resolution, the use of DNS for determining the IP address of a machine so that communication can take place.

The top-level domains in the Internet's DNS are comprised of two-letter abbreviations for each country, such as "UK" and "US", as well as a handful of special domains that exist mainly due to tradition, such as "EDU", "COM", "NET", "GOV", and "MIL".

There are a number of "root nameservers" in existance in various corners of the Internet which store the ultimate information for the root domain, as well as zones for a handful of top-level domains. Certain organizational units such as countries and universities have delegation of domains underneath the root and top-level domains. Entities wishing domain names must register, and perhaps receive delegation of, their domains from the appropriate registry.

Reverse Name Resolution

Another important task of DNS on the Internet is reverse name resolution, or the translation of IP addresses back to domain names. This is important, for example, so servers can determine and record the full domain name of machines connecting to them over the network. It is not efficient to use the same set of DNS records for reverse name resolution (one would have to search through *every* domain name on the Internet in hopes of finding the one with the matching IP address!). Instead, a seperate domain called "IN-ADDR.ARPA" has been set aside to provide a hierarchy for translating IP addresses into names. A DNS lookup of "borg.ee.msstate.edu" would reveal it has the IP address "130.18.64.5". If one has the IP address and wishes to know the name, one must perform a DNS lookup of "5.64.18.130.in-addr.arpa", which will return the name. Reverse name resolution fields use the PTR resource record, which "points" to the correct position in the normal DNS space. The hierarchy under "IN-ADDR.ARPA" can be delegated, of course, just like any other domain. This graphic demonstrates the principle of reverse name resolution.

BIND Components

named: BIND name server


The Resolver Library

This provides for lookup of names from the database rather than from /etc/hosts by gethostbyname and gethostbyaddr. On most modern systems, these are installed in libc.a or libresolv.a . This was not true on SunOS which was not running NIS. To use the nameserver required relinking the applications which use gethostbyname and gethostbyaddr.

How DNS works?

BIND Clients

Informational

Setting Up a Nameserver

Named is started from one of the rc files run at boot time. In the case of HP-UX 10.XX it is from /etc/netbsdsrc using this command:
# /etc/named.boot is present and /etc/named is executable.
  if [ -x /etc/named -a -f /etc/named.boot ] ; then
    /etc/named && /bin/echo "named  \c"
This reads named.boot by default.

Zone Files and Zone Transfers

When you make changes to a domain: These make new data available on primary immediately and after refresh seconds on secondaries. Hangups to the secondary force rereads from primary.
Don't forget to update reverse zones as well.
Note that all the data for a zone are transferred at once.

Shell Level Interfaces and Tools