From our other tutorial of “The Structure of IP Address”, we know that every computer (node) that connect with the Internet has an unique network address. We usually called this unique network address the IP Address.

When your computer connect with the Internet, your computer will also assign an unique IP address.

Basic Concept of Networking

This is very important to understand that all computers on the Internet are communicating with each other by IP addresses, as shown in the diagram below:

However human being would like to use name (domain name) rather than number (IP address). This is much more friendly and much easier to remember. Therefore we will use names to represent the computers on the Internet as shown in the following diagram.

Isn’t it much more friendly and much easier to remember?

Networking Solution in Early stage of Internet

From above, we know that the following problems must be solved:

  • Human being would like to use name to call computers on the Internet.
  • Computers themselves need to use IP Addresses to communicate with each others.

In the very early stage of Internet, there were only about 100 computers connected with the Internet, the problems above can be solved very easily.

The solution was: The Standard Research Institue Network Information Center (SRI – NIC) was responsible to maintain and update a text file (HOSTS.txt) . The content of the HOSTS.txt was something like that:

YourDomain.com192.110.6.11
MyDomain.com150.20.15.10
ABC.com212.69.204.1
MyGreatName.com212.69.204.148
…………………………………………..
…………………………………………..
…………………………………………..

All computers connected with the Internet had a copy of HOSTS.txt.

If you needed to communicate with a computer on the Internet (e.g. MyGreatName.com), you could check with the HOSTS.txt file to find out the IP Address (212.69.204.148) of MyGreatName.com. Once you got the IP Address of MyGreatName.com, your computer could commnicate with MyGreatName.com.

All new computers added to the Internet or any changes must inform SRI-NIC. And SRI-NIC would update the contents of HOSTS.txt a few times every week. This will ensure the accuracy and validation of the HOSTS.txt file.

Then the administrator of each computer on the Internet will use FTP to connect with the computer of SRI-NIC to download the latest version of the HOSTS.txt file. This could ensure that all administrators were using the updated HOSTS.txt.

Basic Concept of DNS

When the computers (hosts) on the Internet is getting more and more, and thus the growing list of HOSTS.txt. The solutions used in the early stage of Internet was not more suitable.

In view of this, Paul Mockapertris design designed a system to manage the domain names on the Internet. The system is called Domain Name System, or DNS in short, in 1984.

The working principle of DNS is not difficult to understand, as shown below:

Working Procedures of DNS:

  1. The information (mainly domain names and their corresponding IP Addresses) of hosts (computers) on the Internet is saved in the Domain Name Servers. The Domain Name Servers are distributed widely on the Internet.
  2. When your computer need to connect with a host on the Internet (e.g. MyGreatName.com), you only need to enter the Domain Name (e.g. MyGreatName.com) in the URL of browser. Your computer will then contact the configured or default Name Servers (usually your ISP Name Server), asking for the IP Address of the host (e.g MyGreatName.com).
  3. The Name Server will then tell your computer the IP Address of the query host.
  4. Once your computer get the IP Address of the host, your computer can then communicate with the host.

From the above working procedures of DNS, you should notice that there are a lot of disadvantages. For example:

  • Each Name Server have to save the information of ALL hosts on the Internet.
  • If a Name Server forget to update the information, many new domain names will not be found!
  • To guarantee that all new domains are activated on the Internet, the information of all Name Servers must be updated. This may take 2 – 3 months!
  • How to guarantee that all Name Servers are updated on schedule?

The above procedures only show the basic concept of DNS. We will discuss the actual working model of DNS in next section.

Actual Working Procedures of DNS

Actually, the DNS working system is a bit more complicated than the system we discussed before. However the working principle is the same. It can also solve the problems we discussed in previous section.

Actual working system of DNS:

Working Procedures of DNS:

1. When your computer need to connect with a host on the Internet (e.g. MyGreatName.com), you only need to enter the Domain Name (e.g. MyGreatName.com) in the URL of browser. Your computer will then contact the configured or default Name Servers (usually your ISP Name Server), asking for the IP Address of the host (e.g MyGreatName.com).

2. If your ISP Name Server has the information of the IP Address of the query host, it will tell your computer immediately.

3. Assume that your ISP Name Server do not have the information of MyGreatName.com. Your ISP Name Server will ask the DNS Root Name Server immediately the Name Server that has the information of MyGreatName.com.

STOP! You may ask: “How can your ISP Name Server knows the Root Name Server? Which Root Name Server to ask?”

Actually all Name Servers will download and install a file from the FTP server of interNIC. The file is called “named.cache” or “named.root”. This file has the IP Addresses of ALL Root Name Servers.

Here’s the file of “named.cache” as in May, 2005:

