首页 > > 详细

讲解 COMP3331/9331 — Computer Networks and Applications Term 1, 2023 Mid-term Examination讲解 R编程

COMP3331/9331 — Computer Networks and Applications

Term 1, 2023

Mid-term Examination

Suppose a number of users share a 4 Mbps link. Also, suppose that each user transmits continuously at 2 Mbps when transmitting, but each user transmits only 20% of the time.

Answer the 3 questions.

1   When circuit switching is used, how many users can be supported? No explanation is required. Simply enter the numeric value in the space provided:  

Maximum marks: 0.25

2    Now suppose packet switching is used. Why will there be essentially no queuing delay before the  link if two or fewer users transmit at the same time? Why will there be queuing delay if three users transmit at the same time? Be brief (2 sentences at most for each question).

Maximum marks: 0.75

3   Suppose with packet switching, there are three users. Find the probability that at any given time, all three users are transmitting simultaneously. No explanation is required.Simply enter the numeric value in the space provided:

Maximum marks: 0.5

Consider the network in the figure below. Host A can choose between two different paths to communicate with host B. Host can choose to send packets via either

Router 1 or Router 2 to host B. The communication links are of two different types, as indicated in the figure. The characteristics of these two types of links are:

Link type 1: Each link is of length 2000km, propagation speed is 2 x 108  m/s and bandwidth is 100kbps.

Link type 2: Each link is of length 4000km, propagation speed is 2 x 108 m/s and bandwidth is 50kbps.

Host A wishes to transmit a message of size 4Kbytes to host B. It breaks this

message into 4 packets of equal size. Neglect any packet headers. Remember that routers work on the store-and-forward principle.

Assume that the processing delay and queuing delay in the routers are negligible.   You may also approximate file sizes to be an order of 10 (i.e. 4Kbytes = 4000 bytes instead of 4096 bytes).

4    If host A chooses to send the packets via Router 1, determine the time it takes to move the

packets from host A to host B, i.e., beginning from the time that host A starts to send the first bit of the first packet till the time that host B receives the last bit of the last packet.

You are encouraged to draw a timing diagram to help you visualise the delays. However, you are NOT required to upload such a diagram with your answers.

Do not simply write the final answer. Show us your work (just type it in the space provided).

Maximum marks: 2

5    Now assume that host A chooses to send the packets via Router 2 to host B.  Determine the time  it takes to move the packets from host A to host B, i.e., beginning from the time that host A starts   to send the first bit of the first packet till the time that host B receives the last bit of the last packet.

You are encouraged to draw a timing diagram to help you visualise the delays. However, you are NOT required to upload such a diagram with your answers.

Do not simply write the final answer. Show us your work (just type it in the space provided).

Maximum marks: 2

Assume a webpage comprised of 10 objects which includes the index.html file, 8 embedded images and one embedded audio clip. The 10 objects are so small that: (i) their transmission time is negligible and (ii) each object can be completely transmitted in one TCP segment.  Consider a client wishing to download the webpage.

You are asked to make the following assumptions:

·   the roundtrip time between the client and all servers is T

·   the time to set up and tear down a TCP connection is S and F, respectively. You must account for both these times in your computations. Note

that, S includes the 3-way handshake (SYN, SYN-ACK, ACK) and F includes

the time for sending FINs and ACKs from both endpoints.

  there are no packet losses.

·   the client knows the IP address of all servers (i.e. neglect DNS resolution delay).

   neither the client nor any of the servers support parallel TCP connections.

Answer the following 5 questions. No explanations are required. Simply write the expression for each answer which should ONLY contain thevariables T, S and F (e.g., 20T+100S+50F) in the space provided.

6   Assume that the client uses non-persistent HTTP for downloading the web page. What is the time required to complete the transfer of the web page (including the time for setting up and tearing down each TCP connection involved)?

Maximum marks: 0.6

7   Assume that the client uses persistent HTTP without pipelining for downloading the web page.    What is the time required to complete the transfer of the web page (including the time for setting up and tearing down each TCP connection involved)?

