M.I.T. DEPARTMENT OF EECS
6.033 - Computer System Engineering | Handout 28 - April 12, 2000 |
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]
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 redlab.lcs.mit.edu
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?
- dig @a.root-servers.net +norecurse redlab.lcs.mit.edu
; <<>> DiG 8.1 <<>> @a.root-servers.net +norecurse redlab.lcs.mit.edu ; (1 server found) ;; res options: init defnam dnsrch ;; got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 10 ;; flags: qr; QUERY: 1, ANSWER: 0, AUTHORITY: 3, ADDITIONAL: 3 ;; QUERY SECTION: ;; redlab.lcs.mit.edu, type = A, class = IN ;; AUTHORITY SECTION: MIT.EDU. 2D IN NS BITSY.MIT.EDU. MIT.EDU. 2D IN NS STRAWB.MIT.EDU. MIT.EDU. 2D IN NS W20NS.MIT.EDU. [output truncated]- dig @bitsy.mit.edu +norecurse redlab.lcs.mit.edu
; <<>> DiG 8.1 <<>> @bitsy.mit.edu +norecurse redlab.lcs.mit.edu ; (1 server found) ;; res options: init defnam dnsrch ;; got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 10 ;; flags: qr ra; QUERY: 1, ANSWER: 0, AUTHORITY: 4, ADDITIONAL: 4 ;; QUERY SECTION: ;; redlab.lcs.mit.edu, type = A, class = IN ;; AUTHORITY SECTION: LCS.MIT.EDU. 6H IN NS MINTAKA.LCS.MIT.EDU. LCS.MIT.EDU. 6H IN NS OSSIPEE.LCS.MIT.EDU. LCS.MIT.EDU. 6H IN NS LAMPANG.LCS.MIT.EDU. LCS.MIT.EDU. 6H IN NS FEDEX.AI.MIT.EDU. [output truncated]- dig @mintaka.lcs.mit.edu +norecurse redlab.lcs.mit.edu
; <<>> DiG 8.1 <<>> @mintaka.lcs.mit.edu +norecurse redlab.lcs.mit.edu ; (1 server found) ;; res options: init defnam dnsrch ;; got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 10 ;; flags: qr aa ra; QUERY: 1, ANSWER: 2, AUTHORITY: 4, ADDITIONAL: 4 ;; QUERY SECTION: ;; redlab.lcs.mit.edu, type = A, class = IN ;; ANSWER SECTION: redlab.lcs.mit.edu. 30M IN CNAME reeducation-labor.lcs.mit.edu. reeducation-labor.lcs.mit.edu. 30M IN A 18.26.4.10 [output truncated]- 18.26.4.10
- Note actual number of steps may differ depending on the actual server queried.
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.
- dig +norecurse www.dmoz.org
; <<>> DiG 8.1 <<>> +norecurse www.dmoz.org ;; res options: init defnam dnsrch ;; got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 6 ;; flags: qr ra; QUERY: 1, ANSWER: 0, AUTHORITY: 12, ADDITIONAL: 12 ;; QUERY SECTION: ;; www.dmoz.org, type = A, class = IN ;; AUTHORITY SECTION: ORG. 3d2h7m35s IN NS A.ROOT-SERVERS.NET. ORG. 3d2h7m35s IN NS C.ROOT-SERVERS.NET. ORG. 3d2h7m35s IN NS G.ROOT-SERVERS.NET. ORG. 3d2h7m35s IN NS F.GTLD-SERVERS.NET. ORG. 3d2h7m35s IN NS F.ROOT-SERVERS.NET. ORG. 3d2h7m35s IN NS B.ROOT-SERVERS.NET. ORG. 3d2h7m35s IN NS I.ROOT-SERVERS.NET. ORG. 3d2h7m35s IN NS E.ROOT-SERVERS.NET. ORG. 3d2h7m35s IN NS J.GTLD-SERVERS.NET. ORG. 3d2h7m35s IN NS K.GTLD-SERVERS.NET. ORG. 3d2h7m35s IN NS A.GTLD-SERVERS.NET. ORG. 3d2h7m35s IN NS H.GTLD-SERVERS.NET. [output truncated]- Not found. Not in cache.
Now, ask your default this same query but use recursion. It should return an answer for you. How long did this take?
- dig www.dmoz.org
;; ANSWER SECTION: www.dmoz.org. 15M IN A 207.200.74.172 ;; Total query time: 106 msec [abbreviated output]- 207.200.74.172
- Query time: 103 msec
Finally, ask your default server again without recursion. How long does this request take? Has the cache served its purpose?
- dig +norecursion www.dmoz.org
; <<>> DiG 8.1 <<>> +norecursion www.dmoz.org ;; ANSWER SECTION: www.dmoz.org. 6S IN A 207.200.74.172 ;; Total query time: 1 msec [abbreviated output]- 207.200.74.172
- Query time: 1 msec
- The cache remembered the previous answer and greatly reduced the query time.
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?
- TTL decreases with each query.
- ad.doubleclick.net has a really short TTL.
;; ANSWER SECTION: ad.doubleclick.net. 5M IN CNAME gd10.doubleclick.net. gd10.doubleclick.net. 0S IN A 205.138.3.202- When the TTL runs out, the answers is no longer returned from cache.
- If queried again, the IP address changes. Probably to perform load balancing.
;; ANSWER SECTION: ad.doubleclick.net. 4m11s IN CNAME gd10.doubleclick.net. gd10.doubleclick.net. 0S IN A 204.253.104.80
Go to 6.033 Home Page | Questions or Comments: 6.033-tas@mit.edu
|