Suppose within your Web browser you click on a link to obtain a Web page. The IP address for the associated
URL is not cached in your local host, so a DNS lookup is necessary to obtain the IP address. Suppose that
n DNS servers are visited before your host receives the IP address from DNS; the successive visits incur an
RTT or RTT1, RTT2, …, RTTn. Further suppose that the Web page associated with the link has a small
amount of HTML text. Let RTT0 denote the RTT between the local host and the server containing the
HTML file. Assume zero transmission time. Suppose the HTML file references 11 very small objects on the
same server. Neglect transmission times, how much time elapses from when the client clicks on the link until
the client receives all objects with:
(a) Non-persistent HTTP with no parallel TCP connections?
(b) Non-persistent HTTP with the browser configured for 5 parallel connections?
(c) Persistent HTTP with no parallel TCP connections?
(d) Persistent HTTP with the browser configured for arbitrarily many parallel connections?
Write your solution to Problem 1 in this box
How does the web server (e.g., eBay) identify users when you do the Internet shopping? Briefly explain how
Write your solution to Problem 2 in this box
Page 2 of 6
CS 118 Spring 2018 : Homework 2
A Web browser running on the client host is requesting a webpage from the server. We make the following
• TCP window is large once the TCP handshake is complete (i.e. ignore flow control). TCP header size
is h bits, and the maximum payload size is p bits.
• The bandwidth is b bps, and the propagation delay is d seconds.
• Ignore DNS related delays, and ignore the payload in three-way handshake packets, ACK packets, and
HTTP request packets. In other words, those packets consist of header only.
• The client requests a webpage consisting of an HTML file that indexes 5 binary files on the same server.
Each of the file is 2p bits long. In other words, each of the file can be sent in exactly 2 TCP packets.
Piggybacking is used whenever possible.
• Each HTTP request is sent in one TCP packet.
Please answer the following questions:
(a) Suppose pipelining of HTTP requests is allowed and no parallel TCP connections are used. Calculate
the minimal time it takes the browser to receive all the files.
(b) Suppose the non-persistent, non-pipelining mode with parallel TCP connections is used, repeat the
(c) Which mode gives the smaller latency? Briefly justify your answer.
Problem 3 continued on next page. . . Page 3 of 6
CS 118 Spring 2018 : Homework 2
Write your solution to Problem 3 in this box
How does SMTP marks the end of a message body? How about HTTP? Can HTTP use the same method
as SMTP to mark the end of the message body?
Write your solution to Problem 4 in this box
Suppose your department has a local DNS server for all computers in the department.
(a) Suppose you are an ordinary user (i.e., not a network/system administrator). Can you determine if an
external Web site was likely accessed from a computer in your department a couple of seconds ago?
(b) Now suppose you are a system administrator and can access the caches in the local DNS servers of your
department. Can you propose a way to roughly determine the Web servers (outside your department)
that are most popular among the users in your department? Explain.
Write your solution to Problem 5 in this box
Page 6 of 6