Recent Changes - Search:

Distributed Computing

This website demonstrates using wikis as teaching and learning tool.

The course instructor is also happy to share the teaching materials here with those who find it readable.

Tutorial - Domain Name System

A Distributed Computing Tutorial by Steven Choy

Reading: Introduction to DNS

IP addresses are used to enable computers and routers to identify each other efficiently. However, the human mind is not designed to remember IP addresses. People prefer to work with names rather than numbers. The Domain Name System (DNS) is such a system that supports the best of both worlds of humans and machines.

Roughly and simply speaking, as you may also be told by some people, the DNS is nothing more than a system that stores pairs of IP addresses and names, so that when you request a website by name it can send you directly to the correct address. However, that statement cannot give you the whole picture of the DNS. You need to learn more in order to appreciate the concept and the implementation of the DNS.

In this tutorial, you are going to study the ins and outs of the DNS. You are going to learn that the DNS is a hierarchical system — a globally distributed system — that is highly scalable and reliable. After this section, you should know the why and how of those buzzwords.

The DNS contains three important components. They are:

  1. a name space, which defines and standardizes the structure of names,
  2. name servers, which make the name space available to the public, and
  3. a resolver, which will query the name servers about the name space.

The DNS is a hierarchical system. DNS organizes all registered names in a tree structure. The hierarchical naming scheme used by the DNS is known as the domain name space.

Class Discussions

  • Main Question
Why does DNS use a hierarchical structure instead of some other structure?
  • Questions
What is the main disadvantage of a flat name space?
What is the main advantage of a hierarchical name space over a flat name space?
What are FQDN and PQDN? Give an example for each one.
Why it is not a good idea to have a single powerful computer store all the information contained in the domain name space?
Describe the current way that the Internet uses to store all the information contained in the domain name space.
What are a root name server, a primary name server and a secondary name server? Can you differentiate them clearly?

Reading: DNS Concepts and Design

Here come some key points about the concepts and the design of DNS. I hope it can supplement what you have understood.

  • In the design of DNS, the name space needs to be made hierarchical rather than a flat structure in order to make naming of machines scalable. The idea of hierarchical name space is to divide the naming into several parts. The naming can be based on the location of the machine, and then on the nature of the organizations, and then on the unit name within the selected area. That idea is quite similar to what we humans have done in addressing a real world location.
  • The domain names can be mapped to a tree structure like the figure shown below. There is no restriction to the number of child nodes at each parent node. However, DNS requires that child nodes of a parent node have different labels. In this way, the uniqueness of the domain names is guaranteed. For example, we cannot have two child nodes named the same, say ‘ouhk’, under the parent node ‘.edu.hk’. We can, however, have one child node named ‘ouhk’ under the parent node ‘.edu.hk’ and another child node also named ‘ouhk’ under the parent node ‘.com.hk’.
  • In the design of domain name space, a domain is a namespace. If you think the concept of namespaces is too abstract to you, think about the following examples. Everything below .hk is in the hk domain. Everything below .com.hk is in the com.hk domain and in the hk domain.
  • The information contained in the domain name space is stored in a hierarchy of servers based on the structure of the name space. Those servers are called DNS name servers. Each name server maintains just one piece of the overall hierarchy.
  • While domains are namespaces, zones, which are subdivisions of a domain, are administrative spaces in which zone administrators are responsible for just a portion of a domain. Therefore, it is possible that a name server does not store all the information about a domain. Instead, it stores the information about a zone and delegates part of its authority to other servers.

Reading: Implementation of DNS in the Internet

The DNS is implemented as a distributed system. The DNS requires a coordinated effort among many computers called DNS servers to store and maintain a huge list of registered domain names and their corresponding IP addresses. Each DNS server maintains just one piece of the overall DNS hierarchy (one level of the hierarchy and then only a zone with that level).

DNS is designed as a client-server application. DNS servers respond to requests from DNS clients. DNS clients are called resolvers as they access the closest DNS server with a request for name-address resolution. DNS servers eventually return the requested resolution (either address-to-name or name-to-address) to the resolver.

Please note that the process by which a DNS client maps a hostname to an IP address is called name-address resolution or resolution for short.

We need some kind of protocol for communication between DNS clients and servers. To be brief, there are only two types of DNS messages — query and response. The query message, which consists of a header and a question section, is sent from a client to a server. The response message is then sent from the server to the client, and consists of a header, a question section, an answer section, and two other sections containing additional information about the resolution.

