JMU
Homework Assignment 2


1 Instructions: Complete all of the steps below and answer all of the questions (each of which is enclosed in a box). Only submit your answers to the questions.
2 Steps and Questions:
  1. Install Wireshark.
  2. Familiarize yourself with Wireshark.
  3. Start Wireshark.
  4. In the "Filter" field (just beneath the button bar) enter http (Note: Wireshark uses lowercase) and click on Apply.
  5. How will this change the behavior of Wireshark?
  6. In the "Start" area, select a device/interface to capture from.
  7. Click on Start to start the live capture.
  8. In a browser tab/window, load the URL http://w3.cs.jmu.edu/bernstdh/cs460/helloworld.html
  9. Stop the live capture. (Hint: Look on the button bar or in the "Capture" menu.)
  10. Find the appropriate GET request in the list.
  11. What version of HTTP was used?
  12. What was the User-Agent?
  13. In your browser, view the source of the HTML file. (Hint: Try right-clicking in the tab/window.)
  14. Does the HTML contain references to any other resources?
  15. "Manually" send a GET request for http://w3.cs.jmu.edu/bernstdh/cs460/helloworld.html using the terminal program of your choice (e.g., PuTTY, the telnet command from the command line). Specifically:
    1. Connect to w3.cs.jmu.edu on port 80. (Note: First make sure that the window/application you are using does not close on exit.)
    2. Type GET /bernstdh/cs460/helloworld.html
      (Note: Depending on your "echo" settings, you may or may not see what you are typing.)
    3. Type two carriage return, line feed sequences (i.e., in Windows, press [Enter] twice).
  16. Describe the contents of the response? (Note: You should not get a "Bad Request". If you do you probably need to change the settings of the terminal program.)
  17. Start the live capture.
  18. In a browser tab/window, load the URL http://w3.cs.jmu.edu/bernstdh/cs460/scribble.html
  19. Stop the live capture.
  20. In your browser, view the source of the HTML file.
  21. What references to other resources are contained in the HTML? (Hint: Look at what was displayed in your browser and think about how it differs from the earlier example.)
  22. What does this mean the browser had to do?
  23. Locate the appropriate GET requests.
  24. How many GET requests are there and what do they do?
  25. In a browser tab/window, load the file http://users.cs.jmu.edu/bernstdh/web/index.html.
  26. Look at the URL of the page you just loaded.
  27. How does it differ from what you entered? (Hint: Be careful. The difference is fairly subtle.)
  28. This difference arises because the HTTP server you requested the file from wants to use HTTPS (i.e., secure HTTP) rather than HTTP.
  29. Using the information you captured, what actually happened? (Hint: What does HTTP response code 302 mean?)
  30. "Manually" send a GET request for users.cs.jmu.edu/bernstdh/index.html
  31. Does the response you get confirm or contradict what you learned with the browser?
  32. In a browser tab/window, load the URL http://w3.cs.jmu.edu/bernstdh/cs460/scribble.html
  33. Look at the source (i.e., the HTML) of the page you just loaded.
  34. What information is included in the head of this document?
  35. What behavior is this information supposed to cause?
  36. How can you clear the cache of your browser to ensure that it has not cached the response to a request?

Copyright 2013