CS 725/825 Computer Networks, IT 725 Network Technology

Assignment 2


Due: Wednesday, October 18, 2023, 2:10 pm (start of the class)

Problems:

  1. (10 points) Use the dig command to emulate name resolution of hostname www.cs.unh.edu 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 that you have picked, get a list of name servers serving the domain, query one of those to get the IP addresses that corresponds to that domain. Remember that the command option @<IP address> allows you to select a specific name server. Option +norecurse prevents 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 of dig that will make it perform all the steps in one go, you are not allowed to use it.
  2. (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 the root name servers and you will be effectively performing the task of a root name server. In the report give the lines from the root.zone file that you used to get the answer (an IP address of one of the TLD name servers.)
  3. (10 points) Even though there are 13 root name servers listed in named.root file, the corresponding IPv4/IPv6 addresses are anycast, each of which corresponds to multiple geographically distributed sites. Try performing traceroute to one of the root name servers from multiple different 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/hostname of the root name server you are targeting. An online tool Network Looking Glass offered by a network service provider Hurricane Electric can help you with running traceroute from multiple vantage points.
  4. (20 points) Analyze a trace of network traffic https://www.cloudshark.org/captures/eb4faca2102d and answer the following questions:
    1. In a few sentences, describe the content of the trace.
    2. What is the name of the program that initiated the network traffic captured in the trace?
    3. What is the hostname of the machine where the command was executed?
    4. What type of a DNS query did the client make? Was an IPv6 address requested?
    5. How long did the name resolution (DNS) take?
    6. Was the DNS response authoritative?
    7. Was the client successful in retrieving the content?

Programming assignment:

  1. (50 points) The goal of this assignment is to write a pair of programs that allows you to measure the offset between the system clocks of two computers connected over a network. The solution must take into an account the time it takes to propagate the messages from one system to another.
  2. More specifically, the client notes the current time t1, sends a request to the server, the server notes the time the request arrived t2, prepares the response, gets the time the response is ready to leave t3, and sends both t2 and t3 back to the client. The values must be sent as a JSON-encoded object, e.g., {"t2":1020, "t3":1030}. The client notes the arrival time of the response t4 and calculates the round trip time (RTT) as (t4 - t1) - (t3 - t2), and the clock offset as (t1 + RTT/2) - t2:

    timing diagram

    As you will see, your clock offset observation will differ slightly from run to run. This is a result of variable latencies in the underlying system. In order to get more precise results, your program must run the message exchange outlined above multiple times and use the multiple measurements to come up with a more precise estimate of the clock offset. How exactly you combine the measurements is an open part of the assignment and should be outlined in the program report.

    You are free to pick any underlying protocol for the message exchange as well as the programming language. While it is perfectly fine to run both client and server on the same machine for initial testing (in that case, both use the same clock and your program should report an offset close to zero). You do have to carry out the final experiments between two different computers. You can pick any pair of computers but two Linux servers are set up on the CS network (rb1.cs.unh.edu and rb2.cs.unh.edu) and available for your experiments. The servers have the standard development tools installed. Accounts are being set up for all students in the course with the same username as you have on Agate but with a different password. Your password has been stored and can be found in your home directory on Agate in file cs725.info. The servers do not mount your Agate filesystem. The best way to keep your code in sync between your development environment and both machines is to use git and create multiple clones of your repository.

    You will not be able to install software on rb1.cs.unh.edu and rb2.cs.unh.edu beyond what a regular user can do (e.g., Python users are encouraged to use virtual environments). Check early if a library/module/tool that you plan to use is actually there. You can ask for anything reasonable to be installed there but it will take at least till the next business day. As always, you are encouraged to start early.

    Deliverable

    Write a brief report that outlines the approach you took. There are two parts to the report. In the first one you will describe the method that you used. The second part of the report 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. An attempt to "fake" a run, for example by writing a program that ignores input and just prints answers regardless of input, will be considered as cheating. Finally, remember, you may be asked to give a demo of your program. If your program does not implement fully the required functionality or does not work, you have to make it clear in the report.

    The source code for this part of the assignment plus brief instructions on how to run the code in the README.md must be committed to the course Git repository (see instructions). Do not commit data, graphs, documents, etc. into the repository.

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.