It happens to all of us, sometimes segments of the network may become unusable or slow. The documentation created by the previous administrator may say Gigabit ethernet is supported or enabled across the network, yet only a fraction of the bandwidth is available. Iperf can measure the throughput of a network, Iperf operates in a client server mode. Best of all it’s open source and cross platform. Iperf is the perfect tool to measure wired and wireless networks, bandwidth is measured through TCP tests.
For the network test I will install Iperf on two systems, one will act as the server and the other as the client. Iperf is available on the Ubuntu repositories.
sudo apt-get install iperf
Now turn one of the systems in to the Iperf server.
iperf -s
Iperf server output.
-———————————————————–
Server listening on TCP port 5001
TCP window size: 85.3 KByte (default)
On the Iperf client issue the following command to connect with the Iperf server and initiate the test.
iperf -c 192.168.1.103
Client side output.
-———————————————————–
Client connecting to 192.168.1.103, TCP port 5001
TCP window size: 16.0 KByte (default)
[ 3] local 192.168.1.101 port 59291 connected with 192.168.1.103 port 5001
[ ID] Interval Transfer Bandwidth
[ 3] 0.0-10.0 sec 113 MBytes 94.5 Mbits/sec
You can see that on this test Iperf successfully transfered 113 MB of data at a network speed of 94.2 Mbits/sec. You can also tell Iperf to wait before giving you the network results, by adding -t 30 at the end of the command. This will tell Iperf to wait and in the mean time transferer more data across the network.
http://sourceforge.net/projects/iperf
iperf — Dec 26, 2008