Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

[PYTHON] You are going to write a simple network benchmarking PYTHON program called netbench, which measures the network performance between two stations. This benchmarking program

[PYTHON] You are going to write a simple network benchmarking PYTHON program called netbench, which measures the network performance between two stations. This benchmarking program acts as both the server and the client that depends on the invoking command-line arguments. The program performs three sets of tests between the server and the client. For the first test, the program measures TCP transfer throughput between the server-client pair and then the client- server pair in sending large volume of data (2 108 bytes). For the 2nd test, the program measures TCP transfer throughput between the server-client and client-server pairs in sending small amount of data (10000 bytes). For the 3rd test, the program sends small UDP packets (of size 5 bytes) between the server-client pair and client-server pairs and reports the corresponding round-trip times.

Test 1 The program first sends a large volume of data (2 10^8 bytes) from the server to the client and the client sends back a small message (of size 5 bytes) to the server after it has successfully received the data. The server measures the elapsed time between the start of sending the data and the end of receiving a 5-byte small message. Then the server reports the elapsed time and the average throughput (2 10^8 bytes elapsed time) measured in Mb/s. Afterward, the server and client switch the role and report the measurement. Test 2 Same as test 1, but the program measures the average throughput in sending a 10000-byte message between the server-client and client-server pairs.

Test 3 For this test, the program switches to use UDP in the test. First, the program is going to send five 5-byte UDP messages from the server to the client. After sending each 5-byte message, the server waits for the echo to be back (which is sent by the client) before sending the next message. The program measures this round-trip time (RTT) and outputs it to the display before the next cycle. At the end of sending the five 5-byte messages, the program prints the average RTT time observed between the server and the client. Afterward, the server and client switch the role and report the measurement.

Other outputs Once the client and server are connected, they should display their network information. As it may take a while for sending 2 10^8 bytes data, it is nice to have a progress bar to show the progress of the transmission. It is up to you to design this visualization effect.

Sample program output:

image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

MongoDB Applied Design Patterns Practical Use Cases With The Leading NoSQL Database

Authors: Rick Copeland

1st Edition

1449340040, 978-1449340049

More Books

Students also viewed these Databases questions

Question

What is body cathexis?

Answered: 1 week ago