关键词 > COMP3234B/ELEC3443B

COMP3234B Computer and Communication Networks 2022

发布时间:2022-02-24

Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

COMP3234B Computer and Communication Networks

ELEC3443B Computer Networks

2022

Question 1 (0.8 points) (This question is related to ILO1 – “be able to explain the terminologies of computer networks” and ILO2 – “be able to describe the working principles behind protocols used in modern computer       networks”.)

When comparing statistical multiplexing with synchronous TDM, you would find that we need to add a header and there may be a length field in the header. Explain

i)      (0.4) why a header is needed, and

ii)     (0.4) why a length field may be needed.

 

Question 2 (0.8 points) (This question is related to ILO1 – “be able to explain the terminologies of computer    networks” and ILO3 – “be able to calculate packet delay, throughput, and channel efficiency according to different network protocols”.)

a)   (0.4) Consider two hosts A & B connected by a point-to-point link with a data link rate of 1 Gb/s and signal propagation speed 2 × 108  m/s. What would the distance of the link           (between two hosts) be to exactly contain one 800-byte packet?

b)   (0.4) Consider two hosts C & D connected by a point-to-point link with a data link rate of 10 Gb/s. The hosts are 2 km apart and the signal propagation speed is 2 × 108  m/s. Given the  packet size is 500 bytes, how many packets can be in inflight from C to D?

 

Question 3 (1.9 points) (This question is related to ILO1 – “be able to explain the terminologies of computer    networks” and ILO3 – “be able to calculate packet delay, throughput, and channel efficiency according to different network protocols”.)

In ConcepTest 1 Q7, we learned about how to estimate the latency of a data flow with 3 (fixed- size) packets along a path with 3 stages (of equal distance apart). Let’s extend the analysis.

a)   (0.8) Consider the following packet-switched network with two hosts (A and B) connected by three physical links with two store-and-forward switches in between (as shown below).

 

This network supports a packet size of 1044 bytes (payload - 1024 bytes and header - 20 bytes) and the signal propagation speed is 2 × 108  m/s. Determine how long it will take to transfer a file of size 102400 bytes across this network. Ignore the switch's processing delay

and assume no other traffics is using the network. Also assume that the packets can be sent continuously (i.e. in back-to-back) and reliability is not a concern so acknowledgment will not be needed.

b)  To reduce the cost, the engineer decides to use a slower link (2 Mb/s) to connect the two switches (as shown below).

 

As in part (a), this network supports a packet size of 1044 bytes. Ignore the switch's processing delay and assume no other traffics is using the network. Further assume that the switches have a sufficient amount of buffers to temporarily store the packets without packet overflow.

i)    (0.3) Use the bottleneck throughput model (and ignore propagation delay), estimate how long it will take to transfer the same file across this network.

ii)   (0.8) Similar to part (a), use the performance model to determine how long it will take to transfer the same file across this network.

 

Question 4 (1.5 points) (This question is related to ILO2 – “be able to describe the working principles behind key protocols used in modern computer networks”.)

a)   (1.0) One of the assumptions of the rdt3.0 protocol is the network does not deliver packets   out of order. Use a diagram (like slides 20 & 21 of Lecture note 03b-Transport-S&W.pdf) to   show how packet reordering would make the rdt3.0 protocol not work correctly. Make sure you label all the packets with the type (Data or Ack) and the sequence number. Briefly            explain the diagram. (Hint: Thinking about how the protocol reacts to a delayed packet due  to misrouting.)

b)   (0.5) Now suppose that the network with a data rate of R b/s can deliver out of order and  that the longest time a packet can be delivered is as much as 10 seconds after subsequent packets. Assume all packets are of size L bytes. Given the above information, how would    you adjust the sequence number requirements to make rdt3.0 work correctly on this          network?

 

Question 5 (2 points) (This question is related to ILO1 – “be able to explain the terminologies of computer networks” and ILO4 – “be able to demonstrate knowledge in using Socket Interface”.)

This question is about implementing a PingPong program using UDP protocol. You are required to write a network program, called UDPpp.py that runs over UDP to measure the Round-trip     time (RTT) between two machines. As UDP is relatively reliable over a local area network,           reliability is not a concern.

This program can act as a sender or a receiver, which depends on the invoking command-line argument. To measure the RTT between two machines, we start a receiver process in one       machine and then start the sender process in another machine.

To run the program as a receiver, execute the program without any arguments: python3 UDPpp.py

To run the program as a sender, execute the program with one argument, which gives the    hostname or IP address of the receiver process: python3 UDPpp.py 192.168.0.177                  The sender process will send ten 4-byte UDP segments to the receiver. Before sending each UDP segment, the sender measures the starting timestamp using time.perf_counter() function, then sends the UDP segment and waits for the echo to be back. After that, it           measures the receiving timestamp. The sender process calculates the RTT value (in                 milliseconds) and outputs it to the display before the next cycle.

The receiver process expects to receive ten UDP segments. Once it receives a segment, it immediately sends back the segment to the sender.

Here are the outputs of two test runs between a Windows PC and a Mac notebook.

OSX

Windows

$ python3 UDPpp.py

> python UDPpp.py 192.168.0.197

192.168.0.197:

192.168.0.197:

192.168.0.197:

192.168.0.197:

192.168.0.197:

192.168.0.197:

192.168.0.197:

192.168.0.197:

192.168.0.197:

192.168.0.197:

$ python3 UDPpp.py 192.168.0.148

192.168.0.148:

192.168.0.148:

192.168.0.148:

192.168.0.148:

192.168.0.148:

192.168.0.148:

192.168.0.148:

192.168.0.148:

192.168.0.148:

192.168.0.148:

> python UDPpp.py

Name the program UDPpp.py and submit it to the Course’s Moodle page. Please use a port   number (for the receiver process) under your assigned port number range to avoid port        number conflict among classmates while testing your program on the department’s servers. (You can hard-code the port number in your code; for port numbers assigned to you, please refer to https://moodle.hku.hk/mod/page/view.php?id=2485980)