1.21.2015

Use iperf to measure network link bandwidth

Nice writeup on how to use iperf. Another example, writeup.
1. Install iperf
$ sudo yum install iperf

2. Start server on another system:
$ iperf -s
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 85.3 KByte (default)
------------------------------------------------------------
[  4] local 10.1.1.1 port 5001 connected with 10.0.0.1 port 46699
[ ID] Interval       Transfer     Bandwidth
[  4]  0.0-10.3 sec   107 MBytes  87.7 Mbits/sec

3. Start client from your system specifying server ip:
$ iperf -c 10.1.1.1
------------------------------------------------------------
Client connecting to 10.1.1.1, TCP port 5001
TCP window size: 85.0 KByte (default)
------------------------------------------------------------
[  3] local 10.0.0.1 port 46699 connected with 10.1.1.1 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.1 sec   107 MBytes  89.0 Mbits/sec

4. Use options, e.g., -t duration, -i interval between measurements
$ iperf -c 10.1.1.1 -t 20 -i 2
------------------------------------------------------------
Client connecting to 10.1.1.1, TCP port 5001
TCP window size: 85.0 KByte (default)
------------------------------------------------------------
[  3] local 10.0.0.1 port 46761 connected with 10.1.1.1 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0- 2.0 sec  17.6 MBytes  73.9 Mbits/sec
[  3]  2.0- 4.0 sec  22.5 MBytes  94.4 Mbits/sec
[  3]  4.0- 6.0 sec  21.2 MBytes  89.1 Mbits/sec
[  3]  6.0- 8.0 sec  22.6 MBytes  94.9 Mbits/sec
[  3]  8.0-10.0 sec  22.5 MBytes  94.4 Mbits/sec
[  3] 10.0-12.0 sec  21.2 MBytes  89.1 Mbits/sec
[  3] 12.0-14.0 sec  22.6 MBytes  94.9 Mbits/sec
[  3] 14.0-16.0 sec  22.5 MBytes  94.4 Mbits/sec
[  3] 16.0-18.0 sec  21.2 MBytes  89.1 Mbits/sec
[  3] 18.0-20.0 sec  22.5 MBytes  94.4 Mbits/sec
[  3]  0.0-20.1 sec   217 MBytes  90.6 Mbits/sec

Just want to take note: Bandwidth vs Throughput

Bandwidth : Refers how fast a device can send data over a single communication channel.
Throughput: Refers how fast a device is actually sending data over the communication channel.

No comments:

Post a Comment