Question: Write a C UDP client program that sends and receives messages. The purposes of this assignment are: To measure the average Round Trip Time (RTT)

Write a C UDP client program that sends and receives messages.

The purposes of this assignment are:

To measure the average Round Trip Time (RTT) between your client and my server

To estimate the amount of segment loss over some testing interval Your UDP client program will have to be modified to do these things:

It will have to send and receive, with these actions being asynchronous. This can be done with threads or with non-blocking I/O

It should measure the interval between sending a segment and receiving the segment back (if it comes back)

The program should compare the number sent with the number received to estimate the percentage of loss

I will run two instances of my echo server. The one on port 22200 will always send back what it receives. The one on port 22201 will randomly drop a specified percentage of received segments. The target address is given on Blackboard. Your client will not know this percentage and, to get full credit, you should compute it to within 1% of the actual value.

Here are some things to consider that will make your job easier. We will discuss these in class.

What is the best way to measure RTTs? How do we keep from getting false measurements when a segment does not come back?

Which units should be used for our time measurements?

Is the average RTT a good measure in itself or would some other statistical quantity make it easier to

interpret?

Does the RTT say anything about the One-way Trip times (OWTT)?

Can you think of key network parameter you could estimate by measuring the change in the spacing

between the sent segments and the received segments?

What happens if you send datagrams as fast as possible? Can you create loss even using the lossless

server? How should you modify your code in this situation?

The no-loss server on port 22200 is for testing your program. The measured RTT should be the same as when you run with the lossy server as your target. Submit your source code and the results of your programs computation of RTT and loss percentage.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!