联系方式

• QQ：99515681
• 邮箱：99515681@qq.com
• 工作时间：8:00-23:00
• 微信：codehelp

您当前位置：首页 >> Web作业Web作业

日期：2019-09-08 07:10

COMP 5416 Assignment 1 (2019)

Due: 7/Sep/2019 23:59

Question 1 (Delay). As shown in the figure below, a file of size F = 1000 bytes is transmitted on an end-to-end connection

over three links. 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.)

(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. 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!

Question 2 (Network Construction). Suppose that we have a network as shown in (a). Each link (A1A2, A2A3, B1B2, B2B3,

C1C2, and C2C3) has a bandwidth of 10 Mbps. Obviously, this network is disconnected (e.g., A1 cannot connect to B3). We want

to make the network fully connected, and we have two approaches to expand the network, as shown in (b) and (c) respectively.

In (b), each added link has a bandwidth of x Mbps. In (c), each added link has a bandwidth of y Mbps. We want to analyze

the performance of two approaches by analyzing their max min fairness. We have 9 flows sharing the network, starting at A1,

B1, and C1 and ending at A3, B3, and C3 respectively. Their routes in (b) and (c) are shown in the table below.

Flows Starting and ending nodes Flow routes in (b) Flow routes in (c)

1 A1, A3 A1 ? A2 ? A3 A1 ? A2 ? A3

2 A1, B3 A1 ? B2 ? B3 A1 ? A2 ? B2 ? B3

3 A1, C3 A1 ? B2 ? C3 A1 ? A2 ? B2 ? C2 ? C3

4 B1, A3 B1 ? B2 ? A3 B1 ? B2 ? A2 ? A3

5 B1, B3 B1 ? B2 ? B3 B1 ? B2 ? B3

6 B1, C3 B1 ? B2 ? C3 B1 ? B2 ? C2 ? C3

7 C1, A3 C1 ? B2 ? A3 C1 ? C2 ? B2 ? A2 ? A3

8 C1, B3 C1 ? B2 ? B3 C1 ? C2 ? B2 ? B3

9 C1, C3 C1 ? C2 ? C3 C1 ? C2 ? C3

(1) Suppose x = 10 in (b), what are the data rates of the 9 flows if max min fairness is achieved.

(2) Suppose y = 10 in (c), what are the data rates of the 9 flows if max min fairness is achieved.

(3) For (b) and (c), draw figures to show how data rates of the 9 flows change with respect to x or y, if max min fairness is achieved.

(4) From (3), discuss which solution, i.e., (b) or (c), is better? Why?

3

questions.

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://ec2-54-252-242-174.ap-southeast-2.compute.amazonaws.com/A1.html

4) Your browser should display text and an image.

5) When the image is completely loaded, enter the following URL into your browser

http://ec2-54-252-242-174.ap-southeast-2.compute.amazonaws.com/A2.html

6) 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 3 if you do not

provide 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.

in the following steps. In step 5), did you browser send the request for the image? If so, did the server send back the image to

your browser again? In step 6), did you browser send the request for the image? If so, did the server send back the image 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 image you have downloaded (when you download the image 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. Give your screenshots to justify your answer.

(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.

4

Question 4 (Socket Programming for Blackbox Probing). In this question, you are required to build a UDP client to test the

propagation delay and link bandwidth (capacity) of a black box shown in the figure below. The black box emulates an uplink,

a downlink, and a server. You need to build a UDP client using Python 3, to connect to the server using hostname

ec2-54-252-242-174.ap-southeast-2.compute.amazonaws.com

and port number 12004. You client should be able to send a message to the server and receive a response message from the

server. The length of your message is limited to 100 characters.

(0) What is the time (date, hour, and minute) that you complete this question? You will get 0 mark in Question 4 if you do not

provide 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) In the blackbox, suppose that the uplink and downlink have the same bandwidth (capacity). The propagation delays of the

uplink and the downlink are the same. Only transmission delays and propagation delays are considered. All other delays in

the system can be ignored (e.g., queueing and processing delays). Revise your client to obtain the propagation delay and link

the overall delay from sending a packet to receiving the response.)

Question 5 (DNS). Consider the network shown below. In the figure, DNSA is A’s local and AA DNS server and DNSB is

B’s local and AA 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.

Host name and/or IP address Cached records

Root 60.60.60.60 (.com, dns.com, NS)

(dns.com, 121.121.121.1, A)

TLD for .com 121.121.121.1 (sydney.com, dns.sydney.com, NS)

(dns.sydney.com, 220.220.220.1, A)

(comp5416.com, dns.comp5416.com, NS)

(dns.comp5416.com, 111.111.111.1, A)

DNSA for

.sydney.com

dns.sydney.com

220.220.220.1

(., dns., NS)

(dns., 60.60.60.60, A)

(.com, dns.com, NS)

(dns.com, 121.121.121.1, A)

(student.sydney.com, 220.220.220.220, A)

DNSB

for .comp5416.com

111.111.111.1

dns.comp5416.com

(sydney.com, dns.sydney.com, NS)

(dns.sydney.com, 220.220.220.1, A)

(.com, dns.com, NS)

(dns.com, 121.121.121.1, A)

(., dns., NS)

(dns., 60.60.60.60, A)

(semester2019.comp5416.com,

111.111.111.111, A)

A student.sydney.com

220.220.220.220

None

B semester2019.comp5416.com

111.111.111.111

None

(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.