CS 725/825 Computer Networks, IT 725 Network Technology

Assignment 4


Due: Wednesday, November 29, 2023, 2:10 pm (start of the class)

Problems:

  1. (30 points) Take a second look at the trace of network traffic used Assignment 2 (https://www.cloudshark.org/captures/eb4faca2102d). Ignore the DNS exchange in the first four packets, focus on the transport layer, and answer the following questions:
    1. Describe the fundamental TCP protocol function of all the packets in the trace.
    2. Draw a sequence diagram showing the exchanged packets and for each identify its function (e.g., SYN, SYN+ACK, etc.). Label the vertical axes with TCP protocol states of both client and server.
    3. What are the absolute values of the initial sequence numbers of the connection (client to server and server to client)? It is OK to give hex values.
    4. What was the total number of application payload bytes transmitted from the client to server and from the server to the client?
    5. Estimate the round-trip time between the client and server. Give the packet pair(s) that you considered and why you chose them.
    6. Are there ACK packets that cumulatively acknowledge multiple data packets?
    7. Do the client and server agree on the SACK option? How?
    8. Does the trace shows the connection being closed?
  2. (5 points) Repeat Question 1(a) from the previous assignment, this time making a request over HTTPS. For that you either need to find a tool equivalent to nc that allows you to open a TLS connection or write a brief program that opens a "secure" socket and sends the HTTP request. As in the previous assignment, your are expected to type the HTTP header, so tools and libraries that do that for you (e.g., curl or Python's requests) are not allowed.
  3. (5 points) Calculate MD5 and SHA-512 hashes of file a3.html, the HTML description of the previous assignment (download it from https://www.cs.unh.edu/~cs725/assignments/a3.html). Give the commands used to calculate the hashes.
  4. (5 points) What are the first few bytes of the public key presented in the certificate used by https://www.unh.edu/? Who issued the certificate? Find a command line utility to verify your answer (hint: use -servername option).
  5. (5 points) Find and test command line commands that allow you to generate a public/private key pair, a certificate signing request, a self-signed certificate. Do this for both RSA and Elliptic Curve key pairs. This is a prep for the programming part of this assignment where you will use those keys to establish secure connections.

Programming assignment:

  1. (50 points) The goal of this assignment is to study the latency overhead introduced by various protocols. The assignment focusses on a simple request/response transaction implemented using various protocols and, specifically, on the question of how many network round-trip times (RTTs) does it take to complete such a transaction. While other components contribute to the overall transaction latency, RTT tends to dominate, and it is typically out of our control. This question can be answered by analyzing the protocols in question, however, in this assignment you are expected to study it experimentally. You will implement a system consisting of a client making a simple request to a server, the server responds with some arbitrary data, the client receives it, and measures, as precisely as possible, the time the entire transaction took, i.e., including, if applicable, the time it took to establish and close the connection.
  2. Experiment with five protocols: ICMP, UDP, TCP, TLS, HTTP, and HTTPS. Both request and response should be no more than a few tens of bytes in length, not including the protocol overhead. For all protocols except for ICMP (use ping for that), you need to write both client and server side. It is fine to use libraries for TLS/HTTP/HTTPS. For the HTTP/HTTPS server you may want to consider using node.js or Flask. TLS and HTTPS experiments require that you generate your own self-signed (not backed by a recognized CA) certificate (see Question 5 above). Most HTTPS client libraries will require extra steps to confirm that it is fine to accept a self-signed certificate. Ignore internet posts that state that accepting self-signed certificates in your program is wrong. They are correct with respect to production code, however, here we are dealing with experiments in a closed environment.

    To run your experiment, use rb1.cs.unh.edu and rb2.cs.unh.edu. Besides connectivity to the department network, the servers are connected via five links that carry no other traffic than the one produced by the experiments. Each of the links is configured so that traffic experiences different link delays. The extra delays added to the inherent delay of a directly connected link are set as follows:

    Interface Round-trip delay (ms)
    enp2s0f0 5
    enp2s0f1 20
    enp2s0f2 80

    The links are configured with private IP addresses, make sure that you send your test traffic over them and not over the public interfaces rb1.cs.unh.edu and rb2.cs.unh.edu. Standard development tools are installed there. 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 username and password has been stored in your home directory on Agate in file cs725.info, cs825.info, or it725.info, depending on the course you are registered for. 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.

    IPv4 and IPv6 address assignment on rb1/rb2/rb3. This assignment uses only rb1 and rb2 and network interfaces enp2s0f0, enp2s0f1, enp2s0f2. For convenience, you can use hostnames using pattern: hostname "pxyz" resolves to IPv4 address 10.x.y.z (e.g., "p201" is a hostname for the interface with IP address 10.2.0.1).

    How exactly you set up the experiments is up to you. You do not have to run the experiment on all links but the choices that you make should not be arbitrary. Your submission should include a brief justification of the experiment design decisions. Each of the experiments must be repeated sufficient number of times so that the collected results are statistically significant.

    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 a4.

    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.