Speed Internet speed test on a router

Internet speed often drops below that stated in the tariff. When contacting technical support, the operator constantly asks to test the speed bypassing the router. But the Internet cable does not reach the PC, and moving the PC to another room is not very convenient.

Is it possible to somehow run an Internet speed test on the router itself? And will such a test be relevant?

Most routers will not be powerful enough to sink/ generate packets for meaningful throughput figures. So unless your router is considerably overpowered for your wan connection, this isn't going to be possible (normally the hardware only needs to forward packages, not process them any further)

Is my router really so weak that it can’t even handle a speed of 50 Mbit? Previously, I had an Internet speed of 100 Mbit and the router could handle it. What happened to him?

How would we know, without you specifying the device you're talking about (and even if we did, it would still need testing/ more exact definition of the circumstances, e.g. PPPoE pushes the envelope quite a bit).

1 Like

Let's start with these bits of info:

  • what is your device and what firmware is it running? (let's see the output of ubus call system board)
  • How are you running the speed test when you run it on your router?
  • what speeds do you get when you do that?
  • Have you run it on a computer behind your router?
  • If so, wired or wireless? What speeds are you getting? (it would be good to know both wired and wireles speeds, but wired is actually more important)
  • What speeds are you expecting (i.e. what is your ISP subscription speed)?
1 Like

Usually no, but depending on the make/model of the device and type of ISP connection - you could possibly reconfigure the router temporally to be a switch only, hence reaching your PC and not using the routing/firewall of the OpenWrt device.

We'll need to see the network configs and ubus call system board to verify the possibility of either scenario.

Weren't you running VPN on your router ?

It doesn't come for free, CPU wise.

1 Like

Maybe this can help.

You can install iperf and iperf3 with opkg on your openwrt router. If you have more than 1 openwrt device you can test between them. There are also iperf-packages for your PC, DVB-box, android phone and probably other devices.

Start on 1 machine

iperf3 -s

and on the other

iperf3 -c IP-address.

Instead of your local server-IP-address, you can use a public iperf3-server. Note speedtest can fool you, especially these which you find in the toprankings of the internet.

The speed-test often doesn't end at the device from which you are testing, but at your router of your ISP. So you have no idea, how fast it is at your phone eg. If you have lower upload speed, a test with a public iperf3-server will show as maximum your lower upload-speed.

If you use an AVM Fritzbox, you can enable iperf(2) in the menu.

Are you sure about that? Can you provide references/links/examples? It is fairly easy to prove that the speedtest terminates on your computer -- for example, artifically decreasing the bandwidth to your computer will usually demonstrate that the speedtest does indeed test server > your computer. A quick and easy way to locally limit the bandwidth of your computer is to force it to 100Mbps ethernet (when you expect your ISP speeds to be greater than 100Mbps), and you'll see it will cap out at ~94Mbps. You can also see this with wifi when the ISP bandwidth exceeds your wifi connnection speed.
So for example, I have 10Gbps service, but my computers are all max 1Gbps (my router does actually have 10Gbps routing and is connected to my switch via a 10G link)... the max speed I ever see on any of my computers is ~1Gbps. If the test terminated on my ISP's router (before it reaches my router) it would say 10Gbps.

Yes, at least with my DSL-connection. Since a while I tried to find out, why my local connections were so bad. Web-speedtest showed a lot more. More or less these values are for which I pay the ISP, but my phone was a lot slower. So I began to check locally, which was a lot less than what I get from my ISP. The overall speed cannot be higher than my local bottleneck, So my phone eg is ignored from where I start the test. It ends at the modem of the ISP.

$ iperf3 -c cdjspeedtest.axtel.mx
Connecting to host cdjspeedtest.axtel.mx, port 5201
[  5] local 192.168.178.46 port 41374 connected to 187.177.95.194 port 5201
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec  1.13 MBytes  9.44 Mbits/sec    0    197 KBytes       
[  5]   1.00-2.00   sec  1.39 MBytes  11.7 Mbits/sec    0    255 KBytes       
[  5]   2.00-3.00   sec  1.15 MBytes  9.63 Mbits/sec    0    312 KBytes       
[  5]   3.00-4.00   sec  1.39 MBytes  11.7 Mbits/sec    0    370 KBytes       
[  5]   4.00-5.00   sec  1.57 MBytes  13.2 Mbits/sec    0    428 KBytes       
[  5]   5.00-6.00   sec   928 KBytes  7.60 Mbits/sec   12    325 KBytes       
[  5]   6.00-7.00   sec  1.87 MBytes  15.7 Mbits/sec    3    238 KBytes       
[  5]   7.00-8.00   sec   928 KBytes  7.60 Mbits/sec    0    260 KBytes       
[  5]   8.00-9.00   sec   928 KBytes  7.60 Mbits/sec    0    271 KBytes       
[  5]   9.00-10.00  sec   928 KBytes  7.60 Mbits/sec    0    276 KBytes       
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.00  sec  12.1 MBytes  10.2 Mbits/sec   15             sender
[  5]   0.00-10.15  sec  10.6 MBytes  8.73 Mbits/sec                  receiver

iperf Done.

My upload speed at the ISP is 10Mbit/s. Download is about 50, paid is more. I get similar results with all the other servers. Until today I had 10Mbit/s locally too and that was the reason why I was searching for the problem.

 iperf -c 192.168.178.1 -p4711
------------------------------------------------------------
Client connecting to 192.168.178.1, TCP port 4711
TCP window size: 85.0 KByte (default)
------------------------------------------------------------
[  1] local 192.168.178.46 port 45910 connected with 192.168.178.1 port 4711
[ ID] Interval       Transfer     Bandwidth
[  1] 0.0000-10.2149 sec   110 MBytes  90.3 Mbits/sec

This is the local speed from my pc Β΄, connected via Wifi to the Fritzbox of the ISP. Actually it is more complex, the wireless AP is an openwrt-router, which is connected wireless to another openwrt router, and this one is connected via ethernet to the Fritzbox.

So this shows, that the speedtest here is limited to the paid upload, otherwise I should see more.

What you could try, is to download a big file from a speedtest provider. I don't post a link, my test-link disappeard after a while. I use wget for tests.

There is an android app for iperf. I checked what I get via Wifi and then I checked what I get via mobile data. Mobile data was a lot more, since my mobile contract has 50Mb/s upload.

I've never experienced this with Cable Modem or Fiber based connections. I'm not sure, but that might be considered fraud in the US if the speedtest server terminated at the ISP and not at your connection.

That said, some of the speedtest servers are indeed hosted by ISPs (or colocated)... this way the speed test is effectively the ISP > you, bypassing the rest of the internet which could introduce various bottlenecks. But, in these cases, the "you" above would still terminate on one of your devices inside your network.

Some ISPs did compression on links, so a speedtest with e.g. all zero packets could result in unrealistic results. This is why many speed tests switched to HTTPS which did away with such shenanigans.

2 Likes

My tests were with Fritzbox.DSL-Modems. The Fritzbox itself shows the speed which is more or less your contract. But the ISP is not responsible how fast your local net is.

Problem are the speedtests in the web. If you have a slow local net, the result should be slow, but it is not. It shows the same speed as the router of the ISP. You know my threads because of slow speed in the last time here. Ok, it was a configuration problem with openwrt, where I am responsible. Nevertheless, if I do a speed test, it should show the speed which arrives at the device, from which it is done. At the end I did not find any better solution, than to test with iperf.

But I do not have an idea, how to measure the download speed from the internet, than using wget. This means you need a very fast download server.

again, this isn't a thing as far as I am aware (at least not in the USA with the services I've used).

