Friday, March 14, 2008

Bandwidth Measurement With Iperf

Every once in a while I have needed to know what kind of bandwidth I have between two systems. Typically the systems are separated by a WAN link, but occasionally I have had to check between systems on the same wired LAN. The Iperf tool runs as a server on one system and as a client on another system. The two send data back and forth and calculate the bandwidth.

For Windows systems download the program from the homepage and save somewhere you can easily get to it from a command prompt. For Linux systems it can most likely be installed from your favorite package manager (apt, yast, yum, etc). First start it up on the system that will act as the server. Simply use the command:
iperf -s
Then start it up as a client on the other machine:
iperf -c <ip.address.of.server>
The server name can be substituted for the IP Address if it resolves through DNS.

By default Iperf sends data in one direction only. By specifying -d on the command line it will perform a simultaneous bi-directional test. Additional options can be specified for determining how much data to send (-n) and how long to run the test (-t).

Let me know if you've used the tool or have a better way to test bandwidth.

No comments: