|
Install iperf
If you are using Debian / Ubuntu Linux, enter:
$ sudo apt-get install iperf
If you are using FreeBSD, enter:
# cd /usr/ports/benchmarks/iperf
# make install clean
Source code installation for RHEL / CentOS:
# gunzip -c iperf-.tar.gz | tar -xvf -
# cd iperf-
# make; make install
Start iperf on server
To start iperf on server, type the following command:
freebsdbox # /usr/local/bin/iperf -s
Output:
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 64.0 KByte (default)
------------------------------------------------------------
Test iperf from client
Let us connect to our freebsdbox, enter:
$ iperf -c freebsdbox
Output (note my freebsdbox is on slow vsat link):
------------------------------------------------------------
Client connecting to freebsdbox, TCP port 5001
TCP window size: 16.0 KByte (default)
------------------------------------------------------------
[ 3] local 192.168.1.106 port 40256 connected with 71.zzz.xxx.yyy port 5001
[ 3] 0.0-10.7 sec 624 KBytes 480 Kbits/sec
The last line (the red numbers) specifies the speed.
Use UDP rather than TCP
The -u option force to use UDP. The following example run udp test and bandwidth to send at in bits/sec is specified using the -b option:
$ iperf -c rhelbox -u -l 512 -b 10m
|