CS 725/825 Computer Networks, IT 725 Network Technology
Assignment 2
Due: Wednesday, October 14, 2026, 2:10 pm (start of the class)
Problems:
- (10 points)
Use the
digcommand to emulate name resolution of a valid hostname of your choice by someone outside of the domain of that hostname. That is, first query one of the root name servers, get a list of TLD name servers for the TLD of the hostname you picked, get a list of name servers serving the domain, and query one of those to get the IP addresses that correspond to that domain. Remember that the command option@<IP address>allows you to select a specific name server. The option+norecurseprevents a name server from performing a recursive query. The authoritative list of root name servers (named.root) can be downloaded from https://www.iana.org/domains/root/files. There is an option ofdigthat will make it perform all the steps in one go; you are not allowed to use it. - (10 points)
Redo the first step of the process described above (finding an IP address of the TLD name server for the TLD of the hostname you picked) by looking up the information in the Root Zone file (root.zone) that can also be downloaded from https://www.iana.org/domains/root/files. This file is used by root name servers, and you will effectively be performing the task of a root name server. In the report, give the lines from the
root.zonefile that you used to get the answer (an IP address of one of the TLD name servers). - (10 points)
Even though there are 13 root name servers listed in the named.root file, the corresponding IPv4 and IPv6 addresses are anycast, each of which corresponds to multiple geographically distributed sites. Try performing a
tracerouteto one of the root name servers from multiple networks and see if you get different sites. Pay attention to the route itself; given the way anycast works, the final hop will always be the IP address or hostname of the root name server you are targeting. An online tool, Network Looking Glass, provided by a network service provider, Hurricane Electric, can help you run atraceroutefrom multiple vantage points. - (10 points) Analyze a trace of network traffic consisting of just two packets and answer the questions below. Please note that I am still looking for a suitable replacement for the web packet trace viewer that I've utilized in the past incarnations of the class but is now discontinued. You can view a brief outline of the trace or a full decode of the trace (both are produced by command line utility
tshark). If you have Wireshark installed on your computer, here is the capture file. - In a sentence, describe the transaction captured in the trace.
- What is the hostname of the machine that initiated the query?
- What type of DNS query did the client make? Was an IPv6 address requested?
- Which DNS server was used?
- How long did the name resolution (DNS) take?
- Was the DNS response authoritative?
- (10 points) When you look more closely at what is happening in the trace above, you can observe something odd. The client is trying to connect to host
mask.apple-dns.net, a hostname that is owned by Apple, and yet the returned IP address, 132.177.102.27, is within UNH's address space.
What is going on here? Host 132.177.102.27 (notice.unh.edu) is not affiliated with Apple in any way.
Trying to resolve the name on the UNH network, even when using an external resolver (Google's recursive nameserver 8.8.8.8), confirms the result:
% dig mask.apple-dns.net @8.8.8.8
; ; <<>> DiG 9.18.50 <<>> mask.apple-dns.net @8.8.8.8
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 57467
;; flags: qr rd; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; WARNING: recursion requested but not available
;; QUESTION SECTION:
;mask.apple-dns.net. IN A
;; ANSWER SECTION:
mask.apple-dns.net. 1 IN A 132.177.102.27
;; Query time: 0 msec
;; SERVER: 8.8.8.8#53(8.8.8.8) (UDP)
;; WHEN: Sat Sep 26 22:51:38 EDT 2026
;; MSG SIZE rcvd: 52
However, when you try to resolve the name from outside of the UNH network, you get quite different (and correct!) results:
% dig mask.apple-dns.net @8.8.8.8
; % dig mask.apple-dns.net @8.8.8.8
; <<>> DiG 9.10.6 <<>> mask.apple-dns.net @8.8.8.8
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 64447
;; flags: qr rd ra; QUERY: 1, ANSWER: 8, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;mask.apple-dns.net. IN A
;; ANSWER SECTION:
mask.apple-dns.net. 120 IN A 17.248.254.106
mask.apple-dns.net. 120 IN A 17.248.138.135
mask.apple-dns.net. 120 IN A 17.248.138.132
mask.apple-dns.net. 120 IN A 17.248.254.105
mask.apple-dns.net. 120 IN A 17.248.254.107
mask.apple-dns.net. 120 IN A 17.248.254.102
mask.apple-dns.net. 120 IN A 17.248.254.103
mask.apple-dns.net. 120 IN A 17.248.138.139
;; Query time: 28 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Sat Sep 26 22:51:19 EDT 2026
;; MSG SIZE rcvd: 175
Programming assignment:
- (50 points) The goal of this assignment is to practice the basics of socket programming and to perform elementary performance testing. You are asked to develop a simple utility to measure the effective throughput of an HTTP transaction.
- Include a brief outline of the approach that you took and a sample run in your assignment submission. You must show representative runs of your programs together with appropriate explanations. Important: by showing an execution of your program, you are making a statement that your program, as submitted, works as shown. Any attempt to "fake" a run, for example by writing a program that ignores input and just prints answers regardless of input, will be considered cheating. You may be asked to give a demo of your program. If your program does not fully implement the required functionality or does not work, you must make that clear in the report.
- Commit the source code to your course Git repository (see instructions). Add brief instructions on how to compile and run the code to the assignment's
README.md. Do not commit data, graphs, documents, etc. into the repository. Don't forget to tag the commit asa2.
Write a simple program that makes an HTTP request to a website and downloads a document. The program should measure the time the transaction took and the content size, then calculate the effective throughput (the content size divided by the total time it took to get it). You are free to use any programming language or platform. It is fine to use libraries for the HTTP request. Do not display the downloaded content, just the results. An execution of your program may look like this:
[rbartos@agate ~]\$ ./a2 http://www.cs.unh.edu/~cs725/test-files/random-100k.bin 100.0 kbytes downloaded in 223.2 ms (effective throughput 3.670 Mbits per second)
Use the program you developed and explore the impact of file size on effective throughput. Try downloading files of different sizes and observe how the throughput changes. Plot the results, analyze the trends, and draw conclusions. Is the effective throughput the same for all file sizes? If not, try to explain why.
To help with this, five files of sizes 1kB, 10kB, 100kB, 1,000kB, and 10,000kB of random bytes are provided for testing:
Note: 1 kB = 1,024 bytes = 8,192 bits. 1 Mbps = 1,000,000 bits per second.
Deliverables
Submission instructions:
Upload your submission as a single PDF file using myCourses (mycourses.unh.edu). Any source code used in the assignment must be committed to the course Git repository. More details can be found in the standard assignment submission instructions.