Red Hat Linux 7 Unleashed

Red Hat Linux 7 Unleashed

By William Ball

A Brief History of the Internet

To understand the Domain Name System, it is important to know a little about the history of the Internet and its precursor, ARPAnet.

The Internet began in the late 1960s as an experimental wide area computer network funded by the Department of Defense's Advanced Research Projects Agency (ARPA). This network, called ARPAnet, was intended to allow government scientists and engineers to share expensive computing resources. During this period, only government users and a handful of computers were ever connected to ARPAnet. It remained that way until the early 1980s.

In the early 1980s, two main developments led to the popularization of ARPAnet. The first was the development of the Transmission Control Protocol and the Internet Protocol (TCP/IP). TCP/IP standardized connectivity to ARPAnet for all computers. The second was U.C. Berkeley's version of UNIX, known as BSD, which was the first UNIX distribution to include TCP/IP as a networking layer. Because BSD was available to other universities at minimal cost, the number of computers connecting to ARPAnet soared.

All of a sudden, thousands of computers were connected to a network that had been designed to handle just a few computers. In many cases, these new computers were simultaneously connected to a university network and to ARPAnet. At this point, it was decided that the original ARPAnet would become the backbone of the entire network, which was called the Internet.

In 1988, the Defense Department decided the ARPAnet project had continued long enough and stopped funding it. The National Science Foundation (NSF) then supported the Internet until 1995, when private companies such as BBNPlanet, MCI, and Sprint took over the backbone.

Now millions of computers and millions of users are on the Internet, and the numbers keep rising.

The hosts.txt File

In the early days, when there were only a few hundred computers connected to ARPAnet, every computer had a file called hosts.txt. UNIX modified the name to /etc/hosts. This file contained all the information about every host on the network, including the name-to-address mapping. With so few computers, the file was small and could be maintained easily.

The maintenance of the hosts.txt file was the responsibility of SRI-NIC, located at the Stanford Research Institute in Menlo Park, California. When administrators wanted a change to the hosts.txt file, they emailed the request to SRI-NIC (Stanford Research Institute Network Information Center), which incorporated the request, once or twice a week. This meant that the administrators also had to periodically compare their hosts.txt file against the SRI-NIC hosts.txt file and, if the files were different, the administrators had to ftp a new copy of the file.

As the Internet started to grow, the idea of centrally administering hostnames and deploying the hosts.txt file became a major issue. Every time a new host was added, a change had to be made to the central version and every other host on ARPAnet had to get the new version of the file.

In the early 1980s, SRI-NIC called for the design of a distributed database to replace the hosts.txt file. The new system was known as the Domain Name System (DNS). ARPAnet switched to DNS in September 1984, and it has been the standard method for publishing and retrieving hostname information on the Internet ever since.

DNS is a distributed database built on a hierarchical domain structure that solves the inefficiencies inherent in a large monolithic file such as hosts.txt. Under DNS, every computer that connects to the Internet does so from an Internet domain. Each Internet domain has a nameserver that maintains a database of the hosts in its domain and handles requests for hostnames. When a domain becomes too large for a single point of management, subdomains can be delegated to reduce the administrative burden.

The /etc/hosts File

Although DNS is the primary means of name resolution, the /etc/hosts file is still found on most machines. It can help to speed up the IP address lookup of frequently requested addresses, such as the IP address of the local machine. Also, during boot time, machines need to know the mapping of some hostnames to IP addresses (for example, your NIS servers) before DNS can be referenced. The IP address-to-hostname mapping for these hosts is kept in the /etc/hosts file.

The following is a sample /etc/hosts file:

# IP Address    Hostname    Alias
127.0.0.1       localhost
192.168.100.7    vestax      www
192.168.100.8    mailhub     mailhub.domain.cxm
192.168.100.6    technics

The leftmost column is the IP address to be resolved. The next column is the hostname corresponding to that IP address. Any subsequent columns are aliases for that host. In the second line, for example, the address 192.168.100.7 is for the host vestax. Another name for vestax is www. The domain name is automatically appended to the hostname by the system. However, many people append it themselves for clarity (for example, http://www.domain.cxm).

At the very least, you need the entries for

In this example, localhost is the first line, followed by vestax, which is a WWW server. The machine mailhub is used by sendmail for mail transfers. Finally, there is technics, the name of the machine from which the /etc/hosts file came.

BIND 8

Most DNS implementations, including the one shipping with Red Hat Linux, use BIND, which stands for Berkeley Internet Name Domain. In the late 1990s, BIND underwent a major version change, from version 4.x.x to version 8.x.x. Red Hat Linux 7 ships with BIND version 8.2.2.

BIND version 8 represents a substantial improvement over its version 4 predecessors. There are several security improvements, including restriction of queries and/or zone transfers to and from specific IP addresses/subnets. Note that some of these security improvements existed in the latest of the version 4 series BIND implementations. Version 8 uses a new, easier boot file (named.conf) syntax. Version 4 and before used semicolons to comment out lines in the boot file. Version 8 doesn't tolerate semicolons as comments in the boot file, but it gives the administrator three excellent new choices:

/* C type comments for multi line comments */
// C++ comments are great for single line or partial line
# Shell type comments are familiar to Unix admins

The comment change brings up the fact that BIND 8 configuration files are absolutely incompatible with their BIND 4 predecessors. Although there are scripts to convert the configuration files, the quickest option is likely to be rewriting the files. Because BIND 8 configuration files are more straightforward than BIND 4, this rewrite should be a fairly simple task for all but the most complex setups.

By default, BIND 8 has the DNS boot file /etc/named.conf. Version 4 implementations default to the boot file /etc/named.boot. Red Hat 7 comes with an /etc/named.boot file, but that file has no effect on any system set up with the DNS that ships with Red Hat 7.

BIND 8 has hostname checking, which might break with naming conventions accepted by older BIND versions. If you encounter this problem when converting to BIND 8, you can temporarily turn hostname checking off with the following three lines in the options section of named.conf:

check -names master ignore;
check -names slave ignore;
check -names response ignore;

Because BIND 8 comes with Red Hat Linux 7, and because it's easier and more secure, BIND 8 is covered exclusively in this chapter.

Share ThisShare This

Informit Network