Extra Problems On Chapter 2 (HTTP and FTP)
Extra Problems On Chapter 2 (HTTP and FTP)
Extra Problems On Chapter 2 (HTTP and FTP)
Question 1:
Part I - Among the words in brackets, underline (or circle) the correct one to
be sent to a (DNS, SMTP, WEB) server on the port (25, 80, 53). Before sending
this request, a (TCP, UDP, HTTP) connection should be first established, and
typically run the program process of (client, server, client/server), and they
(can, cannot) enter and leave the network so often, using (static, dynamic) IP
addresses.
- Fill in the names of the layers, a protocol that corresponds to each layer and the
name of the data unit in each one. Then, place the appropriate letter in the blank
associated with the layer for the proper description of its services below as
illustrated in the solved examples.
Name of the Protocols Name of data Proper
layer unit description
application HTTP,smtp, message d
Layer 5
dns,
transport UDP, TCP segment c
Layer 4
Netowork or IP Packet or b
Layer 3
internet datagram
Data link Ethernet frame e
Layer 2
Physical layer Analog/digital bit a
Layer 1
An HTTP file ceng415.html with size L is located at server1, this file references 4
images: Image1.jpg (size L1), Image2.jpg (size L2), Image3.jpg (size L3) and Image4.jpg
(size L4). The first 2 images are stored in server1, but Image3 and Image4 are stored in
another server: server2. Server1 is located at a distance d1, while server2 is at distance
Assume that we have a constant bit rate R, and a line speed S over all the links.
In terms of L, L1, L2, L3, L4, d1, d2, R and S, answer the following questions.
CENG415.html
Image1.jpg
Image2.jpg
Image3.jpg
Image4.jpg
d1
Server1
d2
Server2 Client
a. Find the Round Trip Times RTT1 between the client and server1 and RTT2 between
the client and server2.
RTT1= 2 * d1/s1 RTT2= 2 * d2/s2
b. If we are using a non-persistent http protocol, compute the total time that it would
take the browser on the client to retrieve the entire document.
Delay = RTT1 (connection with server1) + RTT1 (request and response for
ceng415.html) + L/R
+ RTT1 (connection with server1) + RTT1 (request and response for Image1.jpg) + L1/R
+ RTT1 (connection with server1)+ RTT1 + (request and response for Image2.jpg)
+L2/R
+ RTT2 (connection with server2) + RTT2 (request and response for Image3.jpg) +L3/R
+ RTT2 (connection with server2) + RTT2 (request and response for Image4.jpg)+L4/R
c. Re-calculate the total time to retrieve the entire document, if the client
browser now is using persistent http protocol without piplining.
Delay = RTT1(connection with server1) + RTT1 (request and response for
ceng415.html)+L/R
d. Recalculate the total time to retrieve the entire document. If the browser
this time supports persistent with pipelining http protocol. (Assuming
same distance and same image length).
RTT
2RTT + dtr
dtr
html
dtr
dtr
image 1
image 2
dtr
dtr
image 3 2RTT + 2 dtr
image 4
Alice is shopping online via internet with a connection of 0.5 Mbps. The web page
of size 20 Kbytes contains 20 images of 15 Kbytes each. Assume that the one way
a. How long does it take for the page (including images) to appear on
Alice’s screen, assuming non-persistent HTTP using a single
connection at a time? Show your calculation in details.
RTT= 2* one way propagation delay = 5 ms= 0.005 sec
Time to download the web page with non-persistent HTTP = 42 RTT + time
transmission of the base file (20 Kbytes) + time transmission of the 20 images (15
Kbytes each) = 42*0.005 + (8*20*103/0.5*106) + (20*8*15.103/0.5*106) = 0.21 +
0.32 + 4.8 = 5.33 sec
b. What would become the time for the page (including images) to appear
on Alice’s screen if she used persistent HTTP without pipelining
instead of non-persistent HTTP? Show your calculation in details.
Time to download the web page with persistent HTTP without pipelining = 22 RTT +
time transmission of the base file (20 Kbytes) + time transmission of the 20 images (15
Kbytes each) = 22*0.005 + (8*20*103/0.5*106) + (20*8*15.103/0.5*106) = 0.11 + 0.32 +
4.8 = 5.23 sec
Time to download the web page with persistent HTTP with pipelining = 3 RTT + time
transmission of the base file (20 Kbytes) + time transmission of the one image (15
Kbytes) = 3*0.005 + (8*20*103/0.5*106) + (8*15.103/0.5*106) = 0.015 + 0.32 + 0.24
= 0.575 sec
Question 4:
Choose the correct answer. Only one answer is correct in each question. HTTP with
persistent connections
a. requires 2 RTTs per object
b. requires the server to open a new TCP connection to send a response
c. provides higher security
d. none of the above
5. To get an IP address for a given web page, local DNS server communicates first with
the:
a. Authoritative DNS server
b. TLD DNS server
c. Web server
d. Root DNS server
6. The response time of a web page with N objects for non persistent HTTP is equal to:
a. N. RTT + ∑
b. (2N). RTT + ∑
c. 2. RTT + transmission time of the largest object
d. (N+1). RTT + ∑
7. The response time of a web page with N objects for persistent HTTP without
pipelining is equal to:
a. N. RTT + ∑
b. (2N). RTT + ∑
c. 2. RTT + transmission time of the largest object
d. (N+1). RTT + ∑
8. The response time of a web page with N objects for persistent HTTP with pipelining
is equal to:
a. N. RTT + ∑
b. (2N). RTT + ∑
c. 3. RTT + ∑
d. (N+1). RTT + ∑
Question 5:
1. List two advantages of deploying a Web cache (i.e. a proxy server) in an institutional
network.
TCP for a and d (these applications require reliable transmission), UDP for b,c,e (these
applications require quick transmission)
3. A user in Beirut, connected to the internet via a 2 Mbps connection retrieves a 25 Kbytes
web page from a web server in Paris, where the page references 3 images of 200 Kbytes
each. Assume that the one way propagation delay is 20 ms.
a. How long does it take for the page (including images) to appear on the user’s screen,
assuming non-persistent HTTP using a single connection at a time?
b. What would become the time for the page (including images) to appear on the user’s
screen if he used persistent HTTP without pipelining in place of non-persistent
HTTP?
Time to download the web page with persistent HTTP without pipelining = 5RTT + time
transmission of the base file (25 Kbytes) + time transmission of the 3 images (200 Kbytes
each) = 5*40 ms + (8*25.103/2.106) + (3*8*200.103/2.106) = 222.5 ms
Question 6:
2) Briefly describe how web caching can reduce the delay in receiving a
requested object. Will Web caching reduce the delay for all objects requested
by a user or for only some of the objects? Why?
Web caching can bring the desired content “closer” to the user.
If an object is present in the cache server we will not need more delays to bring it
from the original server. So web caching can reduce the delay for all objects, even
objects that are not cached, since caching reduces the traffic on links.
a. Find the Round Trip Times RTT1, RTT2 and RTT3 between the client and
the 3 servers Server1, Server2 and Server 3.
RTT1= 2 * propagation time to server 1 = (2*10000m)/(2.5 108 m/s) = 0.8 ms
RTT2= (2*20000m)/(2.5 108 m/s) = 1.6 ms
RTT3= (2*20000m)/(2.5 108 m/s) = 1.6 ms
c. Re-calculate the total time to retrieve the entire document, if the client
browser now is using persistent http protocol without pipelining
Question 7:
d) Was the user able to store the file? How did you know?
FTP uses two parallel TCP connections, one connection for sending control
information (such as a request to transfer a file) and another connection for actually
transferring the file. Because the control information is not sent over the same
connection that the file is sent over, FTP sends control information out of band.
Question 7: