Network Programming
Spring 2001

Homework 3 - UDP DNS Client
Due Date: Wed, March 7th

Submit to netprog-submit@cs.rpi.edu with the subject line "3"
Complete Submission instructions are here


IMPORTANT!: All testing will be done on the CS Sun workstations. Make sure your code works on a Sun!


This assignment requires the creation of a UDP DNS client program. The program should accept two command line parameters, the first is the name (or IP address) of a name server, the second is a hostname. Your progam should use a UDP DNS request to find the IP address of the hostname listed as the second command line parameter.

You should use only UDP! If a server responds with a message that indicates the reply was truncated, you do not need to use TCP to retry the query - just print out a message indicating that the response was truncated.

Your client must work even if the server refuses to provide recursion. In this situation the server will send you a list of nameservers who can answer the question - you program should ask one of the nameservers for the answer.

Your client should employ some kind of timeout/retransmission scheme, so that if the server does not respond within a few seconds your client will automatically resend the request. Each time your program sends a request your program should print out a message indicating that it is (re)sending. Your program should give up if it does not get an answer after 5 transmissions.

You client should print out the answer (the IP address of the hostname indicated on the command line), it does not need to print out other information (you don't need to print out all the resource records sent by the server), but feel free to do so...

.

IMPORTANT: Don't test your code on the rpi.edu name servers, use the CS name server at 128.213.1.1


Suggestions

Grading

Your project will be tested to make sure it works properly - part of this testing will make sure that you check for error conditions.

25% of your homework grade depends on the how well we can understand your code - this means everything should be commented!

Submitting your files

Submission of your homework is via email, the general idea is to send an email message with all your files as attachments. There is an automated email submission system that will respond to your submission right away, so you will have a record that we got your files.

All projects must be submitted via email to netprog-submit@cs.rpi.edu. The subject line of the submission message should contain a single number indicating the project number (1 for HW1, 2 for HW2, etc.). You must include your files as attachments, feel free to send a zip-file or a tar file.

Don't send compiled code!

You can expect a return email indicating receipt of your project submission immediately. This receipt will include a list of all the files that were successfully extracted by the submission script - please look over the receipt carefully to make sure your submission worked.

Multiple Submissions: You can resubmit up to 10 times for each project, we will always grade the last submission received unless you tell us otherwise.