In this programming assignment, you will implement a client process on eustis.eecs.ucf.edu and a server process on eustis2.eecs.ucf.edu, respectively, to communicate with each other. If you never SSH login to eustis and eustis2 machines, your account should has the usual NID as your username and password. If your computer is out of campus network, you need to first VPN to UCF then connect to Eustis machines.

You can use either C, C++, or Java, or Python to program this project. Eustis and eustis2 servers support all these programming languages.

Your client program and server program should operate as follows. Your server runs first on eustis2 machine waiting for your client to connect. The server should use a server port number choosing by yourself and must be bigger than 1024 (smaller than 65535). Your client runs next on Eustis machine.

Objective---UDP Pinger from client to server: This program will test the connection between the client and the server by sending Ping messages similar to the regular ICMP Ping that we use at the terminal/cmd. The client program sends 10 pings messages in lowercase format that include (ping, sequence#, datetime) to the server in order, and calculate a time of each ping (RRT). The server receive that ping messages, capitalize it, and send it back to the client. The server should loss packets within 30% or less and the client should retransmit the lost packet if it timeouts. The concept of retransmitting is to provide a rdt for UDP protocol such we cover in the transport layer rdt 1.0, 2.0, 3.0. The client should print out the send message, the received message, request time out message, the retransmission and the RTT for each messages. Also, the client needs to show statistics of this communication at the end which shows the MAX RTT, the MIN RTT, the AVG RRT, the percentage of lost messages, and the number of retransmitted messages.. Figure 1 below illustrates the communication between the client and cloud server where at the third message (for example) the server didn't reply to the client and the client retransmit the message after it wait sometime and reached the timeout.

Figure 1: see image.

Server side development:

We implemented a demo on how the server receive the massage, capitalize the letters and send it back. All you need is to use that python code that is provided and make the server ignore the request from the client randomly with a 30%. The connection should keep alive and no need to close it after the client finish communicating. You must print out a message that shows the client address and message #. Remember it will print all the retransmitted message (if lost occurred and client retransmit the message). Screenshot 1 shows below. When you see 4 twice and 8 twice, that means the receiver received that request but it didn't response to the client, so the client after the timeout flagged, it retransmit the same message again.

Screenshot 1: server side print out: see image.

Client side development:

You need to design the format of the message like [ping # datetime]. Also, you need to calculate the RTT of each message in order to retransmit the message when there is no response from the server. You need to print out the send message, the received message, request time out message (if occurred), the retransmission (if occurred), and the RTT for each messages. Below is a screenshot 2 of the outputs.

Since UDP is unreliable protocol, you might not getting the response from the server for some packets since its randomly not responding the request. On other word, your client might retransmit the message again and server discard your request multiple times which might cause noticed delay. Therefore, you might allow your client to try retransmit it at least 2-3 times and then move on. Then at the statistics you address that packet loss percentage (meaning no receiving at all). Screenshot 3 shows that the client retransmit 5 packets but only 1 packet completely lost (1/10= 10%)

Screenshot 2: Client side print out: see image.

Screenshot 3: Client side print out: see image.

Timeout and RTT:

The timeout means the time you set for waiting the response from the server and you take an action if there is no response. You should give the server 1 second and once no response (pkt lost) you retransmit the packet again. On the other hand, the round trip time (RTT) needs to be calculated for each message individually and then you can calculate the MAX, MIN, and AVG for all. You don't need include the timeout for lost packet with RTTs, they are separate things.

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.