Feel free to PM me a link to such an offending speed test... I would like to see this in action.

1 Like

I simply entered speedtest in Google and tried them. The problem now is, that my local network is faster than my contract, so I can't show you a screenshot-

You have to reduce the speed of your local net and then do tests. Sorry, I am happy that the local net is faster now, so I don't want to do the wrong configurations again.

If your local net is limited to 5MB/s you should not see faster test results than 5MB/s at your client. Agree?

Since I have a contract with 50 Mb/s and my local network is about 100Mb/s now, it will always fit. There were times, when my local speed was about 1MB/s or even lower for a while, but speedtests showed the full speed.

https://www.netztest.at/de/Test is an organisation close to the government,for sure no fraud.

So that test doesn't misreport things here...

It gave me 48 down/620 up while google speed test gave me 613 down/643 up. My service is 10G symmetric, and my computer runs <1Gbps because it's a really really old machine that's been hacked a bit (by me, not in a negative context) in a way that I believe causes some issues with the network interfaces.

Try:

time wget -4 --report-speed=bits -O ./random-1G http://speedtest.belwue.net/random-1G

which will download a 1 GB file of random (badly compressible) data wget will also report the instantaneous speed during the download

123-1234567:~ user$ wget -4 --report-speed=bits -O ./random-1G http://speedtest.belwue.net/random-1G
--2023-12-17 20:58:39--  http://speedtest.belwue.net/random-1G
Resolving speedtest.belwue.net (speedtest.belwue.net)... 129.143.4.238
Connecting to speedtest.belwue.net (speedtest.belwue.net)|129.143.4.238|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1073741824 (1.0G)
Saving to: β€˜./random-1G’

./random-1G                                 33%[=============================>                                                           ] 347.28M  82.5Mb/s    eta 2m 19s 

if will also show the finall rate over the full file:


2023-12-17 21:01:07 (58.3 Mb/s) - β€˜./random-1G’ saved [1073741824/1073741824]

Note these servers are in Germany and will hence only work well for close by locations.
If you use the time tool you can also measure the full run time of the wget commend which allows you to conform the average rate simply by dividing the size of the downloaded file by the time it took to download it.
However one caveat, this will only use a single flow and hence will often not be able to saturate a link.

That is not what I am talking about.

I say, if you use a local client, a pc, phone, or whatever and your local net is slower than your contract, tests most times do not show the speed until data reach the client. To test this, you need a slow local network, slower than your contract, otherwise you cannot see this.

Interesting, Belwue works again, this is one I used for testing. These were the times, when I had 1Mb/s with my 50Mb/s contract.

My local network is slower than my contract. my contract is 10Gbps (10,000Mbps). My local network is 1Gbps (1000Mbps), and my almost 15 year old Mac Pro (which has some OS hacks to run a later OS than is supported) has some issues with the network statck limiting it to ~650Mbps or so.

1 Like