What Is a Domain?


DNS is a hierarchic database. A good analog in computing is a tree data structure as used in programming. Similar to a tree data structure, DNS has a root node, edges, and leaf nodes. Because it's a database, it also has lookup keys and values found by these keys by traversing the tree structure.

If you examine a DNS name such as www.amazon.com, you'll see that all these parts are represented in the name. But first, it's important to realize that in reality the DNS name is www.amazon.com. (with the trailing period). The period is not normally typed, but it is there and is significant. It represents the root node of DNS. Just as in programming, you must know where the root node is because it cannot be found automatically. However, after you know where the root of the tree is, everything else can be found. The root is also called the root domain. It and each part of the domain name represent a domain, or subdomain, depending on how you look at it. To get between the nodes, which are nameserversedges are necessary, and DNS has edges. In fact, the contents of the DNS database are all edges.

In DNS, each server has a root.hints file that tells it where to look for rootservers (see Figure 1.1).

Figure 1.1. After a DNS server knows where the rootservers are, the rest is a given.

graphics/01fig01.gif

To find the address of a host such as www.amazon.com, your DNS asks the rootservers whether they know its address. They won't know it, but they'll help your DNS on its address. They won't know it, but they'll help your DNS on its way by telling it the address of the servers of the com TLD. This pointer represents an edge in the tree structure and points to the next DNS server your DNS needs to talk to. Again, your DNS asks for www.amazon.com, and again the server does not know it. But, it knows the address of the DNS server at amazon.com and tells it to your DNS, which means your DNS has found another edge, taking it to another node and another nameserver. And again, your DNS asks for the address of www.amazon.com. This time, however, because it has finally reached a nameserver that knows this address, the correct record is returned from the database.

The Importance of Caching

All the information gathered while finding the address of www.amazon.com is cached by your DNS so it does not need to ask again. The next time someone asks for the address of http://www.macmillanusa.com (Macmillan USA), it already knows the address of the com servers so it need not bother the rootservers again. This caching is another key to why DNS works. If the servers never cached the answers they got, the rootservers would be flooded, nay, devastated, by queries one for each domain name lookup done all over the Net. Instead, the local DNS servers need only to establish the server for each TLD and each subdomain that is requested once. So, instead of the load on the rootservers being linear with the number of queries performed on the Net, the load becomes drastically smaller. The caching reduces the load on the root and TLD servers from an amount under which they could not function at all to one under which they can quickly and competently perform their work. The first server setup we will look at is a caching-only nameserver, meaning it performs only caching and is not a server of any particular domains.

Subdomains

Domain names, then, are stacked up you can have domain within domain within domain, ad nauseum. You might have noticed that in some places they are not stacked any deeper than the typical com case. In the United Kingdom, however, several national subdomains exist, such as co.uk for commercial enterprises and ac.uk for academic endeavors. The Amazon site in the U.K., therefore, is called http://www.amazon.co.uk.

The distinction between a domain and a subdomain is not fixed. A domain any domain might have a subdomain, but it also is a subdomain of another domain, possibly a TLD. So, amazon.com is a subdomain of the com domain, and the com domain is a subdomain of the root domain.



The Concise Guide to DNS and BIND
The Concise Guide to DNS and BIND
ISBN: 0789722739
EAN: 2147483647
Year: 1999
Pages: 183

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net