程序代写案例-1COMP 5416-Assignment 1

1COMP 5416 Assignment 1 (2021)
Due: 19 September 23:59, Sydney time
Question 1 (Delay, 18%). As shown in the figure below, a file of size F = 1000 + S by
tes is transmitted on an end-to-end
connection over four links, where S is the last three digits of your student number. For example, if your student number is
490123456, then S = 456 and F = 1456 bytes.
Each link is 100 km. The signal prorogation speed is 2 × 108 m/s. Assume that a header of 40 bytes is added to each packet.
The bandwidth of all links is R = 1 Mbps at the beginning. The nodes use the store-and-forward scheme. (Ignore processing
delays at each node.)
(0) What is your student number? Warning: If you use another student’s number as S value to answer the question, the following
sub-questions will not be marked and you will get 0 in Question 1.
(1) How long does it take to transmit the file if the whole file is transmitted as a single packet.
Now assume that the bandwidth of link B − C and D − E become 0.5 Mbps. Answer (2)–(4).
(2) Repeat (1).
(3) We would like to break the file into smaller packets to decrease the overall delay in the store-and-forward scheme. Assume
that each time you break the file to make a new packet, you have to add 40 bytes as the header of the new packet. Repeat (2)
when we break the file into N = 4 packets.
(4) What should be the optimal size of the packets to have the minimum overall delay to deliver the whole file? Find the overall
delay.
Hint: Since the link B − C has a smaller bandwidth compared with A−B, packets could be queued for some time!
! " # $ %
2Question 2 (Web Cache, 18%). Consider the following scenario where two schools of one university are installing web caches
for users. (You only need to review the contents discussed in lectures in weeks 1–3 to complete this question.)
!"#$#%&'(
)*"+*")
!"#$%&
'()*+(*)
,&-..$/0
1(%2*+3%)4/56)*764
,&-..$/0/86)*764 ,&-..$/9/86)*764
:+.;4/1
:+.;4/9
:+.;4/0
,-./0)1(23)
2./0)1(4523)
2./0)1(4523)
43)
43)
!"!"#$%&'&'
,&-..$/9
!"!"#$%&'&'
!"!"#$%&'&'
Inside each school, the one-way propagation delay from each host to the school’s gateway is 2ms. The link bandwidth is assumed
to be infinity (sufficient large). The link bandwidth from each school’s gateway to the university’s gateway is 5Mbps, and one-way
propagation delay is 2.5ms. The access link bandwidth from the university’s gateway to the Internet is 10Mbps, and assume that
the one-way propagation delay from the gateway to any server in the public Internet is 5ms.
On average, the requests from each school to view the webpage (of the public Internet) arrive at the rate of 500 requests per
second and the webpage is 1000 bytes (which fits exactly one packet). Ignore the header size. The requests themselves are very
small and we assume that they do not take any bandwidth.
Without cache, the link from the university’s gateway to school A’s gateway can be modelled as an M/M/1 queue, where
the arrival rate is 500 packets per second, and the service rate is 5×10
6
8000 = 625 packets per second. The queueing delay can be
calculated as 1625−500 = 0.008s= 8ms. Similarly, the link from the university’s gateway to school B’s gateway and the university’s
access link can also be modelled as M/M/1 queues. (You need to find out the queueing delays by using the formula introduced
in week 1, i.e., 1µ−λ . You do not need to know how this formula is derived at this stage).
(1) Without cache, what is the average overall delay for each user to derive its requested webpage? (Only the propagation delays
and the queueing delays are considered. All other delays are ignored.)
(2) Now, caches can be installed at the school’s gateway, so that 10% of the original requests can be served by the schools’
proxies (proxies A and B). What is the average overall delay for each user to derive its requested webpage?
(3) Now, cache can be installed at the university’s gateway, so that 20% of the original requests can be served by the university’s
proxy (proxy U). What is the average overall delay for each user to derive its requested webpage?
(4) Now, caches can be installed at all gateways (proxies A, B, and U). a% of the original requests can be served by the schools’
proxies, and b% of the original requests can be served by the university’s proxy. However, due to the limited storage owned by the
university’s ICT department, we have 2a%+ b% ≤ 20%. Calculate the average overall delay for each user to derive its requested
webpage as a function of a and b and find the optimal a and b. (Note, a% and b% are defined with respect to the original requests,
do not use (1−a%)(1−b%), but to use (1−a%−b%) to calculate the rest of the requests served by the original Internet servers).
3Question 3 (P2P Tit-for-Tat, 18%). As shown in the figure below, A and B are communicating with their top-4 partners in a
BitTorrent system. A’s uploading and downloading data rates of the ith partner are ui and di respectively; B’s uploading and
downloading data rates of the ith partner are u′i and d

