Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

How to Run IPerf

Overview
This document explains on how to execute IPerf and interpret the results identifying
the root cause of poor network performance.

1 ISP Customer
TBD

2 FTTH Customer

2.1 Pre Setup

A new VLAN was created for the Pi testing across the infrastructure, VLAN XXX
The IPerf and SSH packages are already installed on the PI’s.

2.2 Setup Server and Client PI’s

If the PI’s were not setup before, make sure you registered the IP’s and add them to
the PRTG so we can monitor it’s status.

While configure the PI please


• Identify the Pi Server
o Assign the IP address via GUI
§ TBD
o Execute the daemon server on the Pi via CLI
§ iperf3 -sD

• Identify the Pi Client


o Assign the IP address via GUI
§ TBD
o Execute the daemon server on the Pi via CLI
§ iperf3 -sD

Change the default password of the root and pi users for pi4life

User management in Raspbian is done on the command line. The default user is pi,
and the password is raspberry. You can add users and change each user's password.

When logged in as the pi user, you can change your password with the passwd
command.
Enter passwd on the command line and press Enter. You'll be prompted to enter
your current password to authenticate, and then asked for a new password.
Press Enter on completion and you'll be asked to confirm it. Note that no characters
will be displayed while entering your password. Once you've correctly confirmed
your password, you'll be shown a success message (passwd: password updated
successfully), and the new password will apply immediately.

Before move on make sure you have access to the server and client PI’s using the
new password.

2.2.1 Setup PI VLAN on CTS

The CTS provide 6 ports, the uplink is using the port 6 (tesuco network) and port 5
for downstream where the CPE (wifi router) is connected. Port 1 is going to be used
for the PI testing, in access mode.

Setup the VLAN ID as XXX on the CTS, the Port members of the PI Testing VLAN must
be 1 and 6.

Setup the Default VLAN on port 1 for PI Testing VLAN


Don’t forget to save the changes otherwise the config is not persistence across CTS
reboots.

2.3 Setup Field Switch port config

It’s necessary to add the VALN to the Field switch where the CTS is connected
allowing the new VLAN on the trunk.

Interface Ethernet1/1/100
switchport trunk allowed vlan add XXX

2.4 Setup Scripts

Install the https://winscp.net/eng/download.php and login on the PI client

-c Client IP (Client sends the traffic to the server)


-u UDP testing (by default it uses TCP)
-t Timing
-I Interval report (sec)
-b Bandwidth (m=mbps)
-V Verbose
-logfile Logging file

The following example is going to be executed for 86400 seconds = 24 hours (-t
option) and get reports every second (-i option) using 100 mbps speed (-b option)
logging every 30 seconds (-i option) a report on the file test2.log (--logfile option)
under directory /tmp
The script is going to be rotated every 24 hours non stop, logging on the same file

Assuming the PI server IP 10.5.242.25 and the PI client 10.5.242.26

Copy the following script and save it as run_iperf.sh on the client, do the same for the
server but change the IP address. The traffic is forward to the IP defined on the -c
option, so if you need to test Upload the -c IP is the PI server and Download the PI
client.
#!/bin/bash
while true; do
/usr/bin/iperf3 -c 10.5.242.25 -u -t 86400 -i 30 -b 100m -V --logfile /tmp/test2.log
Done

To execute the script its required to change the permission of the script to 0777 as per
below

Since both PI’s are going to run in server mode, it’s possible to test the
Upload/Download between server and client changing the IP in the script (-c option).

2.4.1 How to execute the Script


Before executing the script remove any logs using the command

rm -f /tmp/*.log

The following command is going to execute the script in the background

pi@AT-DC:~ $ nohup ./run_iperf.sh > /dev/null 2>&1

To monitor the results in Live execute the following command on the Pi


pi@AT-DC:~ $ tail -f /tmp/test2.log | grep "0.00-30.00"

If you need to kill the process to change the script or stop it, you are going to need to kill the
process associated and also the iperf too. You must identify the PID of the iperf and execute
the command kill as per below.

pi@AT-DC:~ $ ps aux | grep iperf

pi@AT-DC:~ $ kill -9 process_id

2.5 Testing

2.6 Capture and Evaluate results

2.7 Terminate Test

After your tests are done, remove the VLAN from the trunk port with the customer
previously setup and shutdown the port 1 on the CTS.

Interface Ethernet1/1/100
switch port trunk allowed vlan remove XXX

2.7.1 FTTH Customer

You might also like