Question:
Paul asks: John and Dave frequently discuss home networking and wireless speeds. How do you measure the bandwidth, or speed, of a wireless router?
Answer:
In order to measure the performance of a network, you need at least two devices: one to send data and the other to receive it. When you’re connected to the Internet, this kind of transmission occurs constantly as your Mac, iPad, or iPhone communicates with the Web servers that host your favorite websites.
Online speed tests like SpeedTest.net work well for testing your Internet connection's speed, but very few users have an Internet connection that can max out an internal home wired or wireless network. If you’re interested in determining the full speed of your home network and, by extension, your router, you’ll need a server that can transmit and receive data faster than your Internet connection. For most users, this means using a PC or Mac on your home network as a server, and then testing the bandwidth between that server and another device also on your home network.
A great utility to test bandwidth between two devices is Iperf, a free tool that you install on at least two computers, designating one of them as the server and the second as the client. Iperf then sends data directly between the two computers, revealing the maximum speed of the wired or wireless network connecting them.
Start with Homebrew
Iperf natively runs as a command line utility in Terminal, and the best way to get it is via Homebrew, the open source packet management system. If you don’t already have Homebrew, open Terminal and run the following command:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

The Homebrew install script will go step-by-step, explaining what it’s doing and prompting you to continue. Just follow the instructions as they’re presented. Once Homebrew installation is complete, all you need to do to get Iperf is use the following command:
brew install iperf3
The latest version of Iperf3 will be downloaded and installed automatically. This, of course, is just a small example of what Homebrew can do. If you’re interested in learning more, check out the project’s FAQ and Tips N’ Tricks pages.
You’ve just installed Iperf on one Mac, but you’ll need a second Mac to test your network. Go to (or otherwise obtain) a second Mac and repeat the steps above to install Homebrew and Iperf.


Comments
That terminal command is not working for me. I get back the message"illegal variable name”.
You must have Xcode installed and within Xcode have the “Command Line Tools” installed.
Xcode can be downloaded here: https://developer.apple.com/xcode/downloads/
To install the Command Line Tools, open the Xcode / Preferences menu item. Choose the “Downloads” tab. Click the Install button to the right of the “Command Line Tools” option.
Thanks, @freejak - Indeed, HomeBrew requires Xcode. Usually OS X will prompt you for that if you need it when installing, but… that’s not always the case. Thanks, @freejack.
I have downloaded Xcode, gone to Preferences, gone to Downloads Tab but there is no
“Command Line Tools” option.
Right there is no Command Line Tools option and after loading Xcode, the ‘brew install iperf3’ in terminal does nothing.
@David I think you missed a step. You need to install Homebrew first, with the “ruby” command on the first page.
iperf3 is a very useful tool for testing LAN performance. To install it on OS X 10.11.x El Capitan - I followed the instructions in this link first to install Xcode, command line tools and Homebrew: (Beware of El Capitan’s new SIP Process - as it prevents many changes to system files and folders such as /usr/local (where home brew will be installed).
http://coolestguidesontheplanet.com/installing-homebrew-on-os-x-el-capitan-10-11-package-manager-for-unix-apps/
Then I used “brew install iperf3” to install iperf3 - and everything appears to work as stated in this thread.
~Scott
Dear Admin,
Can i perform this test with Mac as a server and Windows as a client? Or vise versa ?
MacBook Pro—> Lenovo
Lenovo—> MacBook Pro
Please confirm, If yes, please share the process and if No, please give alternate solution.
Regards,
Ishtiaq Ali
Ishtiaq: You should be able to locate the Windows version of iperf3 and install on Windows - you should then be able to run either the Windows or the Mac side as client or server and vice-versa. I have not tried this myself - but I did a quick google search on “iperf3 for Windows” and there seemed to be quite a few download sites in the search results. Rather than provide a link here (to something that I have not tried myself) - it would be better if you searched for it yourself. Just make sure it is iperf3.
Installing Homebrew requires the user to be an Administrator.
Log in to comment (TMO, Twitter or Facebook) or Register for a TMO account