; This file holds the information on root name servers 
; needed to initialize cache of Internet domain name 
; servers (e.g. reference this file in the 
; "cache  .  " configuration file of BIND domain 
: name servers).
;
; This file is made available by InterNIC registration 
; services under anonymous FTP as
;     file             /domain/named.root
;     on server        FTP.RS.INTERNIC.NET
; -OR- under Gopher at RS.INTERNIC.NET
;     under menu     InterNIC Registration Services (NSI)
;        submenu     InterNIC Registration Archives
;     file           named.root
;
; last update:    Aug 22, 1997
; related version of root zone:   1997082200
;
;
; formerly NS.INTERNIC.NET
;
.                     3600000 IN  NS  A.ROOT-SERVERS.NET.
A.ROOT-SERVERS.NET.   3600000     A   198.41.0.4
;
; formerly NS1.ISI.EDU
;
.                     3600000     NS  B.ROOT-SERVERS.NET.
B.ROOT-SERVERS.NET.   3600000     A   128.9.0.107
;
; formerly C.PSI.NET
;
.                     3600000     NS  C.ROOT-SERVERS.NET.
C.ROOT-SERVERS.NET.   3600000     A   192.33.4.12
;
; formerly TERP.UMD.EDU
;
.                     3600000     NS  D.ROOT-SERVERS.NET.
D.ROOT-SERVERS.NET.   3600000     A   128.8.10.90
;
; formerly NS.NASA.GOV
;
.                     3600000     NS  E.ROOT-SERVERS.NET.
E.ROOT-SERVERS.NET.   3600000     A   192.203.230.10
;
; formerly NS.ISC.ORG
;
.                     3600000     NS  F.ROOT-SERVERS.NET.
F.ROOT-SERVERS.NET.   3600000     A   192.5.5.241
;
; formerly NS.NIC.DDN.MIL
;
.                     3600000     NS  G.ROOT-SERVERS.NET.
G.ROOT-SERVERS.NET.   3600000     A   192.112.36.4
;
; formerly AOS.ARL.ARMY.MIL
;
.                     3600000     NS  H.ROOT-SERVERS.NET.
H.ROOT-SERVERS.NET.   3600000     A   128.63.2.53
;
; formerly NIC.NORDU.NET
;
.                     3600000     NS  I.ROOT-SERVERS.NET.
I.ROOT-SERVERS.NET.   3600000     A   192.36.148.17
;
; temporarily housed at NSI (InterNIC)
;
.                     3600000     NS  J.ROOT-SERVERS.NET.
J.ROOT-SERVERS.NET.   3600000     A   198.41.0.10
;
; housed in LINX, operated by RIPE NCC
;
.                     3600000     NS  K.ROOT-SERVERS.NET.
K.ROOT-SERVERS.NET.   3600000     A   193.0.14.129
;
; temporarily housed at ISI (IANA)
;
.                     3600000     NS  L.ROOT-SERVERS.NET.
L.ROOT-SERVERS.NET.   3600000     A   198.32.64.12
;
; housed in Japan, operated by WIDE
;
.                     3600000     NS  M.ROOT-SERVERS.NET.
M.ROOT-SERVERS.NET.   3600000     A   202.12.27.33
; End of File

From the above named.cache file, we know that there are 13 Root Name Servers on the Internet (A.ROOT-SERVERS.NET., B.ROOT-SERVERS.NET., …., M.ROOT-SERVERS.NET.). The Root Name Servers are distributed around the world.

Root Name Servers have all of information of Autoritative Domain Name Servers for the top level domain names (for example: .com, .org, .net, .com.hk, etc ..)

4. When your ISP Name Server do not have the IP address information of MyGreatName.com, it will check the named.cache file and ask for help from the Root NameServer. If the first Root Name Server is out of order or do not have response, your ISP Name Server will ask the second Root Name server.

5. Root Name Server will then tell your ISP Name Server the authoritative Name Server of MyGreatName.com are 212.69.192.10 (Primary Name Server) and 212.69.192.11 (Secondary Name Server).

Now you should know that why you need to submit information of two Name Servers when register new domain names.

6. Your ISP Name Server now has the IP Address of the Authoritative Name Server of MyGreatName.com. Your ISP Name Server will then contact the Authoritative Name Server of MyGreatName.com (212.69.192.10). The Authoritative Name Server of MyGreatName.com will then check and confirm the information of MyGreatName.com. It then tell the IP Address of MyGreatName.com (212.69.204.148) to your ISP.

7. Your ISP Name Server now has the IP Address of MyGreatName.com, it will tell your computer immediately.

8. Once your computer get the IP Address of MyGreatName.com, your computer can then communicate with MyGreatName.com.

From the working procedures of DNS, you should notice that:

  • The Root Name Servers on the Internet play a very important role in DNS.
  • There are a lot of Name servers located around the world.
  • All Name Servers on the Internet have the information of all Root Name Servers. If the first Root Name Server has no response, the second Root Name Server will be contacted …….