Last update: 10/2/2017
Exercise #3 - Please complete these questions and turn in to handin by class time on Friday.
The objective of this exercise is to get you familiar with the content in the three handwritten PDFS pointed to on our class web page- they are listed on 9/25 as Defining RTT, UDPEchoLossRate, and Probability/stats related to UDPEcho.
Question 1 Look at the PDF defining the RTT
Solution: The amount of data sent over each link (i.e., the frame size size) is: 1058 bytes. ( [26 byte mac header + 20 byte IP header + 8 byte UDP hdr + 1000 app bytes])
We will further assume the links are symmetric which means the data rate and propagation times are the same in both directions.
So let's compute the one-way delay, and the RTT would just be double the value.
One way latency= time over Link 1 + time over Link 2
Time over Link 1: Tx time + propagation delay = 1058*8/100,000,000 + 100* 0.000001 = 0.00008464 + 0.001 = 0.000185 seconds
Time over Link2 : Tx time + prop delay = 1058*8/1000000 + 0.01 = 0.008464 + 0.01 = 0.018464 seconds
Total one way delay= Sum of Time over Links 1 and 2 = 0.01865 seconds
Expected RTT : 0.0373seconds or 37.3 ms.
Question 2 Look at the PDF UDPEcho loss rate
Solution:
UDPEcho will detect loss at a network level by observing the sequence numbers or by the client timeout. To implement recovery, the client would simply retransmit the message when a timeout occurs.So let's say the client sends messages 1 - 5 successfully, sends 6 but this is dropped in the network. Nothing else happens until the client times out. It would then retransmit 6. A stop and wait protocol is very simple but it is very inefficient.
The second question uses an example where 10 messages are sent, but only 6 are received. This example actually applies for both modes of the UDPEcho program. After the 10 messages are sent, if we were to issue a CNT-C at the server, the server would have observed total number received of 6 and the largestSeqRxed (the largest sequence number that was received) is 9. The server would calculate a loss rate of (9-6)/9=0.33 which is inaccurate due to the last message was dropped.
Question 3 Look at the PDF related to Probability UDPEcho
Solution: Applying the binomial probability law, we want the probability of 6 successes out of 10 trials. : (10!/(6!4!))pexp6(1-p)exp4
What is p? So could use a measured loss rate. The point of this example is that it's easy to apply a standard probability model such as the binomial model but we need to know what we are doing!! In this case, we do not have enough samples to obtain an accurate estimate of p- hence the answer to this specific question would be inaccurate.
And actually, I had intended the question to be compute the probability of 4 packets dropped out of 10....