In the top-right corner of the Ubiquiti EdgeMAX EdgeRouter’s GUI interface, you’ll find a Toolbox menu with plenty of goodies inside (assuming you’re running a version of the firmware that has them, such as 1.7.0+). One of the menu items lets you test the Bandwidth to or from your router:
Selecting that tool allows you to test the bandwidth from your EdgeRouter as the Sender:
or the Receiver:
Most users assume that the EdgeRouter’s built-in bandwidth test requires two EdgeRouters: one as the Sender and one as the Receiver. But one of the benefits of the EdgeRouter is that it’s Linux-based, and therefore essentially all the major functions of the router are based standalone open source projects. In the case of its Bandwidth test, the EdgeRouter uses a tool called iPerf3. And if the EdgeRouter’s Bandwidth test is merely a graphical interface to iPerf3, that means you can run the EdgeRouter’s Bandwidth test against any iPerf3 server accessible from your network. Note that it won’t work on an original iPerf server, it must be iPerf3.
Using iPerf3 Public Servers
You can easily try a bandwidth test from your EdgeRouter using any of the publicly-available iPerf3 servers. The GUI’s Bandwidth tool complains about an invalid IP address if you try to use a hostname, so you’ll have to ping or do a dig or nslookup on the public iPerf3 server’s hostname to find the IP address to use in the tool. Try to use a public server that’s close to you.
I ran a test again the iperf.scottlinux.com server, and saw an average of 12-point-something Mbits per second:
Those results jive with a Speedtest.net test from my desktop, as well as the stated speeds of the Comcast Internet service I’m purchasing of 120Mbits down and 12 Mbits up (though my download is limited because there’s currently a 10/100 switch on the network… which will be swapped out today):
Because my connection’s upload speed is capped to 12 Mbps, I shouldn’t expect a Bandwidth test to exceed that when my router is configured as the Sender.
Using iPerf3 from the EdgeRouter CLI
I can duplicate these results from the EdgeRouter’s CLI, since the GUI is merely running the command and displaying the results in a graph. If you log in to your EdgeRouter’s CLI and run iperf3 the command line (using the -c flag to act as the client), you’ll get similar results to the GUI test. As a bonus, unlike the GUI, the command line will resolve a hostname for you, so you don’t have to look up the IP address first:
admin@edgerouter:~$ iperf3 -c iperf.scottlinux.com Connecting to host iperf.scottlinux.com, port 5201 [ 4] local xxx.xxx.xxx.xxx port 44141 connected to 173.230.156.66 port 5201 [ ID] Interval Transfer Bandwidth Retr [ 4] 0.00-1.08 sec 1.62 MBytes 12.6 Mbits/sec 0 [ 4] 1.08-2.02 sec 1.50 MBytes 13.4 Mbits/sec 0 [ 4] 2.02-3.02 sec 1.62 MBytes 13.6 Mbits/sec 0 [ 4] 3.02-4.02 sec 1.75 MBytes 14.7 Mbits/sec 0 [ 4] 4.02-5.22 sec 1.50 MBytes 10.5 Mbits/sec 6 [ 4] 5.22-6.02 sec 1.50 MBytes 15.7 Mbits/sec 0 [ 4] 6.02-7.02 sec 1.50 MBytes 12.6 Mbits/sec 0 [ 4] 7.02-8.02 sec 1.38 MBytes 11.5 Mbits/sec 4 [ 4] 8.02-9.02 sec 1.38 MBytes 11.5 Mbits/sec 0 [ 4] 9.02-10.02 sec 1.50 MBytes 12.6 Mbits/sec 0 - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bandwidth Retr [ 4] 0.00-10.02 sec 15.2 MBytes 12.8 Mbits/sec 10 sender [ 4] 0.00-10.02 sec 14.2 MBytes 11.8 Mbits/sec receiver iperf Done.
Running the Bandwidth Test in Reverse Direction
Back in the GUI, if I click Show advanced settings… on the Bandwidth tool’s Sender tab, there’s an option for Reverse direction. This allows my EdgeRouter to contact the remote iPerf3 server, and ask it to switch roles for the test: the server sends the test packets and the client receives. This should allow me to get results higher than my upload cap. This option is the same as using the -R flag when running iPerf3 from the command line. I verified this with my testing, but the results were pretty inconsistent:
From the CLI:
admin@edgerouter:~$ iperf3 -c iperf.scottlinux.com -R Connecting to host iperf.scottlinux.com, port 5201 Reverse mode, remote host iperf.scottlinux.com is sending [ 4] local xxx.xxx.xxx.xxx port 44145 connected to 173.230.156.66 port 5201 [ ID] Interval Transfer Bandwidth [ 4] 0.00-1.07 sec 1.75 MBytes 13.7 Mbits/sec [ 4] 1.07-2.00 sec 5.00 MBytes 45.2 Mbits/sec [ 4] 2.00-3.02 sec 9.88 MBytes 81.6 Mbits/sec [ 4] 3.02-4.02 sec 9.62 MBytes 80.8 Mbits/sec [ 4] 4.02-5.04 sec 8.62 MBytes 70.5 Mbits/sec [ 4] 5.04-6.04 sec 4.50 MBytes 38.1 Mbits/sec [ 4] 6.04-7.06 sec 3.62 MBytes 29.8 Mbits/sec [ 4] 7.06-8.09 sec 2.88 MBytes 23.3 Mbits/sec [ 4] 8.09-9.06 sec 2.62 MBytes 22.6 Mbits/sec [ 4] 9.06-10.12 sec 2.75 MBytes 21.8 Mbits/sec - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bandwidth Retr [ 4] 0.00-10.12 sec 53.0 MBytes 43.9 Mbits/sec 24 sender [ 4] 0.00-10.12 sec 51.4 MBytes 42.6 Mbits/sec receiver iperf Done.
This shows that while using a public iPerf3 server is convenient, network latency between my router and the test server will cause results to differ, and not demonstrate what the router is truly capable of doing. To solve that problem, you should set up your own private iPerf3 server.
Running Your Own iPerf3 Server
Setting you up own iPerf3 server to use with the EdgeRouter’s Bandwidth tool is easy… especially if you have access to a Linux box on your LAN.
For RedHat-based distros, the iPerf3 package is available in the EPEL respository. If you have EPEL enabled, install iPerf3:
$ sudo yum install iperf3
Repos for users of other Linux flavors (like Ubuntu or Debian) are just a web search away. Once iPerf3 is installed on your server, verify that port 5201 is open on the system’s firewall, then run iPerf3 in server mode with:
iperf3 -s
You’ll know it’s working when you see:
----------------------------------------------------------- Server listening on 5201 -----------------------------------------------------------
Now you can put your private server’s IP address into the EdgeRouter’s GUI Bandwidth tool and re-run it. You should get better results. I installed iPerf3 on an old Dell PowerEdge 2450 in my basement running CentOS and gave it a shot:
Here’s the output shown on the CentOS server from the same incoming test:
Accepted connection from 192.168.1.1, port 56379 [ 5] local 192.168.1.103 port 5201 connected to 192.168.1.1 port 56380 [ ID] Interval Transfer Bandwidth [ 5] 0.00-1.00 sec 10.5 MBytes 87.9 Mbits/sec [ 5] 1.00-2.00 sec 11.1 MBytes 93.2 Mbits/sec [ 5] 2.00-3.00 sec 10.3 MBytes 86.1 Mbits/sec [ 5] 3.00-4.00 sec 10.9 MBytes 91.3 Mbits/sec [ 5] 4.00-5.00 sec 10.8 MBytes 90.3 Mbits/sec [ 5] 5.00-6.00 sec 11.0 MBytes 92.0 Mbits/sec [ 5] 6.00-7.00 sec 11.1 MBytes 92.9 Mbits/sec [ 5] 7.00-8.00 sec 11.1 MBytes 92.9 Mbits/sec [ 5] 8.00-9.00 sec 11.2 MBytes 94.0 Mbits/sec [ 5] 9.00-10.00 sec 10.9 MBytes 91.2 Mbits/sec [ 5] 10.00-11.00 sec 8.81 MBytes 73.9 Mbits/sec [ 5] 11.00-12.00 sec 11.2 MBytes 93.8 Mbits/sec [ 5] 12.00-13.00 sec 11.2 MBytes 94.0 Mbits/sec [ 5] 13.00-14.00 sec 11.1 MBytes 92.8 Mbits/sec [ 5] 14.00-15.00 sec 11.2 MBytes 94.1 Mbits/sec [ 5] 15.00-16.00 sec 11.2 MBytes 94.0 Mbits/sec [ 5] 16.00-17.00 sec 11.2 MBytes 93.6 Mbits/sec [ 5] 17.00-18.00 sec 11.2 MBytes 93.6 Mbits/sec [ 5] 18.00-19.00 sec 11.2 MBytes 94.1 Mbits/sec [ 5] 19.00-20.00 sec 11.2 MBytes 94.1 Mbits/sec [ 5] 20.00-21.00 sec 11.1 MBytes 92.9 Mbits/sec [ 5] 21.00-22.00 sec 11.1 MBytes 92.8 Mbits/sec [ 5] 22.00-23.00 sec 11.2 MBytes 93.8 Mbits/sec [ 5] 23.00-24.00 sec 11.2 MBytes 94.0 Mbits/sec [ 5] 24.00-25.00 sec 11.2 MBytes 93.9 Mbits/sec [ 5] 25.00-26.00 sec 11.2 MBytes 93.7 Mbits/sec [ 5] 26.00-27.00 sec 11.1 MBytes 92.8 Mbits/sec [ 5] 27.00-28.00 sec 11.2 MBytes 94.2 Mbits/sec [ 5] 28.00-29.00 sec 11.2 MBytes 93.8 Mbits/sec [ 5] 29.00-30.00 sec 11.1 MBytes 92.8 Mbits/sec [ 5] 30.00-30.05 sec 560 KBytes 93.0 Mbits/sec - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bandwidth Retr [ 5] 0.00-30.05 sec 330 MBytes 92.2 Mbits/sec 274 sender [ 5] 0.00-30.05 sec 330 MBytes 92.1 Mbits/sec receiver
This old Dell only has a 10/100 network card, so the barely sub-100 Mbps results seem correct.
I also installed iPerf3 on one of my CentOS servers hosted at a colo center, to see if I could get better WAN results with my own server as opposed to the public ones. To get past the 12 Mbps upload limit, I the GUI Bandwidth tool in Reverse direction mode:
I saw an average of 35.0 Mbits/sec (which was actually easiest to see from the server side, not the Bandwidth tool). I was hoping for better, so I repeated the test from the EdgeRouter’s CLI:
admin@edgerouter:~$ iperf3 -c xxx.xxx.xxx.xxx -R Connecting to host xxx.xxx.xxx.xxx, port 5201 Reverse mode, remote host xxx.xxx.xxx.xxx is sending [ 4] local xxx.xxx.xxx.xxx port 35969 connected to xxx.xxx.xxx.xxx port 5201 [ ID] Interval Transfer Bandwidth [ 4] 0.00-1.01 sec 9.25 MBytes 76.8 Mbits/sec [ 4] 1.01-2.01 sec 13.6 MBytes 114 Mbits/sec [ 4] 2.01-3.01 sec 14.1 MBytes 118 Mbits/sec [ 4] 3.01-4.01 sec 14.4 MBytes 120 Mbits/sec [ 4] 4.01-5.01 sec 14.6 MBytes 123 Mbits/sec [ 4] 5.01-6.01 sec 14.6 MBytes 123 Mbits/sec [ 4] 6.01-7.01 sec 13.1 MBytes 110 Mbits/sec [ 4] 7.01-8.01 sec 13.9 MBytes 117 Mbits/sec [ 4] 8.01-9.02 sec 14.8 MBytes 122 Mbits/sec [ 4] 9.02-10.02 sec 14.4 MBytes 120 Mbits/sec - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bandwidth Retr [ 4] 0.00-10.02 sec 139 MBytes 116 Mbits/sec 105 sender [ 4] 0.00-10.02 sec 137 MBytes 115 Mbits/sec receiver iperf Done.
That’s more like it! I saw an average of 116 Mbps from the EdgeRouter’s CLI vs. only 92 Mbps via the GUI Bandwidth tool.
Why? I’m really not sure yet. I ran both versions of the test multiple times, back to back, and the CLI was consistently higher. I can only guess that the GUI version has some sort of additional network and/or CPU overhead it’s dealing with the slow down the results. I plan to post a link to this article in the UBNT forums to see if anyone can offer a good explanation.
Final Thoughts
For now, it seems the most dependable results with the EdgeRouter’s Bandwidth tool is to ignore the GUI version and go straight to the CLI… which is basically the same advice I’d give when it comes to configuring an EdgeRouter, too. I’ve only owned mine for a couple of weeks, but already I find myself going to the CLI first when I want to tinker with something, rather than dealing with the GUI. So jumping in there for a bandwidth test doesn’t really feel like much additional effort.
As always, I welcome your questions, comments, and feedback below!