辅导案例-COMP5621

欢迎使用51辅导,51作业君孵化低价透明的学长辅导平台,服务保持优质,平均费用压低50%以上! 51fudao.top
Dept. of Computer Science & Engineering HKUST
COMP5621 (Fall 2020) Homework 1 1
COMP5621 Computer Networks: Homework 1 Fall 2020
- For all the problems, show or explain the steps that you follow in deriving your answer.
- Type your solutions and upload a neat PDF file to Canvas by the deadline.

Problem 1 (30 points):
Consider two hosts, A and B, connected by a single direct link of rate R bps. Suppose that the
two hosts are separated by m meters and denote the propagation speed along the link s
(meters/sec). Host A is to send a file of size F bits to host B.

a) Give an expression of the propagation delay, dprop.

b) Give an expression for the transmission time, dtrans.

c) Ignoring processing and queuing delays, and assuming that it takes one round-trip-
time to establish a connection before the transfer of the file starts, give an expression
for the response time (i.e., the time it takes to complete the transfer of the file from A
to B). Draw the corresponding time-space diagram.

d) Assume now that the two hosts A and B are connected indirectly via a single packet-
switch. Both links (from A to the switch and from the switch to B) have a transmission
rate of R bps. The distance from A to the switch is 2m meters and the distance from the
switch to B is m meters. Assuming we are using packet switching with store-and-
forward, and that the file fits in one single packet and it takes one RTT to establish the
end-to-end connection. How long would it take the file to reach host B. Illustrate by
drawing the time-space diagram (respecting the proportions).

e) Answer the same question as in d) except that now we assume that the distance from A
to the switch is m meters, that each packet can carry F/3 bits (you can assume that F is
a multiple of 3) and that the link from the switch to B has a speed of R/2 (everything
else being the same as previously). Draw the time space diagram for this case.

Problem 2 (20 points)
Consider using HTTP to download a web page composed of 1 base html file of size S bits, 5
images of size 5S bits each and 1 image of size 2S bits. Assume that the RTT between the client
and the server is r seconds and that the throughput between the server and the client is c bits/s.
Considering that connection setup between client and server takes one RTT:
a) Give an expression of the response time for this web page if we were to use HTTP 1.0
without parallel connections. Explain your answer. Draw a time space diagram to
illustrate the exchange.

b) Give an expression of the response time for this web page if we were using HTTP 1.0
with the server allowing as many parallel connections as necessary. Explain and draw
the time space diagram for this case.
c) Give an expression of the response time for this web page if we were using HTTP 1.0
with the server allowing at most 3 parallel connections from any client. Explain and
draw the time space diagram for this case.

Dept. of Computer Science & Engineering HKUST
COMP5621 (Fall 2020) Homework 1 2
d) Give an expression of the response time for this web page if we were using HTTP 1.1;
explain and draw the time space diagram.

Problem 3 (25 points)
This question will help you self-learn some additional aspects of http. The following is a sample
request/reply using the “OPTIONS” http method.

OPTIONS / HTTP/1.1
Host: www.cse.ust.hk
User-Agent: curl/7.54.0
Accept: */*
Max-forwards: 1
------------------------------
HTTP/1.1 200 OK
Allow: OPTIONS, GET, HEAD, POST
Date: Wed, 27 Sep 2018 15:52:36 GMT
Server: Apache
Cache-Control: private
Last-Modified: Fri, 20 Sep 2018 19:42:29 GMT
Transfer-Encoding: chunked
Content-Type: text/html
Set-Cookie:rb_webperf=52fd0d7b; domain=cse.ust.hk; path=/

f637



a) Search on the Internet (RFC, Wikipedia, Mozilla developer network, …) and learn what
does the OPTIONS method do, then explain the meaning of the first line of the request
above, the last line of the request above and the second line of the reply
b) For the Set-cookie header line, we can see a list of statements separated by semicolons.
Using the RFC or Wikipedia, explore and explain briefly what information is contained
in a cookie?
c) Using the RFC or Wikipedia, explore briefly when and how the so-called “Chunked
Transfer encoding” is used and how it works. What is the number of bytes received in
this web object or chunk?
d) The goal of this question is to incite you to read further on HTTP2. Refer to RFC 7540
or to Wikipedia and explain the meaning of the following request.

GET / HTTP/1.1
Host: server.example.com
Connection: Upgrade, HTTP2-Settings
Upgrade: h2c
HTTP2-Settings:



Dept. of Computer Science & Engineering HKUST
COMP5621 (Fall 2020) Homework 1 3
Problem 4 (25 points)

Using your computer or one in the lab, read the manual page of a tool like “nslookup” or
“dig”, then answer the following questions:

a) Give the names of the DNS servers of google.com, with the command-line you used to
determine them

b) Give the names of the mailservers of google.com, with the command-line you used to
determine them

c) Does google.com use DNS for load balancing? If yes give two or three IP addresses of
google’s web servers (www.google.com)

Practical Exercises
(Do not submit this part it is rated 0 points. But Wireshark use is part of the syllabus and
learning material, so it may be tested in the exams/quiz, so you must do it ASAP but not
necessarily by the deadline of the homework. For example, in the exams we can provide you
with a Wireshark screen capture and ask you to explain what you see, if you do not do your
labs, you won’t be able to answer the questions in the exams.)

1) Wireshark Packet Sniffer: Check the course website under Labs to find instructions for
Wireshark Lab 1 and how to get started with Wireshark. Follow the instructions given there.
2) Wireshark HTTP Lab: Check the course website under Labs to find instructions for
Wireshark HTTP Lab. Follow the instructions given there.

欢迎咨询51作业君
51作业君

Email:51zuoyejun

@gmail.com

添加客服微信: abby12468