辅导COMP 5416程序、 写作Python程序设计

” 辅导COMP 5416程序、 写作Python程序设计COMP 5416 Assignment 1 (2020)Due: 7/OCT/2020, 23:59pm, Sydney timeQuestion 1 (Delay, 18%). As shown in the figure below, a file of size F = 1000 + S bytes is transmitted on an end-to-endconnection over three links, where S is the last three digits of your student number. For example, if your student number is490123456, 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 processingdelays at each node.)(0) What is your student number? Warning: If you use another students number as S value to answer the question, the followingsub-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 becomes 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. Assumethat 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 overalldelay.Hint: Since the link B C has a smaller bandwidth compared with A B, packets could be queued for some time!$ % 2Question 2 (Equilibrium of Two Competing Transmissions, 18%). Consider the following scenario where two mobile phonesare competing to use the save channel (same scenario as Tutorial 1, Exercise 1).!#$!#$ 辅导COMP 5416作业、 写作Python程序设计作业The utilities are as follows. (The two users have different utilities when its transmission is successful). Mixed strategy is used.User 1 transmits with probability p1 and user 2 with probability p2. p1 and p2 are non-zero.!# $#()!#$$()*)(+*#+$#()!#$( )**+ ,*$(!#$( -./0./1 -203/1)**+ ,*$(4 -32021 -2021(1) If the two users are selfish, compute the transmission probabilities of the two users at equilibrium. What are the utilities ofthe two users at equilibrium?(2) If the two users are cooperative and p1 = p2, compute the max average utility of two users, i.e., 0.5average utility of user1 + 0.5average utility of user 2. What is the value of p1 (i.e., p2) when the average utility of two users is maximized?3Question 3 (P2P Performance, 18%). A P2P system is shown below. There are N peers in the system. us is the server uploadcapacity. di and ui are the download and upload capacity of the ith peer. F is the size of the file to be distributed. Let F = 10106bits, us = 2 106 bps, For any user i, di = 2 105 bps and ui = 105 bps.(1) What is the overall delay Dcs to distribute the file from the server to all peers if client-server mode is used? What is thedelay Dp2p if P2P mode is used? Draw a figure of Dcs and Dp2p under different N where N is from 1 to 50. Discuss Dcs andDp2p if N .(2) Now we assume peers have different upload capacity. Let ui =105ibps for the ith peer. All other parameters are not changed.Draw a figure of Dcs and Dp2p under different N where N is from 1 to 50. Discuss Dcs and Dp2p, if N .Question 4 (P2P Tit-for-Tat, 18%). As shown in the figure below, A and B are communicating with their top-4 partners in aBitTorrent system. As uploading and downloading data Rates of the ith partner are ui and di respectively; Theyare independent random variables, following uniform distribution in [0, 1] Mbps.Now A optimistically unchoked B, with a sending data rate of rab. If A becomes a top-4 sender of B, B will start to serve Awith a sending data rate of rba. rab and rba are independent random variables, following uniform distribution in [0, 1] Mbps.What is the probability that both A and B find each other a top-4 sender? Show your mathematical derivations.Question 5 (Wireshark Experiment, 18%). In this task, you will run a Wireshark experiment. Please follow the followingprocedure 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 correctpackets captured.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. https://wbserver.cs.usyd.edu.au/A1.html4) Your browser should display text and An image.5) When the image is completely loaded, enter the following URL into your browser https://wbserver.cs.usyd.edu.au/A2.html6) When the image is completely loaded, refresh your browser (e.g., press F5).7) When the image is completely loaded, stop Wireshark packet capture.Questions(0) What is the time (date, hour, and minute) that you capture the packets? You will get 0 mark in Question 5 if you do notprovide the time.(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 image?(3) Is non-persistent HTTP or persistent HTTP employed? Why?(4) What is the size of the image. How do you know that? You can only use the information provided by Wireshark capture.(5) In step 3), your browser has downloaded the image for the first time. This image may or may not be re-downloaded againin the following steps. In step 5), did you browser send the request for the image? If so, did the server send back the image toyour browser again? In step 6), did you browser send the request for the image? If so, did the server send back the image toyour browser again? (To answer these two questions, you should give screen-shots.)(6) Now you need to have a close investigation of the image you have downloaded (when you download the image for the firsttime). Locate the first four bytes of the image (.jpg file) in Wireshark. Screenshot the packet and location of the first four bytesshown by Wireshark. Locate the last four bytes of the image (.jpg file) in Wireshark. Screenshot the packet and location of thelast 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 thefollowing website httpss://www.onlinehexeditor.com/ to do so.(7) Following (6), which one of the following statements is correct. 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 ofthe 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 (Socket Programming, 10%). In this question, you are required to build a UDP client to the server using hostnamewbserver.cs.usyd.edu.auand port number 12001. You client should be able to send a message to the server and receive a response message from theserver. The length of your message is limited to 100 characters. Your client must be in Python 3.Still, please note that you will need to connect to VPN if you are not on campus. Both FortiClient and Cisco AnyConnect areavailable. You need to choose the correct interface in Wireshark indicating the VPN you are using. Otherwise, you cannot seethe correct packets captured.(0) What is the time (date, Hour, and minute) that you complete this question? You will get 0 mark in Question 6 if you do notprovide the time.(1) Send your Student number (as a string encoded by utf-8) to the server and find the response message from the server.(2) Use Wireshark to capture the response packet. Screenshot the packet.(3) What is the IP address of the server? How does your computer know this IP address. Capture the packet that translates tothe IP address. Give your screenshot.如有需要,请加QQ:99515681 或邮箱:99515681@qq.com

添加老师微信回复‘’官网 辅导‘’获取专业老师帮助,或点击联系老师1对1在线指导