Sei sulla pagina 1di 3

Fall, 2013

Computer Networks
Solution 3
Problem 1 (R1 of Chapter 2 in [1])(5 points)
List five nonproprietary Internet applications and the application-layer protocols that they use.
Solution:
1. The Web: HTTP;
2. le transfer: FTP;
3. remote login: Telnet;
4. e-mail: SMTP;
5. BitTorrent le sharing: BitTorrent protocol
Problem 2 (P5 of Chapter 2 in [1])(5 points)
The text below shows the reply sent from the server in response to the HTTP GET message in the question
above. Answer the following questions, indicating where in the message below you find the answer.

HTTP/1.1 200 OK<cr><lf>Date: Tue, 07 Mar 2008


12:39:45GMT<cr><lf>Server: Apache/2.0.52 (Fedora)
<cr><lf>Last-Modified: Sat, 10 Dec2005 18:27:46
GMT<cr><lf>ETag: 526c3-f22-a88a4c80<cr><lf>AcceptRanges: bytes<cr><lf>Content-Length: 3874<cr><lf>
Keep-Alive: timeout=max=100<cr><lf>Connection:
Keep-Alive<cr><lf>Content-Type: text/html; charset=
ISO-8859-1<cr><lf><cr><lf><!doctype html public //w3c//dtd html 4.0 transitional//en><lf><html><lf>
<head><lf> <meta http-equiv=Content-Type
content=text/html; charset=iso-8859-1><lf> <meta
name=GENERATOR content=Mozilla/4.79 [en] (Windows NT
5.0; U) Netscape]><lf> <title>CMPSCI 453 / 591 /
NTU-ST550A Spring 2005 homepage</title><lf></head><lf>
<much more document text following here (not shown)>
(a) Was the server able to successfully find the document or not? What time was the document reply
provided?
(b) When was the document last modified?
(c) How many bytes are there in the document being returned?
(d) What are the first 5 bytes of the document being returned? Did the server agree to a persistent connection?
Solution:
(a) The status code of 200 and the phrase OK indicate that the server was able to locate the document
successfully. The reply was provided on Tuesday, 07 Mar 2008 12:39:45 Greenwich Mean Time.
(b) The document index.html was last modied on Saturday 10 Dec 2005 18:27:46 GMT.
(c) There are 3874 bytes in the document being returned.
(d) The rst ve bytes of the returned document are :

Fall, 2013

<!doc.
The server agreed to a persistent connection, as indicated by the Connection: Keep-Alive eld
Problem 3 (P9 of Chapter 2 in [1])(10 points)
Consider Figure 1, for which there is an institutional network connected to the Internet. Suppose that
the average object size is 850, 000 bits and that the average request rate from the institutions browsers to the
origin servers is 16 requests per second. Also suppose that the amount of time it takes from when the router
on the Internet side of the access link forwards an HTTP request until it receives the response is 3 seconds
on average (see Section 2.2.5). Model the total average response time as the sum of the average access delay
(that is, the delay from Internet router to institution router) and the average Internet delay. For the average
access delay, use /(1 ), where is the average time required to send an object over the access link
and is the arrival rate of objects to the access link.
(a) Find the total average response time.
(b) Now suppose a cache is installed in the institutional LAN. Suppose the miss rate is 0.4. Find the total
response time.

Figure 1: Bottleneck between an institutional network and the Internet

Solution:
(a) The time to transmit an object of size L over a link or rate R is L/R. The average time is the average
size of the object divided by R:
= (850, 000bits)/(15, 000, 000bits/sec) = 0.0567sec
The trac intensity on the link is given by
= (16requests/sec)(0.0567sec/request) = 0.907.
Thus, the average access delay is

Fall, 2013

taccess = (0.0567sec)/(1 0.907) = 0.6seconds.


The total average response time is therefore
ttotal = 0.6sec + 3sec = 3.6sec.
(b) The trac intensity on the access link is reduced by 60% since the 60% of the requests are satised
within the institutional network. Thus the average access delay is (0.0567sec)/[1(0.4)(0.907)] = 0.089
seconds. The response time is approximately zero if the request is satised by the cache (which happens
with probability 0.6); the average response time is 0.089sec + 3sec = 3.089 sec for cache misses (which
happens 40% of the time). So the average response time is (0.6)(0sec)+(0.4)(3.089sec) = 1.24 seconds.
Thus the average response time is reduced from 3.6 sec to 1.24 sec.
Problem 4 (P10 of Chapter 2 in [1])(10 points)
Consider a short, 10-meter link, over which a sender can transmit at a rate of 150 bits/sec in both
directions. Suppose that packets containing data are 100, 000 bits long, and packets containing only control
(e.g., ACK or hand-shaking) are 200 bits long. Assume that N parallel connections each get 1/N of the link
bandwidth. Now consider the HTTP protocol, and suppose that each downloaded object is 100 Kbits long,
and that the initial downloaded object contains 10 referenced objects from the same sender. Would parallel
downloads via parallel instances of non-persistent HTTP make sense in this case? Now consider persistent
HTTP. Do you expect significant gains over the non-persistent case? Justify and explain your answer.
Solution:
Note that each downloaded object can be completely put into one data packet. Let Tp denote the one-way
propagation delay between the client and the server.
First consider parallel downloads using non-persistent connections. Parallel downloads would allow 10
connections to share the 150 bits/sec bandwidth, giving each just 15 bits/sec. Thus, the total time needed
to receive all objects is given by:
(200/150 + Tp + 200/150 + Tp + 200/150 + Tp + 100, 000/150 + Tp ) + (200/(150/10) + Tp + 200/(150/10) +
Tp + 200/(150/10) + Tp + 100, 000/(150/10) + Tp ) = 7377 + 8 T p (seconds)
Now consider a persistent HTTP connection. The total time needed is given by:
(200/150+Tp +200/150+Tp +200/150+Tp +100, 000/150+Tp )+10(200/150+Tp +100, 000/150+Tp ) =
7351 + 24 Tp (seconds)
Assuming the speed of light is 300 106 m/sec, then Tp = 10/(300 106 ) = 0.03 microsec. Tp is therefore
negligible compared with transmission delay.
Thus, we see that persistent HTTP is not signicantly faster (less than 1 percent) than the non-persistent
case with parallel download.

References
[1] James F. Kurose and Keith W. Ross.
Wesley/Pearson, 6th edition, 2012.

Computer networking: a top-down approach.

Addison-

Potrebbero piacerti anche