Posted: . At: 11:22 AM. This was 10 years ago. Post ID: 7808
Page permalink. WordPress uses cookies, or tiny pieces of information stored on your computer, to verify who you are. There are cookies for logged in users and for commenters.
These cookies expire two weeks after they are set.


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 iperf daemon.

ubuntu@ip-172-31-20-234:~$ iperf -s
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 85.3 KByte (default)
------------------------------------------------------------
[  4] local 172.31.20.234 port 5001 connected with xxx.xxx.xxx.xx 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 xx.xx.xx.xxx
------------------------------------------------------------
Client connecting to xx.xx.xx.xxx, TCP port 5001
TCP window size: 85.0 KByte (default)
------------------------------------------------------------
[  3] local 192.168.100.3 port 47318 connected with xx.xx.xx.xxx 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.


Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.