Due (Problem Set): Wednesday, November 9, 2016, 11:59 pm

Due (Programming Assignment): Tuesday, November 22, 2016, 11:59 pm

Tasks

Problems:

  1. Analyze this trace and answer the questions. Make sure that you point to a specific piece of information in the trace that you used to answer the questions.
    1. Describe the application-layer activity captured in the trace.
    2. What version of HTTP is being proposed for the session by the client?
    3. Does the server agree with the version? How?
    4. What is the client requesting?
    5. How long does it take for the server to respond?
    6. Describe the client application.
    7. What is the purpose of the DNT: 1 directive?
    8. Is the client requesting a persistent connection? How?
    9. Is the server granting a persistent connection?
    10. Describe the server software. What is the common name of this server software?
    11. Does the server permit caching of the document?
    12. What is the MIME type of the returned document. Does it match the filename extension?
    13. Is the returned document in proper HTML format?
    14. What are the first few characters of the returned document?
    15. Does the server have the correct wall time? Assume the trace timestamps are correct.
  2. Consider the same trace as in the previous question and focus on the TCP layer. Draw a sequence diagram of the connection and label it with the following information:
    1. Show the absolute starting sequence numbers in each direction. It is fine to give a hex value.
    2. For every packet give its main purpose (e.g., SYN-ACK, DATA, ACK, etc.) and sequence and acknowledgment numbers (it is OK to give values relative to the start of the connection).
    3. For every ACK packet indicate which packet it acknowledges.
    4. On both client and server sides, indicate the TCP states (label the time axis with the state names).
    5. Identify three pairs of packets that could be best used to estimate the round-trip time (RTT) from client to server and back. List the observed RTTs and discuss the finding. In your opinion, what was the round trip latency of the network. Explain your answer.
  3. Calculate MD5 and SHA-1 digest of p3.html, the HTML description of the previous assignment (download it from http://cs.colby.edu/courses/F16/cs331/projects/p3.html).
  4. What are the first few bytes of the public key in the certificate used by https://colby.edu/? Who issued the certificate?

Programming assignment:

In this question you are asked to implement a web-based prefix calculator similar in functionality to the one that you implemented for Project 2. Since this is not an exercise in web page development, the HTML for the solution is provided and should not be modified. A static (the AJAX request in the page results in a fixed response regardless of its parameters) example of the page can be found here. The page served in the trace can be downloaded from p4/formnjs.html. Using curl or wget is the easiest way to get the file to your account on dori. Node.js has been installed on dori. If you have node.js installed on your machine, you can work on your machine.

Write a node.js server that: serves the provide page formnjs.html, responds to the AJAX GET /prefcalc request from the page by returning JSON-encoded results of the prefix calculation, and returns HTTP 404 Page Not Found status code for any other request. As with any servers, it is very likely that your implementation contains significant security holes that can be easily exploited. For that reason, do not leave your code running longer than it is necessary for testing. This is also the reason why the example page uses no active components on the server side.

Extensions

  1. Modify the HTML file so that the functionality is provided by a client-side script embedded in the page. For that you need to remove the AJAX call to the server and replace it with a JavaScript version of the code that you wrote for Assignment 2.
  2. Make your page be able to handle the error messages (e.g. values out of range).
  3. Any interesting extensions you have not tried before.

Submission

Please follow the submission instructions to turn in your work.

© 2016 Ying Li. Page last modified: .