How To Test Network Throughput Between Linux Systems

iperf is a tool for performing network throughput measurements.  It can test either TCP or UDP throughput. To perform an iperf test the user must establish both a server (to discard traffic) and a client (to generate traffic).

Syntax:

iperf -s [ options ]
iperf -c server [ options ]
iperf -u -s [ options ]
iperf -u -c server [ options ]

Scenario

Let us say for example, we are going to test network performance between System A and System B.

System A is running with Debian 7 with IP Address 192.168.1.200/24 and System B is running with Ubuntu 13.04 with IP Address 192.168.1.59/24.

Install iperf

Install ‘iperf’ package on both System A and B with following command.

$ sudo apt-get install iperf

Test Network Performance

Run the following command in System A(Debian 7):

# iperf -s -B 192.168.1.200

Where,

-s     – Run in Server mode.

-B     – Bind To IP

Now go to System B(Ubuntu 13.04) and run the following command:

$ sudo iperf -c 192.168.1.200 -d -t 60 -i 10

Where,

-c     – Run in client mode.

-d     – Do Bidirectional Test On simultaneously.

-t 60 – Transmit second, default value is 10.

-i 10 – Pause 10 seconds between periodic bandwidth report.

Sample Outputs:

On System A(Debian 7):

sk@sk: ~_004On System B(Ubuntu 13.04):

sk@sk: ~_006For more details about ‘iperf’, refer man pages.

# man iperf