0% found this document useful (0 votes)
82 views

Problem Set 2: Due: Start of Class, Thursday September 21

This document provides instructions for Problem Set 2 of the CS242 Computer Networks course. It includes instructions for a Wireshark lab exploring HTTP protocols and embedding objects. It outlines 3 exercises and 4 problems. Exercise 1 has students examine HTTP GET and response messages to answer questions. Exercise 2 looks at retrieving long documents that are split across multiple TCP segments. Exercise 3 examines downloading files with embedded objects from different servers. The problems cover HTTP basics, round-trip times for persistent vs non-persistent connections, computer science humor, and analyzing cookies from packet captures.

Uploaded by

John Boy
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
82 views

Problem Set 2: Due: Start of Class, Thursday September 21

This document provides instructions for Problem Set 2 of the CS242 Computer Networks course. It includes instructions for a Wireshark lab exploring HTTP protocols and embedding objects. It outlines 3 exercises and 4 problems. Exercise 1 has students examine HTTP GET and response messages to answer questions. Exercise 2 looks at retrieving long documents that are split across multiple TCP segments. Exercise 3 examines downloading files with embedded objects from different servers. The problems cover HTTP basics, round-trip times for persistent vs non-persistent connections, computer science humor, and analyzing cookies from packet captures.

Uploaded by

John Boy
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

CS242 Computer Networks Handout # 4

Randy Shull September 14, 2017


Wellesley College

Problem Set 2
Due: Start of Class, Thursday September 21

Reading: Kurose & Ross, Section 2.1, 2.2

Wireshark Lab [15]


These exercises explore several aspects of the HTTP protocol: the basic
GET/response interaction, HTTP message formats, retrieving large HTML
files, and retrieving HTML files with embedded objects.

1 HTTP GET/response interaction


Make sure that you are using a wired ethernet connection and that your
WiFi is turned off. Otherwise, as we saw last time, nothing will make sense.
Start up the web browser and the Wireshark packet sniffer (but don’t yet be-
gin packet capture). Enter “http” (just the letters, not the quotation marks)
in the display-filter-specification window, so that only captured HTTP mes-
sages will be displayed later in the packet-listing window. We’re only inter-
ested in the HTTP protocol here, and don’t want to see the clutter of all
captured packets. Begin Wireshark packet capture.
Enter the following to your browser:

http://gaia.cs.umass.edu/wireshark-labs/HTTP-wireshark-file1.html

Stop Wireshark packet capture. Your browser should display the very sim-
ple, one-line HTML file.
Figure 1 shows in the packet-listing window that two HTTP messages
were captured: the GET message (from your browser to the gaia.cs.umass.edu
web server) and the response message from the server to your browser. The
packet-contents window shows details of the selected message (in this case
the HTTP GET message, which is highlighted in the packet-listing win-
dow). Recall that since the HTTP message was carried inside a TCP seg-
ment, which was carried inside an IP datagram, which was carried within
an Ethernet frame. Wireshark displays the Frame, Ethernet, IP, and TCP
packet information as well. We want to minimize the amount of non-HTTP

1
Figure 1: Wireshare after remote file has been retrieved.

data displayed (we’re interested in HTTP here, and will be investigating


these other protocols is later labs), so make sure the boxes at the far left of
the Frame, Ethernet, IP and TCP information have a right-pointing triangle
(which means there is hidden, undisplayed information), and the HTTP line
has a down-pointing triangle (which means that all information about the
HTTP message is displayed).

Exercise 1 [6] Examine the HTTP GET and response messages and an-
swer the following questions. You should print out the GET and response
messages (see the introductory Wireshark lab for an explanation of how to
do this) and indicate where in the message youve found the information
that answers the following questions. When you hand in your assignment,
annotate the output so that its clear where in the output you’re getting the
information for your answer

a [1] Is your browser running HTTP version 1.0 or 1.1? What version of

2
HTTP is the server running?

b [1] What languages (if any) does your browser indicate that it can accept
to the server?

c [1] What is the IP address of your computer? Of the gaia.cs.umass.edu


server?

d [1] What is the status code returned from the server to your browser?

e [1] Is the server keeping the connection open, or closing up shop?

2 Retrieving long documents


