Figure 16-1 illustrates the dotted decimal format of domain names.
Figure 16-1 DNS Name Format
The DNS namespace is hierarchical. Moving from the right to the left:
• The name becomes more specific.
• Names on the left are contained within or are a part of the name to the right.
For example, the example domain is part of the .com top-level domain (TLD). The example domain is also more specific than .com by itself, just as a street name is more specific than a city, and a street number is more specific than a street name.
It is possible for example domains to exist—one within .com ( example.com), another within .net ( example.net), another within .org ( example.org), etc. Each of these example domains is unique because each is contained in a different TLD—just like there can be different (and unique) “Elm Streets” in different cities.
The names to the left, games and cinnamon, are subdomains.
There can be, in theory, an infinite number of levels in DNS, but most domains have only three or four levels, including the TLD, domain, subdomains, and service.
Domain names can be confusing because they represent one of three different things.
Domain Names Can Represent an Organization
Almost every company worldwide has a domain name it uses for its website and email addresses. Hence, a domain name can represent an organization. Subdomains, likewise, can represent a part of an organization.
Domain Names Can Represent a Service
A domain name can represent a service; for instance:
• Google.com is a search engine; books.google.com is a search engine specializing in books.
• Amazon.com began by specializing in books; read.amazon.com is a subdomain for reading digital books supplied by Amazon.
Sometimes the farthest left part of a domain explicitly calls out a service, such as
• www.example.com is a web service.
• mail.example.com is a mail service.
• ftp.example.com is an FTP service.
The three services in the preceding example might run on the same host, or they might each run on a completely different host. When no service is included in the domain name, a host can assume each service should be contacted on their well-known port numbers.
Note
Chapter 2, “Addresses, ” explains well-known port numbers.
Domain Names Can Represent a Piece of Information A domain name can represent a piece of information, like
• A cryptographic key
• Where to get a cryptographic key
• An IP address to domain name mapping (the reverse of the domain name to IP address mapping)
• An alias, or CNAME, pointing to another domain name Domain Names and Addresses from a Computer Networking Perspective
It is easy to be confused about what domain names and IP addresses represent; a little review might be helpful.
From a computer networking perspective, an IP address might represent
• An IP address can be assigned to an interface.
• An IP address can represent a host, a service (in the case of anycast), or a group of receivers.
Unlike an IP address, a domain name might represent
• A single host.
• A service, like a web server.
• A group of hosts.
• A group of hosts running a given service, like a web server.
• A piece of information.
• A pointer to some other domain name (an alias or CNAME). There is some overlap in what an IP address and a domain name can represent, but domain names and IP addresses are not equivalent. Even though domain names can (often) be translated to IP addresses, and IP addresses can (sometimes) be translated to domain names, they do not always represent the same thing.