iPerf3 is a common networking measurement tool with a variety of options, allowing for testing bandwidth, delay, and packet loss on IP enabled links. iPerf3 can test either TCP or UDP links. For a successful test the Experimenter needs to set the two end measurements in client-server pairs, and start the server side first.
The sample code for initiating a iPerf traffic is located in:
/root/Profiles/ProfileScripts/Traffic/Samples/startIperf.sh
By default, a TCP connection with iPerf3 is run for five minutes.
According to the instructions for running sample applications, the best way to use iPerf is to copy the script to the startTraffic.sh script (again, in client-server pairs):
$cp /root/Profiles/ProfileScripts/Traffic/Samples/startIperf.sh /root/Profiles/ProfileScripts/Traffic/startTraffic.sh
Edit the iPerf scripts in /root/Profiles/ProfileScripts/Traffic/Helpers/startIperfClient.sh and ./startIperfServer.sh to change the duration, destination, traffic type, or any of the many options available for this tool.
IPERF_DURATION is the time iPerf traffic will be generated. By default the value is 300 seconds (5 minutes).
-u flag on both the client and the server forces UDP traffic instead of the default TCP traffic.
-R flag on the client forces the traffic to flow from the server to the client
The current client script is setup to first verify the reachability, via a specified interface, of the destination IP address before starting the traffic. The destination IP defaults to 172.16.0.1, but is automatically found if an interface is specified.
The script should be run as follows in /root/start_experiment.sh
./startTraffic.sh <server | client> [interface_name]