Homework 3: Recursive DNS client

Your goal is to recreate the functionality of the host program as if it were run with default arguments. Your program will not be allowed to perform any recursive queries; it must perform all recursion itself. Your program output will be compared against running host QUERY, with output line order not important.

You may program this assignment in the language of your choice. Python and C skeleton files are provided in the public git repository.

The python skeleton file is hard coded to query the recursive nameserver 8.8.8.8. The C skeleton file takes a recursive nameserver at the command line with the arguments -n NAMESERVER -i QUERY.

The file named.root has been provided as a list of recursive root nameservers. These are the servers you should contact first when conducting your recursive name resolution.

  • 10 points: perform A record lookups without querying a recursive nameserver
    • +1 points: …and CNAME aliases
    • +1 points: …and MX servers
    • +1 points: …and IPv6 (AAAA query) resolutions
    • +1 points: …and IPv4 reverse lookup (try host 131.193.32.29)
    • +1 points: …and IPv6 reverse lookup (try host 2001:470:1:18::119)
  • 1 point: fail gracefully when rcode != 0
    • +2 points: …and when receiving incorrect query ID in response
    • +1 points: …and when receiving unparseable responses
    • +1 points: …and when no functioning servers can be found
    • +2 points: …but don’t fail when one or more servers (returned or in named.root) are non-responsive
  • 3 points: traverse CNAME restart (www.internic.net example from class)
  • 3 points: traverse “unglued” nameserver result (www.yahoo.com.tw example from class)
  • 2 points: perform queries against nameservers only available via IPv6 (e.g. ds.v6ns.test-ipv6.com)

This homework will be graded out of 20 points. Any points above 20 will be considered extra credit. Anyone receiving 30 points will receive one free doughnut of my choice, redeemable during office hours if you give me 24 hours notice. Let me know of any dietary restrictions (veg/vegan/gf/kosher/halal) in the notice email.

Your code will be graded using the hw3.sh file. Add any extra files to your git repository if you use a different language. If your language of choice needs to be compiled, make sure that the Makefile has been updated to satisfactorily to compile your code; add any instructions on how to install necessary compilers/environments in SUBMISSION_COMMENTS.txt

All code will be inspected to ensure that no DNS related libraries have been used. If in doubt, ask: using a DNS library (or code that is not yours) will be considered cheating.

You will have two weeks to finish this assignment. GET STARTED EARLY. I’m giving you two weeks because you need two weeks. This assignment will be due Friday, October 3, at 3pm.

helpful links:
tcp ip guide
iana dns parameters