#troubleshooting

danie10@squeet.me

How to test your LAN speed through your home router to troubleshoot browser speed problems

Ookla speed test result showing a maximum download speed of 200.72 Mbps and an upload speed of 87.17 Mbps.
Often, we’ll run a speed test, using Ookla’s speed test or similar, and wonder why we’re not getting the advertised speed of our fibre or ADSL link (if you’re still on dial-up then speed won’t matter to you). The speed is going to be determined by the SLOWEST link in the chain from your computer itself and the browser, through the LAN cable or Wi-Fi to your router, the router throughput can also affect things, and then on through your WAN link (the fibre, satellite, or ADSL link) to the Internet.

So firstly, just on the WAN speed result with Ookla, I noted my PC showing around 200 Mbps download speed, but my ISP is selling me a 300 Mbps download speed. My first thought was to complain that I’m only getting 2/3 of the speed I’m paying for.
Bild/FotoDesktop browser speed test
But then I remembered, that in my case I’m using the AsusWRT-Merlin software on my Asus router, and it has its own WAN speed test direct from the router to the WAN link and the Internet. I ran that test from the router’s menu, and it actually shows 323 Mbps download speed. So, I’m certainly getting my money’s worth from the ISP. Running a test from the router itself eliminates the end computer as well as it’s link to the router, and any congestion on the local network in the home.
Bild/FotoSpeed test from router to Internet
The next thing then to consider is how to test the speed across the network inside the home. In other words, from my desktop PC through the LAN cable, through the router, and through another LAN cable to a different computer in the home (remember that it will max out on only 100 Mbps if one of the cables is 100 Mbps, even if the other computer has a 1 Gbps cable).

There are two possible ways of doing this, depending on what router you have. I could actually just test from my PC to the router only, but that means running the speed test software on the router itself (why does my router not have LAN speed test software built in?). On the Asus router, running AsusWRT-Merlin firmware, I could install Entware, and then let Entware install the iperf3 software.

But for now, I decided to just try option 2: Load iperf3 on both my PC and another PC, and run the test between those two, through the router. Both PC’s have a 1 Gbps (1,000 Mbps) cable connections to the router. In theory I should see around 1 Gbps on the test if all goes well.

On one PC you start the iperf3 app using the server attribute eg. iperf3 -s. On the other PC you run iperf3 in client mode and append the server-side IP address of the other PC eg. iperf3 -c 192.1.1.143. And it outputs something like the screenshot below. In my case this showed an average throughput of 942 Mbps (just a bit less than the rated 1,000 Mbps for the cable and the network cards). The iperf3 app is run from the terminal on both PC’s so this is eliminating any browser slow-down.
Bild/Fotoiperf3 speed test between two PCs
So, the above is confirming that my LAN cables and network cards, as well as the router in the middle, are all performing OK for 1 Gbps expected connections. If one or more of the devices were connecting via Wi-Fi to the router, instead of Ethernet cable, the speed would likely be less and also affected more by congestion on the Wi-Fi network. Seeing I know the Ethernet speed is roughly a full 1 Gbps, having the other PC on Wi-Fi, would show me pretty accurately what the Wi-Fi speed is on my home network (2.4 GHz Wi-Fi will be affected differently to 5 GHz Wi-Fi).

I ran the test on my Android phone using the PingTools app (there are others too) that has iperf3 built in. It showed an average throughput of 270 Mbps on my home’s Wi-Fi. We know that is the Wi-Fi speed as the Ethernet cable is way faster than the Wi-Fi (the slowest link in the chain determines the result).
Bild/FotoAndroid speed test over Wi-Fi
So, now I know my LAN cables, network cards, and the router are all performing OK, and I know my actual Internet speed is OK too. So why does my browser Ookla speed test not show 323 Mbps? It is the same PC, with same network card and LAN cable to the router.

I’m guessing here, but the browser test is being done in the browser and I believe it is the browser itself that is not allowing more throughput, for whatever reason. Browsers are really complicated:
* Apart from 20 tabs open in my main browser, I tested in another browser with only one tab open.
* I run Brave browser with lots of extensions, so I also tried opening a private window (which blocks most of the extension) but it was only about 10 Mbps faster.
* Browsers can have their own DNS server set, separate from the PC’s DNS server.
* I did disable my VPN in the browser.
* Browsers also manage their own performance and memory usage, so that could be affecting the max speed.

But it could also not be the browser itself. I also ran a Ookla speed test from the command line. This bypasses anything to do with the browser, and the difference from using iperf3, is that it is using the PC’s DNS address. My PC showed the results below from the command line and achieved only 149 Mbps download. I switched the DNS to use my ISP’s DNS but it only gained around 2 Mbps.
Bild/FotoOokla speed test from terminal
So, I don’t have a final answer to why both my browser and the CLI Ookla speed test show way under the fibre link speed. But it may not be the browser at all (based on the CLI test). I’m going to have to look a bit closer now into the PC’s routing. I do have AdGuard running on my network, but as I recall my own PC is not routing through it. It’s going to need some finer analysis still, and I’m open to any ideas that others have.

But the primary point of the post was to try highlight some of the many factors that can affect our perception of Internet browsing speed, and how you’d start drilling down to eliminate where the potential problem may sit. All LAN setups are also different, so there is never any single solution to fit all scenarios.

To be continued…
#Blog, #speedtest, #technology, #troubleshooting