Use iperf to check the bandwidth between two servers over the Internet.

The iperf utility is used to transfer data from one machine to another over the Internet. This is a client-server utility and is the go-to utility to test a Wide Area Network connection. To use this, type sudo apt-get install iperf. Then open port 5001 in your router and/or firewall to allow the incoming connection from the client. Run iperf -s on the server machine to start the deamon running.

[email protected]:~$ iperf -s
Server listening on TCP port 5001
TCP window size: 85.3 KByte (default)
[  4] local port 5001 connected with port 47318
[ ID] Interval       Transfer     Bandwidth
[  4]  0.0-16.8 sec  1.38 MBytes   687 Kbits/sec

This is what you should get on the client when connecting to the server machine.

jason-H55-USB3% iperf -c
Client connecting to, TCP port 5001
TCP window size: 85.0 KByte (default)
[  3] local port 47318 connected with port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-12.9 sec  1.38 MBytes   893 Kbits/sec

This tests the network connection between the client and server machines. I was connected to my home machine with SSH over a VPN and also connected to an Amazon AWS instance via SSH. Amazon was running the server and my home machine was running a client. This shows the speed of the network connection I was getting to the Amazon EC2 instance. This is an easy way to test network connectivity from a client to a server.

No comments have been made. Use this form to start the conversation :)

Leave a Reply