Testing Your LAN Speed Using Two Macs

At some point, you’ve probably googled “Internet speed test” to find out how fast your internet connection was. You can use HomeBrew and iperf to perform the same kind of test between two macs on your local network.

Step 1: Install (or already have) HomeBrew on both computers

iperf is a utility available for macs through HomeBrew. HomeBrew is free and bills itself as “the missing package manager for mac”. It lets you install and run a number of utilities from the command line that didn’t come with your Mac (but should have). The link above contains easy-to-follow instructions for installing HomeBrew if you don’t have it already.

Step 2: Install iperf on both computers

Once you have homebrew you’ll want to install iperf on both macs that will be performing the speed test. In a Terminal window do: 

brew install iperf

Once installed you will need to decide which of the macs is going to be the “server” for the test and which will be the “client”. It doesn’t matter which machine is which as you’re just deciding which machine is sending the test data and which is receiving it. 

Step 3: Start the server first

On the server, type this in a terminal window:

sudo iperf -s

It will show you a confirmation that looks something like this:

Server:~ haus$ iperf -s
Server listening on TCP port 5001
TCP window size:  128 KByte (default)

Step 4: Run the test from your client mac

Then, over on your “client”, you run the test in the Terminal using the following format:

sudo iperf -c <local IP address of server mac>

(To get the local IP address for your machine run one of these commands in your terminal:

For wired connections, enter

ipconfig getifaddr en0

For Wi-Fi, enter

ipconfig getifaddr en1

So your full command will look something like this: 

sudo iperf -c

…and your result will look something like:

Client:~ haus$ sudo iperf -c
Client connecting to, TCP port 5001
TCP window size: 129 KByte (default)
[ 1] local port 50715 connected with port 5001
[ ID] Interval Transfer Bandwidth
[ 1] 0.00-10.04 sec 591 MBytes 494 Mbits/sec

The result for this sample test was 494Mbits/sec. You should always run tests like this multiple times and average the results. After 10 runs I ended up with ~500Mbits/sec which is about 5x the speed of my external Internet connection. 

You can use to convert your Mbits/sec to MB/sec. The test above translated to about 62MB/sec.

There are a lot of variables that can affect a test like this from the speed of your computer’s hard drive and network card to your routers and even your cables, so if you’re looking to speed things up you should replace one thing at a time and re-test so you know what contributed what. 




  • Manfred Kohl

    Thank You for You very usefull instructions. Slight corrections : use ifconfig ipconfig getifaddr en1 for wifi and ifconfig getifaddr en0 for ethernet.

    Best Regards


Would you like to post a comment?

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>