How to: install iperf2, iperf3, and zap on macOS

Prerequisite:

Install Xcode or at least Xcode Command Line Tools

  1. Launch the Terminal, found in /Applications/Utilities/
  2. Type (or copy and paste) the following:
xcode-select --install

iperf3 – installing iperf3 from the latest source code

Open terminal and enter the following commands:

sudo git clone https://github.com/esnet/iperf.git
cd iperf/
sudo ./configure
sudo make
sudo make install

Done! – To test it’s working:

iperf3 -v

To start iperf3 server:

iperf3 -s

To run an iperf test as the client:

iperf3 -c x.x.x.x <- iperf3 server IP

 


iperf2 – installing iperf2 from source code

First, download and extract the latest iperf2 source code from here: https://sourceforge.net/projects/iperf2/?source=typ_redirect

Open terminal and change directories to the location of the extracted iperf2 files, for example:

cd ~/iperf-2.0.9 $ ./configure $ sudo make $ sudo make install

Done! – To test it’s installed:

iperf -v

To start iperf2 server:

iperf -s

To run an iperf test as the client:

iperf -c x.x.x.x <- iperf2 server IP

Zap Wireless – installing Zap from source code

Open terminal and enter the following commands:

sudo curl -O https://storage.googleapis.com/google-code-archive-source/v2/code.google.com/zapwireless/source-archive.zip
sudo unzip source-archive.zip
cd zapwireless/trunk
sudo make
sudo make install
sudo mv bin/macintosh/zap* /usr/local/bin

Done! – to test it’s working start the zap server:

zapd

To run a zap test:

zap -sx.x.x.x -dx.x.x.x

s = source IP

d=destination IP

*zapd server must also be running on the same machine running the test