How Domain Name System (DNS) Works
Part 4: 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 Chapter.
Actual working system of DNS:
Working Procedures of DNS:
- 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).
- If your ISP Name Server has the information of the IP Address of the query host, it will tell your computer immediately.
- 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 22.214.171.124 ; ; formerly NS1.ISI.EDU ; . 3600000 NS B.ROOT-SERVERS.NET. B.ROOT-SERVERS.NET. 3600000 A 126.96.36.199 ; ; formerly C.PSI.NET ; . 3600000 NS C.ROOT-SERVERS.NET. C.ROOT-SERVERS.NET. 3600000 A 188.8.131.52 ; ; formerly TERP.UMD.EDU ; . 3600000 NS D.ROOT-SERVERS.NET. D.ROOT-SERVERS.NET. 3600000 A 184.108.40.206 ; ; formerly NS.NASA.GOV ; . 3600000 NS E.ROOT-SERVERS.NET. E.ROOT-SERVERS.NET. 3600000 A 220.127.116.11 ; ; formerly NS.ISC.ORG ; . 3600000 NS F.ROOT-SERVERS.NET. F.ROOT-SERVERS.NET. 3600000 A 18.104.22.168 ; ; formerly NS.NIC.DDN.MIL ; . 3600000 NS G.ROOT-SERVERS.NET. G.ROOT-SERVERS.NET. 3600000 A 22.214.171.124 ; ; formerly AOS.ARL.ARMY.MIL ; . 3600000 NS H.ROOT-SERVERS.NET. H.ROOT-SERVERS.NET. 3600000 A 126.96.36.199 ; ; formerly NIC.NORDU.NET ; . 3600000 NS I.ROOT-SERVERS.NET. I.ROOT-SERVERS.NET. 3600000 A 188.8.131.52 ; ; temporarily housed at NSI (InterNIC) ; . 3600000 NS J.ROOT-SERVERS.NET. J.ROOT-SERVERS.NET. 3600000 A 184.108.40.206 ; ; housed in LINX, operated by RIPE NCC ; . 3600000 NS K.ROOT-SERVERS.NET. K.ROOT-SERVERS.NET. 3600000 A 220.127.116.11 ; ; temporarily housed at ISI (IANA) ; . 3600000 NS L.ROOT-SERVERS.NET. L.ROOT-SERVERS.NET. 3600000 A 18.104.22.168 ; ; housed in Japan, operated by WIDE ; . 3600000 NS M.ROOT-SERVERS.NET. M.ROOT-SERVERS.NET. 3600000 A 22.214.171.124 ; 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 ..)
- 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.
- Root Name Server will then tell your ISP Name Server the authoritative Name Server of MyGreatName.com are
126.96.36.199 (Primary Name Server) and 188.8.131.52 (Secondary Name Server).
Now you should know that why you need to submit information of two Name Servers when register new domain names.
- 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 (184.108.40.206). 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 (220.127.116.11) to your ISP.
- Your ISP Name Server now has the IP Address of MyGreatName.com, it will tell your computer immediately.
- 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 .......