UNIX System Administration Handbook - Evi Nemeth [238]
In the real world and elsewhere in this book, you will see the terms DNS and BIND used interchangeably. However, in this chapter we attempt (perhaps unsuccessfully) to preserve the distinction between them.
The DNS namespace is a tree of “domains.” Each domain represents a distinct chunk of the namespace and is loosely managed by a single administrative entity. The root of the tree is called “.” or dot, and beneath it are the top-level (or root-level) domains. The top-level domains have been relatively fixed in the past, but ICANN3
has been considering the creation of some new ones.
One branch of the naming tree maps hostnames to IP addresses, and a second branch maps IP addresses back to hostnames. The former branch is called the “forward mapping,” and the BIND data files associated with it are called “forward zone files.” The address-to-hostname branch is the “reverse mapping,” and its data files are called “reverse zone files.”
For historical reasons, two sorts of top-level domain names are in current use. In the United States, top-level domains originally described organizational and political structure and were given three-letter names such as com and edu. Some of these domains (primarily com, org, and net) are used outside the United States as well; they are called the generic top-level domains or gTLDs for short.
Table 16.2 lists the most important gTLDs along with their original purposes. Once good names in the com domain became scarce, the registries began to offer names in org and net without regard to those domains’ original restrictions.
Table 16.2 Generic top-level domains
For most domains outside the United States, two-letter ISO country codes are used; they are called ccTLDs. Both the geographical and the organizational TLDs coexist within the same global namespace. Table 16.3 shows some common country codes.
Table 16.3 Common country codes
Some countries outside the United States build an organizational hierarchy with second-level domains. Naming conventions vary. For example, an academic institution might be an edu in the United States and an ac.jp in Japan.
The top-level domain “us” is also sometimes used in the United States, primarily with locality domains; for example, bvsd.k12.co.us, the Boulder Valley School District in Colorado. The “us” domain is never combined with an organizational domain—there is no “edu.us” (yet). The advantage of “us” domain names is that they are free or inexpensive to register; see www.nic.us for more details.
Domain mercenaries have in some cases bought an entire country’s namespace. For example, the domain for Moldovia, “md”, is now being marketed to doctors and residents of the state of Maryland (MD) in the United States. Another example is Tuvalu, for which the country code is “tv”. The first such sale was Tonga (“to”), the most active is currently Niue (“nu”), and perhaps the most attractive is “tm” from Turkmenistan. These deals have sometimes been fair to the country with the desirable two-letter code and sometimes not.
Domain squatting is also widely practiced: folks register names they think will be requested in the future and then resell them to the businesses whose names they have snitched. Years ago, all the Colorado ski areas were registered to the same individual, who made quite a bit of money reselling them to individual ski areas as they became web-aware. The going rate for a good name in the com domain is between several thousand and a few million dollars—business.com sold recently for $3.5M. We were offered $50,000 for the name admin.com, which we obtained years ago when sysadmin.com had already been taken by /Sys/Admin magazine.
Domain names are case insensitive. “Colorado” is the same as “colorado”, which is the same as “COLORADO” as far as DNS is concerned. Current DNS implementations must ignore case when making comparisons, but propagate case when it is supplied. In the past it was common to use