CIT 361: Week 7
DNS in Depth
To automatically receive new feeds and podcasts you can copy this link: http://cot.gbcnv.edu/~ed/class/cit361/cit361.xml to your RSS reader and/or your iTunes/mp3 software. If you prefer getting the new feeds and podcasts manually you can read these files directly as you are reading this one or download the audio mp3 file which constitutes the podcast and listen to it using your favorite media software, such as Windows Media Player. Please note, iTunes is available free from Apple and can be used on your PC or Mac even if you do not have an iPod.
As all of you know by now, the Internet accesses websites by IP address number and not by name. This is somewhat analogous to dropping a letter in a mail box somewhere in the world that is simply addressed to "Ed Nickel" which, of course would never get to me. However, if you include the address and zip code for my office at GBC I would get it. So, "cot.gbcnv.edu" somehow needs to be translated into 188.8.131.52 for you to access the GBC, COT Department's web server. This is the job of DNS, domain name service.
Although there have been a number of diagrams in each chapter showing how various protocols establish their connections and communicate from client to server and back, so far we have not gone into detail about how any of these transactions take place. I have been saving that for this chapter because I have found most students understand it better here since DNS is basically already familiar to them. Let us start with a hypothetical situation where you are trying to access the COT web server from home and use Frontier Communications as your ISP, Internet service provider. The first step in a DNS look up starts when you tell your web browser to find and utilize the uniform resource indentifier usually called the URI by its name "http://cot.gbcnv.edu/~ed/class/syllabi.html" so you can use it.
Before we go any farther, let us review the components of this URI to be sure we are all clear about which parts do what. The first part of a URI specifies the service to use when accessing a particular resource, for example: http:// (hypertext transfer protocol), ftp:// (file transfer protocol), tel:// (telnet to access software on a remote computer), or file:// to access a file on the local computer. Next is the host computer's name which in this case it is "cot" but in web browsing it is often a server named "www". The next two parts together make up to domain name with "gbcnv" being the secondary level domain and "edu" the top level domain. The domain name is followed by the specific folder and file to be accessed on that server, which in this case is from the home folder of the account named "ed", folder called "class", and file named "syllabi.html" although the account name does not always show. When no file name is specified there is usually a default file name such as index.html, index.php, or default.htm which will be displayed.
The only parts of the URI this chapter deals with are cot.gbcnv.edu, the host and domain names. Since this hypothetical situation has a user accessing the Internet via "frontiernet.net" their computer will first check the internal ARP table and then if present its "hosts" file to see if it can resolve the name to its IP address. Since very few computers use a hosts file and the ARP table is only useful if the user has accessed that specific host and domain name combination very recently, the computer then initiates a DNS request.
|Illustration of a recursive DNS IP address look up|
where steps 3 & 4, 5 & 6, and 7 & 8 represent the recursion,
all of which are skipped if current DNS data is cached on the first DNS server,
represented by the Frontiernet.net DNS server.
As you can tell, there is a lot of traffic going back and forth between various DNS servers just to find the address for a particular URI, in fact, there could be even more traffic if a domain were further divided into various sub-domains. If every address request outside of a TLD had to go through the top level domain DNS servers then these servers would have to handle billions of requests per hour. Fortunately considerable work over the years has been done to make DNS more efficient. Most DNS servers are now caching servers in addition to being authoritative or replicating servers for their own secondary domain. A caching DNS server automatically adds new non-authoritative entries to its DNS table each time it looks up a new address. These cached entries are kept until the time-to-live for the entry expires as specified by the authoritative DNS server for that host, usually two to four weeks. If I request data using my home computer from the COT web server every day then Frontier's DNS server will normally use the entry in its cache table and only check the IP address within the gbcnv domain's DNS server once every few weeks to make sure it is still valid. Of course that cached entry can be used by any of my students who also use Frontier Communications as their ISP.
One brief addition to the information given at the top of page 314, there are several new generic top level domain names in addition to .com, .edu, .mil, .net, and .gov which include .aero, .biz, .coop, .info, .museum, .name, and .pro among others. For a complete and current list of the TLD names go to the iana.org Root Zone Database. This includes about 200 two character country codes such as .us for the United States, .fm for Federated States of Micronesia often used by FM radio stations, .tv for Tuvalu which is popular among TV stations, and many others. In addition, the ICANN Board approved a new policy in the summer of 2008 allowing companies to register their trademarks as TLDs although I am not aware of any brand names being registered as TLDs yet.
As usual, this chapter also includes a thorough dissection of the DNS data packets as well as information about nslookup a useful diagnostic utility for DNS. Unfortunately, there is no mention of the Linux and UNIX "dig" utility for DNS which tells you more about a particular domain name than I suspect most of you knew could be so easily discovered. I suggest you try nslookup using some of the examples in the book.
As always, post your comments, ideas, and questions in the current discussion. Next week will be the mid-term exam and there will be no new lesson to allow you plenty of time to prepare for the exam. The exam will consist of true/false and multiple choice questions covering chapters 1-7, the handouts, my comments on this material, and possibly some of yours from the discussion posts.
This will be an open book and notes exam with a two hour time limit. Let me give you a few pointers on taking an open book test. Many students think instructors make open book tests harder but this is not usually true. I have found when students know a test is open book they do not study before hand and then try to look up every question to find the answer resulting in insufficient time to complete the test. So follow these simple rules and you can probably pass any test (open book or not) with a good grade: