zperf: Network Traffic Generator¶
zperf is a shell utility which allows to generate network traffic in Zephyr. The tool may be used to evaluate network bandwidth.
zperf is compatible with iPerf_2.0.5. Note that in newer iPerf versions, an error message like this is printed and the server reported statistics are missing.
LAST PACKET NOT RECEIVED!!!
zperf can be enabled in any application, a dedicated sample is also present in Zephyr. See zperf sample application for details.
If Zephyr acts as a client, iPerf must be executed in server mode. For example, the following command line must be used for UDP testing:
$ iperf -s -l 1K -u -V -B 2001:db8::2
For TCP testing, the command line would look like this:
$ iperf -s -l 1K -V -B 2001:db8::2
In the Zephyr console, zperf can be executed as follows:
zperf udp upload 2001:db8::2 5001 10 1K 1M
For TCP the zperf command would look like this:
zperf tcp upload 2001:db8::2 5001 10 1K 1M
If the IP addresses of Zephyr and the host machine are specified in the config file, zperf can be started as follows:
zperf udp upload2 v6 10 1K 1M
or like this if you want to test TCP:
zperf tcp upload2 v6 10 1K 1M
If Zephyr is acting as a server, set the download mode as follows for UDP:
zperf udp download 5001
or like this for TCP:
zperf tcp download 5001
and in the host side, iPerf must be executed with the following command line if you are testing UDP:
$ iperf -l 1K -u -V -c 2001:db8::1 -p 5001
and this if you are testing TCP:
$ iperf -l 1K -V -c 2001:db8::1 -p 5001
iPerf output can be limited by using the -b option if Zephyr is not able to receive all the packets in orderly manner.