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:
-
Install Wireshark.
-
Familiarize yourself with Wireshark.
-
Start Wireshark.
-
In the "Filter" field (just beneath the button bar)
enter
http
(Note: Wireshark uses lowercase) and click
on Apply.
-
How will this change the behavior of Wireshark?
-
In the "Start" area, select a device/interface to capture from.
-
Click on Start to start the live capture.
-
In a browser tab/window, load the URL
http://w3.cs.jmu.edu/bernstdh/cs460/helloworld.html
-
Stop the live capture. (Hint: Look on the button bar or in the "Capture"
menu.)
-
Find the appropriate
GET
request in the list.
-
What version of HTTP was used?
-
What was the
User-Agent
?
-
In your browser, view the source of the HTML file. (Hint: Try
right-clicking in the tab/window.)
-
Does the HTML contain references to any other resources?
-
"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:
- 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.)
- Type
GET /bernstdh/cs460/helloworld.html
(Note: Depending on your "echo" settings, you may
or may not see what you are typing.)
-
Type two carriage return, line feed sequences (i.e., in Windows,
press [Enter] twice).
-
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.)
-
Start the live capture.
-
In a browser tab/window, load the URL
http://w3.cs.jmu.edu/bernstdh/cs460/scribble.html
-
Stop the live capture.
-
In your browser, view the source of the HTML file.
-
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.)
-
What does this mean the browser had to do?
-
Locate the appropriate
GET
requests.
-
How many GET requests are there and what do they do?
-
In a browser tab/window, load the file
http://users.cs.jmu.edu/bernstdh/web/index.html.
-
Look at the URL of the page you just loaded.
-
How does it differ from what you entered? (Hint: Be careful. The difference
is fairly subtle.)
-
This difference arises because the HTTP server you requested the file from
wants to use HTTPS (i.e., secure HTTP) rather than HTTP.
-
Using the information you captured, what actually happened?
(Hint: What does HTTP response code 302 mean?)
-
"Manually" send a GET request for
users.cs.jmu.edu/bernstdh/index.html
-
Does the response you get confirm or contradict what you learned
with the browser?
-
In a browser tab/window, load the URL
http://w3.cs.jmu.edu/bernstdh/cs460/scribble.html
-
Look at the source (i.e., the HTML) of the page you just loaded.
-
What information is included in the
head
of this document?
-
What behavior is this information supposed to cause?
-
How can you clear the cache of your browser to ensure that
it has not cached the response to a request?