≡ Menu

How to test bandwidth between Linux hosts

First of all, make sure you have iperf installed on both hosts.

If you haven’t, then use the following command to install it. I will be using Ubuntu flavour linux for demonstration.

apt-get install iperf

Pick one host as Server, one host as Client.

On the server issue the following command

iperf -s

One the Client, issue the following command

You can find the Server_IP by using ifconfig -a on your host

iperf -c Server_IP

See the following example for more info

Server

root@london:~# iperf -s
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 85.3 KByte (default)
------------------------------------------------------------
[  4] local 192.168.1.100 port 5001 connected with 192.168.1.50 port 54273
[ ID] Interval       Transfer     Bandwidth
[  4]  0.0-10.0 sec   112 MBytes  94.0 Mbits/sec

Client

WS ~ # iperf -c 192.168.1.100
------------------------------------------------------------
Client connecting to 192.168.1.100, TCP port 5001
TCP window size: 22.9 KByte (default)
------------------------------------------------------------
[  3] local 192.168.1.50 port 54273 connected with 192.168.1.100 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec   112 MBytes  94.1 Mbits/sec

Comments on this entry are closed.

Next post:

Previous post:

Copyright © Nish Vamadevan 2002-2017. All Rights Reserved. Terms and Policies.