i respective. For i = 1, 2, 3, 4, ui, u

i, di, d

i are randomly distributed. They
are independent random variables, following uniform distribution in [0, 1] Mbps.
Now A optimistically unchoked B, with a sending data rate of rab. rab is a random variable, independent of ui, u′i, di, d

i. It
follows uniform distribution in [0, 1] Mbps. If A becomes a top-4 sender of B, B will start to serve A with a sending data rate
of rba = rab.
What is the probability that both A and B find each other a top-4 sender? Show your mathematical derivations.
!!
"!
""
!"
"#
!#
"$
!$
!#! "#!
!#" "#"
!##
"##
!#$
"#$
$
%
&%&
&&%
4Question 4 (TCP and max-min fairness, 16%). In this task, you will investigate the performance of TCP and discuss if max-min
fairness can be achieved. (In the lecture, we have already discussed the simple case where two TCP sessions are sharing one link.)
! " #
$%&&'() * $%&&'() +
$%&&'() ,
The network topology is shown above. Three TCP sessions (1, 2, and 3) are sharing the A−B and B − C links. TCP session
1 passes A − B; TCP session 2 passes B − C; and TCP session 3 passes A − B − C. TCP Reno is employed for each TCP
session. The link capacity of A−B and B −C are 3.2 Mbps. Each TCP packet size (MSS) is 1000 bytes. We assume that the
RTTs of TCP sessions 1, 2, and 3 are 100 ms, 100 ms, and 100 ms respectively. As discussed in the lecture, if the sum data
rate of TCP sessions passing a link exceeds the link bandwidth, the link is congested and all TCP sessions passing the link will
be “multiplicatively decreased”. If a TCP session does not pass any congested link, then it will be “additively increased”. Hint:
you may use cwndRTT . cwnd may not be an integer in MSS.
(1) At the beginning, the windows sizes (cwnd) of TCP sessions 1, 2, and 3 are 10MSS, 5MSS, and 1MSS respectively. Draw
a figure to show cwnd vs time of the three TCP sessions. After a sufficient amount of time, can the average data rates of the
TCP sessions realise max-min fairness? You may use Python/excel to plot the figure. Repeat the the above steps if the initial
windows sizes (cwnd) of TCP sessions 1, 2, and 3 are 1MSS, 5MSS, and 10MSS respectively.
(2) Repeat (1) if the RTTs of TCP seasons 1, 2, and 3 are 100 ms, 100 ms, and 200 ms respectively.
5Question 5 (Wireshark Experiment, 15%). In this task, you will run a Wireshark experiment. Please follow the following
procedure and answer questions.
Please note that you will need to connect to VPN if you are not on campus. Both FortiClient and Cisco AnyConnect are available.
You need to choose the correct interface in Wireshark indicating the VPN you are using. Otherwise, you cannot see the correct
packets captured.
You are only allowed to use one of the following web browsers: Google Chrome, Firefox, Safari, or Microsoft Edge. Please
update it to the latest version.
1) Open a web browser. Clear the cache of the browser.
2) Start up the capture of Wireshark packet sniffer.
3) Enter the following URL into your browser.
http://wbserver.cs.usyd.edu.au/A1.html
4) Your browser should display text and two images.
5) When the images are completely loaded, enter the following URL into your browser
http://wbserver.cs.usyd.edu.au/A2.html
6) When the images are completely loaded, refresh your browser (e.g., press F5).
7) When the images are completely loaded, stop Wireshark packet capture.
Questions
(0) What is the time (date, hour, and minute) that you capture the packets? What is the web browser you use to complete this
question? You will get 0 mark in Question 5 if you do not provide the time and browser.
(1) What is the IP address of the server that sends you the base web page?
(2) What is the IP address of the server that sends you the images?
(3) Is non-persistent HTTP or persistent HTTP employed? Why?
(4) What are the sizes of the images? How do you know that? You can only use the information provided by Wireshark capture.
(5) In step 3), your browser has downloaded the images for the first time. These images may or may not be re-downloaded again
in the following steps. In step 5), did you browser send the request for the images? If so, did the server send back the images
to your browser again? In step 6), did you browser send the request for the images? If so, did the server send back the images
to your browser again? (To answer these two questions, you should give screen-shots.)
(6) Now you need to have a close investigation of the first image you have downloaded (when you download the image USYD.jpg
for the first time). Locate the first four bytes of the image (.jpg file) in Wireshark. Screenshot the packet and location of the
first four bytes shown by Wireshark. Locate the last four bytes of the image (.jpg file) in Wireshark. Screenshot the packet and
location of the last four bytes shown in Wireshark.
To help you locate the bytes, you may consider to convert the original .jpg file into a byte-stream format. You may use the
following website https://www.onlinehexeditor.com/ to do so.
(7) Following (6), which one of the following statements is correct when you download USYD.jpg for the first time. Give your
screenshots to justify your answer.
(a) The image is downloaded by a single packet.
(b) The image is downloaded by multiple packets and the last packet includes HTTP response (200 OK) and the last portion of
the image.
(c) The image is downloaded by multiple packets. The last packet includes the last portion of the image. Then, an HTTP response
(200 OK) is received in a separate packet.
6Question 6 (DNS, 15%). Consider the network shown below. In the figure, DNSA is A’s local and authoritative DNS server and
DNSB is B’s local and authoritative DNS server. TLD is the TLD DNS server of .com. Assume that the one-way propagation
delay through each network (shown as clouds in the figure) is labled in the figure. The cached resource records at each host are
listed in the table below. “.” means the root DNS server.
!"#$
%"#$ &"#$
!&"#$%'"#$
!"#$
(
)*+(
)*+,
,
-.)
/001
! "#$%!&'()!'&*+#,!-.!'**,)$$! /'01)*!,)0#,*$!
2##%! 34534534534! 650#(7!*&$50#(7!89:!
6*&$50#(7!;<;5;<;5;<;5;7!=:!
>[email protected]!A#,!50#(! ;<;5;<;5;<;5;! 6$B*&)B50#(7!*&$5$B*&)B50#(7!89:!
6*&$5$B*&)B50#(7!<<45<<45<<45;7!=:!
60#(CDE;350#(7!*&$50#(CDE;350#(7!89:!
6*&$50#(CDE;350#(7!;;;5;;;5;;;5;7!=:!
@89=!A#,!
5$B*&)B50#(!!
*&$5$B*&)B50#(!
<<45<<45<<45;!
657!*&$57!89:!
6*&$57!345345345347!=:!
650#(7!*&$50#(7!89:!
6*&$50#(7!;<;5;<;5;<;5;7!=:!
6$%F*)&%5$B*&)B50#(7!<<45<<45<<45<<47!=:!
@89G!
A#,!50#(CDE;350#(!
;;;5;;;5;;;5;!
*&$50#(CDE;350#(!
6$B*&)B50#(7!*&$5$B*&)B50#(7!89:!
6*&$5$B*&)B50#(7!<<45<<45<<45;7!=:!
650#(7!*&$50#(7!89:!
6*&$50#(7!;<;5;<;5;<;5;7!=:!
657!*&$57!89:!
6*&$57!345345345347!=:!!
6$)()$%),<4<;50#(CDE;350#(7!
;;;5;;;5;;;5;;;7!=:!
=! $%F*)&%5$B*&)B50#(!
<<45<<45<<45<<4!
8#&)!
G! $)()$%),<4<;50#(CDE;350#(!
;;;5;;;5;;;5;;;!
8#&)!
!
(1) How long does host A take to resolve the IP address of host B when address resolution is done iteratively? Why?
(2) How long does host B take to resolve the IP address of host A when address resolution is done iteratively? Why?
Hint: You may not need to visit a DNS server as long as the requested information is already available.

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

Email:51zuoyejun

@gmail.com

添加客服微信: ITCSdaixie