Maximum marks: 0.6

8   Assume that the client uses persistent HTTP with pipelining for downloading the web page. What  is the time required to complete the transfer of the web page (including the time for setting up and tearing down each TCP connection involved)?

Maximum marks: 0.6

9    Now assume that all 10 objects are located on 10 different servers (one object on each server).     The client can only have one active TCP connection at any given time. Assume that the roundtrip time between the client and each of the 10 servers is T. Neglect DNS queries. Assume that the client uses persistent HTTP with pipelining for downloading the web page. What is the time required to complete the transfer of the web page (including the time for setting up and tearing down each TCP connection involved)?

Maximum marks: 0.6

10    Now assume that the index page and 7 embedded images are on one server, while the

remaining image and audio clip are on another server.  The client can only have one active TCP connection at any given time. Assume that the roundtrip time between the client and both

servers is T. Neglect DNS queries. Assume that the client uses persistent HTTP with pipelining for downloading the web page. What is the time required to complete the transfer of the web page (including the time for setting up and tearing down each TCP connection involved)?

Maximum marks: 0.6

Three users are logged into the workstations user1.unsw.edu.au, user2.unsw.edu.au and user3.unsw.edu.au, respectively, all located inside UNSW's network.

The UNSW network has -

(i) a web server offering www.unsw.edu.au

(ii) a web proxy proxy.unsw.edu.au. All workstations have the hostname (not IP address) of the proxy server configured in their browsers.

(iii) a  DNS name server ns.unsw.edu,.au which is the authoritative server for the

unsw.edu.au domain. This name server also serves as the local DNS servers for all machines on the UNSW network.

Make the following assumptions:

  All DNS servers and workstations maintain DNS caches. Once a record is cached it will remain for the remainder of this multi-part question.

  Web browsers and web proxies perform. caching. Once an object is cached it remain for the remainder of this multi-part question.

   Before serving a cached object, the proxy will check with the origin server if the object has been updated.

   None of the objects are ever updated at the origin server.

  All caches (HTTP and DNS) are initially empty.

   None of the hosts have IP addresses for the web proxy and the web server.   All DNS requests are resolved iteratively

  Application layer messages fit in one packet

·   The browsers and proxy use persistent HTTP without parallel connections (HTTP 1.1).

·   For simplicity, assume nobody else is generating traffic on the Internet.

Answer the following two questions.

11

User 1 types http://www.unsw.edu.au/index.html in his browser. The only object referenced by the index file is the image http://www.unsw.edu.au/image.png.

List all packets that are exchanged in the entire network, including any TCP connection setup packets, by completing a table similar to one shown below.

For each packet, show the source and destination hostname, the transport-layer protocol, the  application-layer protocol, and the purpose of the packet, as in the example. You may assume that the lastACK in the TCP connection setup is piggybacked (combined) with the first data segment. You do not need to show the TCP connection teardown process. You should assume that all persistent connections are closed before the start of the next question.

Here is an example which shows the details for a packet that is not related to this question

Packet

Source hostname

Destination

hostname

Application protocol

Transport protocol

Purpose

1

user46.unsw.edu.au

www.opeth.com

HTTP

TCP

Get request for

www.tool.com

The menu of the answer window below has an option to create a table. Create a table with 6 columns (as shown in the example above) and several rows (e.g, a large number like 20, you  may not require all 20 rows). Each row should depict a packet. The packets should be listed in the chronological sequence in which they are generated.

Maximum marks: 2

12

User 2 types http://www.unsw.edu.au/index.html in her browser. In other words, user 2 is accessing the same webpage as User 1.

List all packets that are exchanged in the entire network, including any TCP connection setup packets, by completing a table similar to one shown below.

For each packet, show the source and destination hostname, the transport-layer protocol, the  application-layer protocol, and the purpose of the packet, as in the example. You may assume that the lastACK in the TCP connection setup is piggybacked (combined) with the first data segment. You do not need to show the TCP connection teardown process.

Here is an example which shows the details for a packet that is not related to this question

Packet