The documents retrieved so far have been very short HTML files. What
happens when a much longer HTML file is downloaded? Make sure your
browsers cache is cleared and Wireshark ready to capture. Enter the follow-
ing 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. Stop
Wireshark packet capture. If http is still in the display-filter-specification
window, delete and hit return. In will see a lots of stuff in the packet-listing
window. Scroll down until you find your HTTP GET message. This is likely
followed by a multiple-packet TCP response to your HTTP GET request.
This multiple-packet response deserves a bit of explanation. Recall from
Section 2.2 (see Figure 2.9 in the text) that the HTTP response message
consists of a status line, followed by header lines, followed by a blank line,
followed by the entity body. In previous cases of our HTTP GET, the entity
body in the response is the entire requested HTML file. In our case here,
the HTML file is rather long, and at 4500 bytes is too large to fit in one
TCP packet.1 The single HTTP response message is thus broken into sev-
eral pieces by TCP, with each piece being contained within a separate TCP
segment (see Figure 1.24 in the text). Wireshark indicates each TCP seg-
ment as a separate packet, and the fact that the single HTTP response was
fragmented across multiple TCP packets is indicated by the “TCP segment
of a reassembled PDU” in the Info column of the Wireshark display.
1
We will see why this is the case when we get to the protocol layer below the application
layer

3
Exercise 2 [6] Answer the following questions.

a [2] How many HTTP GET request messages did your browser send?
Which packet number(s) in the trace contains the GET message(s) for the
Bill or Rights?

b [2] Which packet number in the trace contains the status code and
phrase associated with the response to the HTTP GET request? What is
the status code and phrase in the response?

c [1] How many data-containing TCP segments were needed to carry the
single HTTP response and the text of the Bill of Rights?

3 HTML documents with embedded objects


Next we examine how the browser downloads a file with embedded objects,
i.e., a file that includes other objects (in the example below, image files)
that are stored on another server(s). Start by making sure your browser’s
cache is cleared and getting Wireshark set to capture packets. 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 them-
selves are not contained in the HTML; instead the URLs for the images are
contained in the downloaded HTML file. As discussed in the textbook, your
browser will have to retrieve these logos from the indicated web sites. The
publishers logo is retrieved from the www.aw-bc.com web site. The image of
the cover for the 5th edition of the tex is stored at the manic.cs.umass.edu
server. Stop Wireshark packet capture, and enter http in the display-filter-
specification window, so that only captured HTTP messages will be dis-
played.
Exercise 3 [4] Answer the following two questions.

a [2] How many HTTP GET request messages did your browser send? To
which Internet addresses were these GET requests sent?

b [2] Can you tell whether your browser downloaded the two images seri-
ally, or whether they were downloaded from the two web sites in parallel?
Explain.

4
Problems
Problem 1 [5]: WWW Basics
True or false? Briefly explain your answers.

a [1] A user requests a Web page that consists of some text and three
images. For this page the client will send one request message and receive
four response messages.

b [1] Two distinct Web pages (for example, www.mit.edu/research.html


and www.mit.edu/students.html) can be sent over the same persistent
connection.

c [1] With nonpersistent connections between browser and origin server,


it is possible for a single TCP segment to carry two distinct HTTP request
messages.

d [1] The Date: header in the HTTP response message indicates when
the object in the response was last modified.

e [1] HTTP response messages never have an empty message body.

Problem 2 [6]: Round-Trip Times


Suppose that a browser and web server are connected by a 100 Mbps
link and that processing, queuing, and propagation delays for TCP packets
lead to an average round-trip TCP communication time of 50 milliseconds.
Suppose that the browser requests a small (1KB) web page that references
ten embedded images, each of which has size 1MB. In each of the following
scenarios, determine the total time elapsed between the time the browser
requests the page and the time that it has all page information (including
the embedded images).
Note: While the 100 Mbps refers to 108 bits per second, the terms KB and
MB stand for Kilo Bytes and Mega Bytes. A byte is 8 bits, so 1 KB is 8000
bits.

a [2] HTTP with non-persistent connections.

b [2] HTTP with persistent connections and sequential (nonpipelined)


requests for embedded objects.

c [2] HTTP with persistent connections with parallel (pipelined) requests


for embedded objects.

5
Problem 3 [2]: Computer Science Humor
Archives of all xkcd comic strips can be found at http://xkcd.com/n,
where n is a positive integer that serves as an identifier for a particular comic
strip. Some of Lyn’s favorites are 123, 149, 163, 327, 388 (even though he
loves grapefruit), 394, and 426. Why does your instructor think this page
is 404 funny?
Problem 4 [4]: Cookies
Using Wireshark, capture packets as you browse three of your favorite
web sites. For each web site, list all the cookies that it uses and discuss
what you think the cookies are used for. Attached a copy of the packets
containing cookie requests to your assignment.

You might also like