Package to run speed test on router?

When my internet speeds suddenly become very slow, I often wonder if there's a problem on the WAN/ISP side or it's on the LAN (my equipment) side. If I could run a speed test on the router itself, that would isolate the WAN. Is there a package to do this, preferably from within LuCI?

On my Raspberry Pi I was using this:

It’s in python so you need to add the python packages to your router as well. I never googled much further cause it worked very well on the RPi. Maybe in the meantime someone already rewrote the same thing in C for easy compilation.

1 Like

There are several good tests described in Tests for Bufferbloat.

The two most convenient scripts I regularly use are easily downloaded and continue to be maintained by @richb-hanover.

  1. emulates (download, then upload)
  2. emulates FLENT (simultaneous download/upload)

Having an OpenWRT/LEDE package that simply included these would be handy for many I imagine.


You can also use iperf3 for check LAN/Wifi speed. It's already into LEDE packages list.

First let me note that the measurement bandwidth of the remote endpoints for these two scripts are generously donated by users and are not sponsored by any big-pocket company, so use deliberately.

You will need to install netperf on the router before you can use these scripts:

opkg update ; opkg install netperf

I note that once you have netperf on the router you should also be able to use flent ( from your internal network to test the LAN segment's bandwidth (for that you might need to start "netserver" on your router first).

Final note, for this use case testing from the router seems like a decent idea, but be aware that this will put additional load on your router which might affect the maximum bandwidth your router is able to handle (there are only so many CPU cycles to go around...). You could try to soften this issue by disabling costly operations (like traffic-shaping with qos-scripts or sqm-scripts) for the duration of the test.


Following up on my own advice, I've implemented an on-router package:


To measure WIFI speed test I use iperf3, independently of an ISP.
This gives very reliable figures of WIFI speed, with only a small burden on the AP.

On AP/router: opkg install iperf3
Then launch in server mode: iperf3 -s

On client: iperf3 -c ap_adress:

iperf3 -c xx.xx.xx.xx
Connecting to host xx.xx.xx.xx, port 5201
[  5] local yy.yy.yy.yy port 36684 connected to xx.xx.xx.xx port 5201
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec  22.1 MBytes   185 Mbits/sec    0    648 KBytes       
[  5]   1.00-2.00   sec  20.0 MBytes   168 Mbits/sec    0    816 KBytes       
[  5]   2.00-3.00   sec  20.0 MBytes   168 Mbits/sec    0    950 KBytes       
[  5]   3.00-4.00   sec  21.2 MBytes   178 Mbits/sec    0   1017 KBytes       
[  5]   4.00-5.00   sec  21.2 MBytes   178 Mbits/sec    0   1017 KBytes       
[  5]   5.00-6.00   sec  21.2 MBytes   178 Mbits/sec    0   1017 KBytes       
[  5]   6.00-7.00   sec  22.5 MBytes   189 Mbits/sec    0   1017 KBytes       
[  5]   7.00-8.00   sec  20.0 MBytes   168 Mbits/sec    0   1017 KBytes       
[  5]   8.00-9.00   sec  21.2 MBytes   178 Mbits/sec    0   1017 KBytes       
[  5]   9.00-10.00  sec  21.2 MBytes   178 Mbits/sec    0   1017 KBytes       
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.00  sec   211 MBytes   177 Mbits/sec    0             sender
[  5]   0.00-10.02  sec   209 MBytes   175 Mbits/sec                  receiver

Just so everyone's aware when reading this old and revived thread.

There are many other threads that warn about running speed tests from the router, as they will provide artificially low results in most cases.