Assignments to be demonstrated in class during your normal Lab session in the week 30
Version 1.0 29/3/18 (some slight rearrangement since the “first look” so that reverse DNS is
not part of the base spec.)
Version 1.1 17/4/18 – clarified use of DNS libraries, IPv4 specification of DNS server
(extension A), all mailservers to be listed (extension B)
Programming assignment: DNS reader: max 100 marks (=50% of assignment 2, parts A,B
are 25% each)
Write a program that makes DNS requests and reports the answers.
BASE FUNCTIONALITY 50/100
You can hard-code the DNS IP address if you wish. (Note that you can change this IP
address from the version handed-in for the demo if needed)
You can find the current DNS server for your windows machine by running
nslookup –all
Other operating systems should have similar commands
Command format is up to you, but you should be able to specify the following:-
Enter a host name, or domain name, and display
The host name
The IPv4 address
The IPv6 address
(reverse DNS is is now part of the extension A)
The only communications libraries you can use are socket libraries which open UDP sockets
You can’t use specialised DNS libraries for submitting requests, and you can’t use socket
library routines that query the name server, such as gethostbyname.
You are allowed to use dnslib “parse” and “question” functions for preparing the request and
analysing the response (although I think you will learn more by coding/decoding the
requests/responses yourself).
EXTENDED FUNCTION A : 10/100
Allow the DNS server IPv4 address to be specified
Allow “reverse DNS”, i.e. specifying an IPv4 address and getting the hostname
For the demo, it is recommended that the nameserver be set to 130.102.71.160 for
reverse DNS.
Note that the “reverse DNS” requests will depend on what records a name server holds, so we
will only test ones that the UQ EAIT name server can respond to.
EXTENDED FUNCTION B : 10/100
Also return the hostname and IP addresses of the mailserver(s) associated with the
host/domain name. If more than one answer is returned, show all the answers.
EXTENDED FUNCTION C: 10/100
If the requested name is an alias, also display the canonical host name
EXTENDED FUNCTION D: 20/100
Implement a nice GUI that accesses all the above functions. This means it needs to be
in a window, use a mouse to enter information, with boxes for entering data, buttons
or drop-down menus for selecting options, a “submit” or similar button for starting the
search, and a well organised output of information. The program only needs to work
on your demo machine (either own laptop or lab PC).
Here are some names that we will test:
NOTES: The program “nslookup” on windows does these sorts of requests, so you can use
this program, make similar requests, and use wireshark to see how the requests are structured
as UDP packets containing DNS requests, and what the responses look like.