The History of /etc/hosts

Historically, systems on the Internet used the file HOSTS.TXT to propagate host IP addresses and name information. This is a plain text file that is searched from beginning to end for each forward lookup (a name is provided and an IP address is returned) or an inverse lookup (an IP address is provided and a name is returned). The file format for HOSTS.TXT and /etc/hosts is given in Figure 2-1.

Figure 2-1. The format of /etc/hosts.

The fields are delimited by white space. Field 1 is the IP address. Field 2 is the formal name of the system. Additional fields (up to the comment character #) are alias names for this device. An optional comment is allowed after the # sign.

ip_address   name   alias_names # comment
15.24.44.65  yoda   hubvwa      # hp840 box
15.24.47.253 router router_if_1 # local side
15.24.53.253 router router_if_2 # remote side

HOSTS.TXT had to be kept up to date, so a single site updated it with information provided by the Internet’s many hostmasters, and it was downloaded on a daily basis by all systems that used it. This is how the HOSTS.TXT file was kept consistent across the Internet. The HOSTS.TXT file grew to several megabytes and the amount of download traffic it generated became problematic. In short, HOSTS.TXT proved not to be a scalable solution.

Creativity became stifled because every host name on the Internet had to be uniquely named.

If a few sites did not faithfully update HOSTS.TXT, they would often suffer connectivity problems with sites that had recently updated or changed some of their IP addresses. Even a single error could render some systems or entire subnets unreachable.

The HOSTS.TXT mechanism provided little else in the way of information. For example, to send e-mail to a system not connected directly to the Internet, the sender needed to know the mail systems in the path and make them part of the e-mail address.

To sum up, the Internet needed a name service that would:

  • Reduce network traffic

  • Delegate authority of information

  • Improve update propagation time

  • Be a true standard

  • Provide additional fields such as mail exchange records

  • Offer high reliability

  • Scale very well

Enter DNS/BIND (Domain Name Service/Berkeley Internet Nameserver Daemon). It meets every one of the above requirements, especially the scaling requirement, very well. DNS scales to the size of the Internet and is absolutely necessary for web applications to work.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.165.226