Source hostname

Destination

hostname

Application protocol

Transport protocol

Purpose

1

user46.unsw.edu.au

www.opeth.com

HTTP

TCP

Get request for

www.tool.com

The menu of the answer window below has an option to create a table. Create a table with 6 columns (as shown in the example above) and several rows (e.g, a large number like 20, you  may not require all 20 rows). Each row should depict a packet. The packets should be listed in the chronological sequence in which they are generated.

Maximum marks: 2

13    BitTorrent uses a "tit-for-tat" incentive mechanism for selecting peers to whom a particular peer would upload chunks. Consider a peer who has finished downloading the file but wishes to

continue seeding the file to other peers (i.e. continue uploading chunks of that file) participating in the torrent. Will "tit-for-tat" still be useful for this peer? Explain why or why not in 2-3 sentences.  Answers without explanations will not receive marks.

Maximum marks: 1

14   Which of the following is true about how TCP implements reliable data transfer? (Multiple choices may be correct. Selecting additional choices beyond those that is/are correct will be considered    as incorrect)

Select one or more alternatives:

TCP may retransmit packets upon receiving duplicate acknowledgements

TCP uses multiple timers

TCP may retransmit packets upon timer timeout events

TCP receiver always transmits acknowledgement immediately upon receiving a data packet

TCP uses cumulative acknowledgements

Maximum marks: 0.75

15    Host A sends a 128-byte TCP segment carrying a sequence number of 100 to Host B. Host B   receives it correctly and sends an ACK to Host A. What is the acknowledgement number in the ACK?

Select one alternative:

 228

 226

 227

 101

Maximum marks: 0.75

Consider the picture below. Process P3 on the host with IP address X has set up a    TCP connection with process P4 on the server with IP address Y. Process P2 on the host with IP address Z has set up a TCP connection with process P5 on the server with IP address Y. There are no other TCP connections open at the server.

4 TCP segments S1 - S4 are shown in the picture. The source and destination IP

addresses and port numbers for S1, S3 and S4 are noted. S1 is sent by P3 to P4, S2 is sent by P4 to P3 and S3 is sent by P2 to P5.

Answer the 5 following questions.

16   What is the source IP address for TCP segment S2? No explanation needed.

Maximum marks: 0.25

17   What is the source port number for TCP segment S2? No explanation needed.

Maximum marks: 0.25

18   What is the destination IP address for TCP segment S2? No explanation needed.

Maximum marks: 0.25

19   What is the destination port number for TCP segment S2? No explanation needed

Maximum marks: 0.25

20   Consider TCP segment S4 sent by process P1. Assume that S4 contains data. Describe what happens to this segment and why? 2-3 sentences should be sufficient.

Maximum marks: 1

21    NOTE: THIS QUESTION IS NOT ABOUT TCP. IT FOCUSES ON THE GENERIC GO-BACK-N AND SELECTIVE PROTOCOL.

Host A communicates with Host B using sliding window piepelined protocols (GBN, SR) with

sender window size N = 5. The communication channel between A and B may drop packets and ACKS but  can neither reorder nor corrupt data packets and ACKs.

A sends a file to B. It does so by splitting the file in 10 packets with sequence numbers from 0 to 9. The file transfer is successful.

You may assume that there are never any premature timeouts at Host A.

Assume that the first four ACKs sent by B are all lost. No other packets or ACKs are lost.

Note down the sequence number of packets sent by host A in the order in which they were sent, including any retransmissions in the space provided below for

(i) Go-Back-N

(ii) Selective Repeat

An example answer (which does not match this question) could be:

Pkt 0

Pkt 1

Pkt 2

Pkt 2

Pkt 3

In the above,  Pkt 2 and Pkt 3 are retransmitted.

Hint: We recommend that you draw a timing diagram depicting the transmission of packets and   ACKs (similar to the lecture notes and textbook). You are NOT required to include this diagram in your answer.

Maximum marks: 3


联系我们
  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp
热点标签

联系我们 - QQ: 99515681 微信:codinghelp
程序辅导网!