CS 725/825 Computer Networks, IT 725 Network Technology
Assignment 3
Due: Wednesday, October 30, 2024, 2:10 pm (start of the class)
Problems:
- (30 points) Take a second look at the trace of network traffic studied in the previous assignment (https://www.cloudshark.org/captures/32ec896b8640). Ignore the DNS exchange in the first four packets and the probe in the final packet. Focus on the transport layer, and answer the following questions:
- Describe the fundamental TCP protocol function of all the packets in the trace.
- 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.
- 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.
- What was the total number of application payload bytes transmitted from the client to server and from the server to the client?
- Estimate the round-trip time between the client and server. Give the packet pair(s) that you considered and outline why you chose them.
- Are there ACK packets that cumulatively acknowledge multiple data packets?
- Do the client and server agree on the SACK option? How?
- What is the initial Window size for both client and server.
- Does the trace shows the connection being closed?
- (5 points) Repeat Question 5(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'srequests
) are not allowed. - (5 points)
Calculate MD5 and SHA-512 hashes of file
a2.html
, the HTML description of the previous assignment (download it from https://www.cs.unh.edu/~cs725/assignments/a2.html). Give the commands used to calculate the hashes. - (5 points)
What are the first few bytes of the public key presented in the certificate used by https://www.iol.unh.edu/? Who issued the certificate? Find a command line utility to verify your answer (hint: use
-servername
option). - (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 the next assignment where you will use those keys to establish secure connections.
Programming assignment:
- (50 points) The goal of this assignment is to have you implement from scratch a standard protocol. Study SMTP (the textbook has a good description, you can also look at RFC 5321 or Wikipedia article, which has a good example of a typical SMTP exchange). You are asked to implement a simple SMTP client in two different ways. Unlike the previous assignment, you are not allowed to use any libraries or tools that would allow you to send a message without actually implementing the SMTP exchange.
- Using
nc
andexpect
(or an equivalent tool) write as-short-as-possible script that delivers an email message by (partially) implementing SMTP conversation. You are not expected to do any extensive error checking. You are not allowed to use any command line utility for direct sending of an email (e.g., themail
command in Unix/Linux). Wikipedia article onexpect
provides a few examples to get you started. For this part of the programming assignment it is fine to hardcode the sender/recipient/subject/body in your program. - Rewrite the solution from above using plain socket operations in a programming language of your choice. This time, you are expected to do elementary error checking (detecting an error, printing a message, and aborting the program is fine) and to allow for user-specified sender, recipient, subject and body of the message that is being sent. The exact user interface is up to you but you are not allowed to make the user type the SMTP commands. All you need to support is sending plain text messages, no need to implement sending attachments or any other fancy features.
- 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.
- 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 asa3
.
Technically, you can communicate with any mail server in this assignment, however, I would like to ask you to use the mail server running at berlioz.cs.unh.edu
. This server is only accessible from UNH IP addresses. While there is nothing technically wrong with connecting to any mail server, typos-filled hand-typed sessions tend to trigger various security alarms. I have learned this the hard way when I assigned a similar question in the past and would like to avoid such problems this time around.
Tasks
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.