https://linoxide.com/monitoring-2/install-iperf-test-network-speed-bandwidth/
You can get the latest version of iperf3 from http://downloads.es.net/pub/iperf using wget and extract it with tar.
wget http://downloads.es.net/pub/iperf/iperf-3.0.6.tar.gz
tar zxvf iperf-3.0.6.tar.gz
Then you just need to configure it and compile it like this: