www.domain.invalid nonexistent.kaytwo.org www.thelongestdomainnameintheworldandthensomeandthensomemoreandmore.com ds.v6ns.test-ipv6.com ipv6.google.com www.cs.uic.edu www.yahoo.com.tw nibbles.cs.uic.edu www.uic.eduTo get started, check out the hw3 template from svn://cs450.cs.uic.edu/pub/homeworks/hw3 This code already does DNS querying and parsing for you. Your responsibility is to modify the hw3 to work as follows: The file root-servers.txt contains a list of DNS root servers. Your application must use this file to find a working root server to use. You can assume it will always be called root-servers.txt, and exist in the current working directory. If a server does not respond, your code must move on to the next server. Its parameters and output are illustrated below. Try to match the output as closely as possible: there should not be lots of extra lines of debug output etc. in the final version. You are obviously not allowed to use gethostbyname or getaddrinfo for this homework, nor are you allowed to run any executables such as `host' or `nslookup' or `dig' from inside your program.
./hw3 -d -n nameserver -i domainto find your local DNS server, check your network settings, or run "cat /etc/resolv.conf" on a non-windows machine. Massive hint: recursion is your friend.
./hw3 -i www.domain.invalid www.domain.invalid IPv4 address: not found. www.domain.invalid IPv6 address: not found. ./hw3 -i nonexistent.kaytwo.org nonexistent.kaytwo.org IPv4 address: not found. nonexistent.kaytwo.org IPv6 address: not found../hw3 -i www.thelongestdomainnameintheworldandthensomeandthensomemoreandmore.com www.thelongestdomainnameintheworldandthensomeandthensomemoreandmore.com IPv4 address: 94.126.42.50 www.thelongestdomainnameintheworldandthensomeandthensomemoreandmore.com IPv6 address: not found. ./hw3 -i ds.v6ns.test-ipv6.com ds.v6ns.test-ipv6.com IPv4 address: 216.218.228.114 ds.v6ns.test-ipv6.com IPv6 address: 2001:470:1:18::2 ./hw3 -i ipv6.google.com ipv6.google.com IPv4 address: not found. ipv6.google.com IPv6 address: 2607:f8b0:4003:c01::63 ./hw3 -i www.cs.uic.edu www.cs.uic.edu IPv4 address: 131.193.32.29 www.cs.uic.edu IPv6 address: not found. ./hw3 -i www.yahoo.com.tw www.yahoo.com.tw IPv4 address: 68.180.206.184 www.yahoo.com.tw IPv6 address: not found. ./hw3 -i nibbles.cs.uic.edu nibbles.cs.uic.edu IPv4 address: 131.193.34.150 nibbles.cs.uic.edu IPv6 address: not found. ./hw3 -i www.uic.edu www.uic.edu IPv4 address: 128.248.156.31 www.uic.edu IPv6 address: not found.
svn co svn://cs450.cs.uic.edu/pub/
or just svn up
in your /pub
if you already have one checked out. The grading script is in /pub/grading-scripts/hw3/. To run the grading script:
./hw3_score username score_file
This script will download hw3 from svn and create score_file inside hw3.
The grading script will check the ip address following the first colon in the first two lines: the first for ipv4, and the second for ipv6. Credit is given if the output matches either a correct IP (in the case of multiple resolutions), or "not found." in the case of a nonexistent domain. If all test-cases are successful in grading script you will get 11 points from grading script. However, the following tests will be done manually and points will be deducted if your program can't handle the corresponding issues.
-0.5: At least four descriptive commits are made -20: Hard codes a recursive nameserver to resolve the nameThe score file will look something like the following:
starting grade run for ckanich (revision 16) at 09 Feb 2013 22:41:40 +0000 ----- testing non-recursive functionality testing command: ./hw3 -n 2001:4978:292:2::1 -i www.uic.edu ipv4 check for www.uic.edu successful: +0.50 pts ipv6 check for www.uic.edu successful: +0.50 pts ----- testing recursive lookup starting at root nameservers testing command: ./hw3 -i www.domain.invalid ipv4 check for www.domain.invalid successful: +0.50 pts ipv6 check for www.domain.invalid successful: +0.50 pts testing command: ./hw3 -i nonexistent.kaytwo.org ipv4 check for nonexistent.kaytwo.org successful: +0.50 pts ipv6 check for nonexistent.kaytwo.org successful: +0.50 pts testing command: ./hw3 -i www.thelongestdomainnameintheworldandthensomeandthensomemoreandmore.com ipv4 check for www.thelongestdomainnameintheworldandthensomeandthensomemoreandmore.com successful: +0.50 pts ipv6 check for www.thelongestdomainnameintheworldandthensomeandthensomemoreandmore.com successful: +0.50 pts testing command: ./hw3 -i ds.v6ns.test-ipv6.com ipv4 check for ds.v6ns.test-ipv6.com successful: +0.25 pts ipv6 check for ds.v6ns.test-ipv6.com successful: +0.25 pts testing command: ./hw3 -i ipv6.google.com ipv4 check for ipv6.google.com successful: +0.50 pts ipv6 check for ipv6.google.com successful: +0.50 pts testing command: ./hw3 -i www.cs.uic.edu ipv4 check for www.cs.uic.edu successful: +0.25 pts ipv6 check for www.cs.uic.edu successful: +0.25 pts testing command: ./hw3 -i www.yahoo.com.tw ipv4 check for www.yahoo.com.tw successful: +0.25 pts ipv6 check for www.yahoo.com.tw successful: +0.25 pts testing command: ./hw3 -i nibbles.cs.uic.edu ipv4 check for nibbles.cs.uic.edu successful: +0.25 pts ipv6 check for nibbles.cs.uic.edu successful: +0.25 pts ----- testing with bad root servers testing command: ./hw3 -i www.cs.uic.edu ipv4 check for www.cs.uic.edu successful: +2.00 pts ipv6 check for www.cs.uic.edu successful: +2.00 pts final score: 11.00/11.00
Copyright 2016 The Board of Trustees of the University of Illinois.webmaster@cs.uic.edu |
WISEST Helping Women Faculty Advance Funded by NSF | ![]() | ![]() |