Class Discussions

The following reading describes all the details about DNS in the Internet. These include: ‧ the domain on the top level of the DNS hierarchy, ‧ the general mechanism of the name-address resolution, and ‧ the DNS protocol and the format of DNS messages.

Questions

1 The domain name space in the Internet is divided into three different sections. What are they? 2 Give any five first-level labels in the generic domains. 3 What does a resolver do? 4 What is a PTR query? 5 What is the difference between recursive resolution and iterative resolution? 6 Give the five components in a DNS response message.

Reading: More

The following suggests two good resources for you to learn more about the actual implementation of DNS in the Internet. To recap what DNS is, it is a system that stores information about hostnames and domain names in a type of distributed database in the Internet.

In this website, you can learn more about the top-level domains in the Internet. As of 7 September 2005, there were a total of 261 registered top-level domains. The information about these top-level domains is maintained by a set of 13 servers called root name servers. These name servers, which are uniquely named A.ROOT-SERVERS.NET, B.ROOT-SERVERS.NET to M.ROOT-SERVERS.NET, are maintained by various independent agencies. Ten of these servers reside in the United States, one in Japan, one in London, and one in Sweden. (Reference: http://www.internic.net/zones/named.root)
This is an interesting site for you to visualize much of the knowledge you have learned in this course. Specific to this section, please go to DNS Lookup and try to input a hostname of a website (e.g. www.ouhk.edu.hk). It will then show you all the results and details about the DNS query, which include answer records, authority records, and additional records.

The following details some important information that you can get by making use the DNS Lookup service provided by the InternetFrog.com. If you like, you can go to the website now, do it yourself one time, scan the results, then come back to read the following explanation.

First of all, click the ‘DNS/IP Lookup’ link. It is on the menu bar on the left hand side. Then, input ‘plbpc013.ouhk.edu.hk’ as the domain name, select ‘advanced output’, and leave all the other inputs to their default vales. After that, click the ‘GO’ button and wait for the result.

The figure below shows you one set of results. Please note that the results returned may be different for each DNS query. Try to press the ‘GO’ button several times to experiment with this.

Note 1: The machine k.root-servers.net (IP: 193.0.14.129) is one of the root name server.

Note 2: The machine ns3.cuhk.edu.hk (IP: 202.45.188.19) is one of the name servers that stores the information about the domain .hk. (Source: http://www.iana.org/root-whois/hk.htm)

Note 3: The machine NS1.ouhk.edu.hk (IP: 202.40.157.167) is one of the name servers that stores the information about the domain .edu.hk.

Note 4: This indicates the hostname for which we want to know its IP address

Note 5: This says that the IP address of the hostname ‘plbpc013.ouhk.edu.hk’ is 202.40.219.247.

Note 6: These are three authoritative name servers for the query of hostname ‘plbpc013.ouhk.edu.hk’.

Knowing all the ins and outs of the DNS implementation in the Internet, one may still puzzle about who initiates a DNS query — the browser or the PC one is using, since it is obvious that the browser is the first one who knows the hostname to be queried. Briefly speaking, it is not your browser or your PC that does the DNS query directly. Your PC will connect to the nearest DNS server and ask it to act as the DNS resolver. If you want to know the information about that DNS server, type the following command using the DOS Command Prompt of the Windows Operating System: Ipconfig /all The diagram in next page illustrates the interaction between a DNS client and a DNS server starting from a client machine. First, the client will contact its configured DNS server and ask for a domain name to be resolved. Since the client’s DNS server is not authoritative for the domain, it then through recursive queries via the Internet root DNS servers contacts the primary DNS server for the domain. The client’s DNS server then gets an answer for the query. That successful query is then passed back to the client. The following activity is one more step for you to visualize what you have learned in this section. Do your best to complete it and share what you get with your course-mates and tutor in the online discussion board.

Activities

By making use of the two suggested websites, find several paths that lead to a resolution of the hostname www.ouhk.edu.hk. After you complete this activity, you should also have some information about which name servers maintains information about the domain .hk, which are for .edu.hk, and which are for .ouhk.edu.hk.

Edit - History - Print - Recent Changes - Search
Page last modified on August 27, 2007, at 06:40 PM