Wireshark Q and A
Wireshark Q and A
Wireshark Q and A
ASSIGNMENT
Wireshark is a free and open source packet analyzer. It is used for network
troubleshooting, analysis, software and communications protocol development.
Wireshark lets the user put network interface controllers that support promiscuous
mode into that mode, so they can see all traffic visible on that interface, not just traffic
addressed to one of the interface's configured addresses and broadcast/multicast
traffic.
The following steps are to get a better picture of how http protocol actually works -
3. Wait a bit more than one minute and then begin Wireshark packet capture.
Q1 - Is your browser running HTTP version 1.0 or 1.1? What version of HTTP on the
server running?
Answer: Version → 1.1
Server version → 1.1
Q2 - What languages (if any) does your browser indicate that it can accept to the
server?
Answer: Accept-Language → en-US,en;q=0.5\r\n
Q4 - What is the status code returned from the server to your browser?
Q5 - When was the HTML file that you are retrieving last modified at the server?
Q7 - By inspecting the raw data in the packet content window, do you see any
headers within the data that are not displayed in the packet-listing window? If so,
name one.
Before performing the steps below, make sure your browser’s cache is empty.
Now do the following:
1. Start up your web browser, and make sure your browser’s cache is cleared.
2. Start up the Wireshark packet sniffer
3. Enter the following URL into your browser
http://gaia.cs.umass.edu/wireshark-labs/HTTP-wireshark-file2.html Your
browser should display a very simple five-line HTML file.
4. Quickly enter the same URL into your browser again (or simply select the
refresh button on your browser)
5. Stop Wireshark packet capture, and enter “http” in the
display-filter-specification window, so that only captured HTTP messages will
be displayed later in the packet-listing window.
QUESTIONS RELATED TO THE INFORMATION DISPLAYED IN THE
PACKET-HEADER DETAILS WINDOW
Q8 - Inspect the contents of the first HTTP GET request from your browser to the
server. Do you see an “IF-MODIFIED-SINCE” line in the HTTP GET?
ANSWER: No, I don’t see any “IF-MODIFIED-SINCE” line in the first HTTP GET
request.
Q9 - Inspect the contents of the server response. Did the server explicitly return the
contents of the file? How can you tell?
Q10 - Now inspect the contents of the second HTTP GET request from your
browser to the server. Do you see an “IF-MODIFIED-SINCE:” line in the HTTP
GET? If so, what information follows the “IF-MODIFIED-SINCE:” header?
Q11 - What is the HTTP status code and phrase returned from the server in
response to this second HTTP GET? Did the server explicitly return the contents of
the file? Explain.
ANSWER: The file has not been modified. Hence no text is returned in the message.
HTTP/1.1 304 Not Modified\r\n
ETag: "173-54904ea3792e7"\r\n
\r\n
Retrieving Long Documents
Let’s next see what happens when we download a long HTML file.
1. Start up your web browser, and make sure your browser’s cache is cleared,
as discussed above.
2. Start up the Wireshark packet sniffer
3. Enter the following URL into your browser
http://gaia.cs.umass.edu/wireshark-labs/HTTP-wireshark-file3.html Your
browser should display the rather lengthy US Bill of Rights.
Q12 - How many HTTP GET request messages did your browser send? Which
packet number in the trace contains the GET message for the Bill or Rights?
Q13 - Which packet number in the trace contains the status code and phrase
associated with the response to the HTTP GET request?
Q15 - How many data-containing TCP segments were needed to carry the
single HTTP response and the text of the Bill of Rights?
What happens when your browser downloads a file with embedded objects?
1. Start up your web browser, and make sure your browser’s cache is cleared,
as discussed above.
2. Start up the Wireshark packet sniffer.
3. Enter the following URL into your browser
http://gaia.cs.umass.edu/wireshark-labs/HTTP-wireshark-file4.html Your
browser should display a short HTML file with two images. These two
images are referenced in the base HTML file. That is, the images themselves
are not contained in the HTML; instead the URLs for the images are contained
in the downloaded HTML file.
4. Stop Wireshark packet capture, and enter “http” in the
display-filter-specification window, so that only captured HTTP messages will
be displayed.
QUESTIONS RELATED TO THE INFORMATION DISPLAYED IN THE
PACKET-HEADER DETAILS WINDOW
Q16 - How many HTTP GET request messages did your browser send? To which
Internet addresses were these GET requests sent?
Q17 - Can you tell whether your browser downloaded the two images serially, or
whether they were downloaded from the two web sites in parallel? Explain.
The username ( wireshark-students) and password (network) that you entered are
encoded in the string of characters (Authorization: Basic
d2lyZXNoYXJrLXN0dWRlbnRzOm5ldHdvcms=\r\n) in the client’s HTTP GET
message
QUESTIONS RELATED TO THE INFORMATION DISPLAYED IN THE
PACKET-HEADER DETAILS WINDOW
Q18 - What is the server’s response (status code and phrase) in response to the
initial HTTP GET message from your browser?
Q19 - When your browser’s sends the HTTP GET message for the second
time, what new field is included in the HTTP GET message?