M.I.T. DEPARTMENT OF EECS

6.033 - Computer System Engineering Handout 28 - April 12, 2000

Hands-on #6 Solutions: DNS

I. Getting started

What is the IP address of ginger.lcs.mit.edu? What command did you use to find this address? What is the time to live for this record?

; <<>> DiG 8.1 <<>> ginger.lcs.mit.edu 
;; res options: init recurs defnam dnsrch
;; got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 6
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 4, ADDITIONAL: 4
;; QUERY SECTION:
;;	ginger.lcs.mit.edu, type = A, class = IN

;; ANSWER SECTION:
ginger.lcs.mit.edu.	26m42s IN A	18.26.0.82

[output truncated]

II. Understanding hierarchy

For this problem, you will go through the steps of resolving a particular hostname, by iterating through a series of servers, just like a regular server might. Assuming it knows nothing else about a name, a DNS resolver will ask a known root server (rendezvous point). The root servers on the Internet are in the domain root-servers.net, some of which are included in the list from the response above.

Use dig to ask one of these servers the address of redlab.lcs.mit.edu without recursion. What command do you use to do this? It is unlikely that these servers actually know the answer so they will refer you to host (or list of hosts) that might know more.

Go through the hierarchy without recursion and following the referals manually until you have found the address of the machine. What is the address? Display the output of the final command. How many iterations did it take? What commands did you use for each one?

III. Understanding caching

These few queries should show you how your local machine's cache works.

Ask your default server for information, without recursion, about the host www.dmoz.org. What command did you use? Does it have the answer in its cache? How do you know? How long did this query take? If this information was cached, please find some other host name that is not cached and do this section with that other host.

Now, ask your default this same query but use recursion. It should return an answer for you. How long did this take?

Finally, ask your default server again without recursion. How long does this request take? Has the cache served its purpose?

Watch the TTL decrement on the cache by repeating the previous step. If you wait long enough, you can watch it return to the original state and then you can repeat this cycle. A good host to play with for this might be ad.doubleclick.net. If you look at this, do you notice anything else interesting about the responses that you get back?


Go to 6.033 Home Page Questions or Comments: 6.033-tas@mit.edu