CS 725/825 Computer Networks, IT 725 Network Technology

Assignment 2


Due: Wednesday, October 16, 2024, 2:10 pm (start of the class)

Problems:

  1. (10 points) Use the dig command to emulate name resolution of hostname www.iol.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 provided by a network service provider Hurricane Electric can help you with running traceroute from multiple vantage points.
  4. (10 points) Analyze a trace of network traffic https://www.cloudshark.org/captures/32ec896b8640 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?
    8. (extra credit) Consider the last packet in the trace. As far as I can tell, this was a malicious probe that happen to arrive as the trace was being captured. What can you find out about it, its source, and its intent?
  5. (10 points) Using command line utility nc:
    1. Connect to a web server, send a well-formed GET request and capture the server's response. You can see an example of an HTTP request/response in Question 4. Briefly describe each line in the HTTP response. No need to analyze the document itself.
    2. Pretend to be a server and capture an HTTP request made by a browser. Briefly describe each line in the request.

    You are expected to look up the meaning of the header lines that were not discussed in the class but there is no need to go beyond one sentence. nc, a.k.a. netcat, is just one example of a utility that can be used. socat is another popular one. telnet can be used for the first part. Any tool/method that allows you to see the entire HTTP request and response is fine.

Programming assignment:

  1. (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 length and effective throughput of an HTTP transaction.
  2. Write a simple program that makes an HTTP request to a website and downloads some content (e.g., a webpage). The program should measure the amount of time the transaction took and 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 performance measures.

    An execution of your program may look like this:

    [rbartos@agate ~]$ ./a2 http://www.cs.unh.edu/~cs725/notes/cs725-fall-2024-08.pdf
    1.125 Mbytes downloaded in 223.2 ms (effective throughput 40.32 Mbits per second)
    

    Deliverables

    1. 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. 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. 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.
    2. Commit the source code to your course Git repository (see instructions). Add brief instructions on how to compile/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 as a2.

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.