Archer C7 V2 max. LAN speed on 19.07.04

I just upgraded my WAN speed. Now it is 600 Mbps down. If I connect my laptop directly to the modem, I get this speed but, when I connect it via router (to LAN port), it does not go above 200~225 Mbps. I have seen people claim 600 Mbps on this hardware. What configuration is required?

Here are the details.

Model|TP-Link Archer C7 v2
Architecture|Qualcomm Atheros QCA9558 ver 1 rev 0
Firmware Version OpenWrt 19.07.4 r11208-ce6496d796 / LuCI openwrt-19.07 branch git-20.247.75781-0d0ab01

Software offload checked
Hardware offload not checked

I have three VLANs on the LAN side. LAN, Guest and IoT. I have DDNS and wireguard (not being used right now, just installed). There are no additional packages that stress the network. QoS was installed but removed now.

That is roundabout the most you can expect from this single-core 720 MHz mips 74kc hardware, it's really punching way above its weight limit here (to be fair, most hardware will not cope with this).

The only potential for improvement is with enabling software flow-offloading (hardware flow-offloading isn't supported for this hardware yet), but this won't move mountains either. The only real solution would be looking for faster hardware (x86_64 or the RPi4 come to mind, mvebu would as well - but there you'd have to deal with bad wireless support; ipq8065 limits out just around (or slightly below) that figure as well). Complex inter-VLAN routing or VPN usage would make this situation even worse.

You forgot to specify the key piece of information: how is your WAN organized. Is it a plain DHCP-based connection, or is PPPoE involved? All 700Mbps results (including mine) are without PPPoE. If your WAN is DHCP-based or static IP, then you should get 600 Mbps with your setup, so we need to troubleshoot (start with rebooting your router). I will benchmark with PPPoE later today.

SW offload should net you more. Sure you are not running some sort of packet inspection? What does top say when running speed test? Also, you can overclock it up to 1GHz, speed will scale linearly.

That being said, it is an old router running software NAT on 720MHz single core CPU.

Just finished the benchmark. Lab conditions, i.e. the PPPoE server is connected to the router directly via cable, and the laptop is connected to the router via another cable. TP-Link Archer C7 v2, OpenWRT 19.07.2, iperf3 as a benchmark, single stream, BBR on both sides, no overclocking.

With PPPoE:

No flow offload: upload 303 Mbits/sec, download 434 Mbits/sec.
Flow offload enabled: upload 605 Mbits/sec, download 848 Mbits/sec

With IPoE:

No flow offload: upload 306 Mbits/sec, download 401 Mbits/sec
Flow offload enabled: upload 750 Mbits/sec, download 873 Mbits/sec

As another troubleshooting step, if you have a second PC that can function as a fake WAN, I would suggest that you try to replicate these benchmarks. If you need help with that, just ask.

My WAN is plain, DHCP. I get both IPV4 and IPV6 addresses. I do not have other powerful machines that can fake Gigabit WAN connection except for this laptop right now. I may be able to make a Linux box with Gigabit Ethernet later. How do you run iperf?

@Gruntruck I am not running any packet inspection software.

I understand the limitations of the old hardware but just as @patrakov demonstrated, the router is capable of doing more than what I am getting. I have turned ON software offload and turned OFF hardware offload. I am not running any VPN right now. It is just installed. Yes, I do have one extra VLAN than normal home usage. ipq8065 is supposed to be dual core running at 1.7 MHz on r7800. Are you suggesting that even that will not handle gigabit wired WAN connection? (It was my next purchase if C7 does not cut it.)

Correct.

Well, correct. And I was surprised by this fact, too.

R7800 gives much better SAMBA performance than Archer C7 (80 MB/s vs 12 MB/s). So its CPU is much more capable. The problem therefore looks like a woefully inefficient Ethernet driver on the R7800, and, by extension, on ipq8065 - but that's just my conclusion.

There are reports that ESPRESSObin V5 (and therefore V7?) is able to handle gigabit NAT despite a slower CPU, and, unlike Linksys products, it does not always come with a crappy Marvell WiFi adapter. The catch is that you have to supply a WiFi adapter (or two: one mini PCIe and one USB) yourself.

To the OP:

Still, in your situation, I would rather keep the Archer.

First things first: check and replace both cables.

Then please ssh into the router and run "top". Do a speed test. If, during the speed test, the "idle" field in the header is greater than 0%, then there is still some oomph left in the CPU, and it's your ISP (or bad cable) who shapes the traffic. There are indeed some crappy ISPs that do that based on the TTL. Here is a rule to be placed in firewall.user to test this hypothesis (needs the iptables-mod-ipopt package, and only do this if there is indeed some unused CPU time):

iptables -t mangle -F POSTROUTING
iptables -t mangle -A POSTROUTING -o eth0.2 -j TTL --ttl-inc 1

If the idle time is 0%, we need to debug that, and I don't yet have any good suggestions on this front.

As another (rather drastic but I would say useless) debugging step, maybe just to convince yourself that the problem is not in the router, given that you can't fake the gigabit WAN yet, you may want to overclock the router CPU to 1000 MHz and retest the speed.

Regarding the iperf: I use iperf3.

On the server (in the fake WAN - please temporarily reconfigure it for a static IP) I run it like this: iperf3 -s -p 9999

On the client, for testing upload speed: iperf3 -c $SERVER_IP -p 9999

On the client, for testing download speed: iperf3 -R -c $SERVER_IP -p 9999

You don't have a Linux server, but this is not actually a problem. Get a cheap gigabit USB adapter (e.g. TP-Link UE-300), boot from a live distribution of Ubuntu, and then you can create an LXC or LXD container and move the USB adapter into it. Bingo, you have two unlinked gigabit-capable servers in one box. Contact me on Skype (@aepatrakov) or on Telegram (same username) or on Wire (@patrakov) if you want real-time guidance on this procedure.

To be fair, ipq806x is much faster than any ath79 released so far - it just isn't fast enough to route at 1 GBit/s linespeed (without NSS assistance).

Ran few tests on the wired connection again. It does peak at 500+ mbps but the final results are still in 300~. I do not think ISP is traffic shaping. When I connect the laptop directly to the cable modem using the same cable, I do get 600+ mpbs speed consistently.

Router CPU idles at 87 <-> 96% before test. It goes down to 38% when peak download speed is showing in the test.

I have a another thread running about 2.4 GHz WiFi dying in Archer C7. While debugging I had noticed that when I was watching a HD steam on TV (wired connection to Ethernet), my WiFi would crawl. I am not sure if this is related. But it looks like the switch cannot handle the speed. I do have two LAN ports assigned to guest and IoT VLANs each.

I will try the fake ISP and iPerf LAN to LAN test through switch soon. Here are the current speed test results.

Through Archer C7
Screen Shot 2020-12-01 at 3.56.20 PM

Direct to the cable modem. Same Ethernet cable.
Screen Shot 2020-12-01 at 4.21.35 PM

So, currently which OpenWrt supported hardware does 1 gbps LAN routing? I spent a lot of time searching for suitable devices in the market. It seems that everybody is using Broadcom chips these days :-1:

Foremost x86_64 does, easily. mvebu does as well, but typically comes with unreliable/ bad wifi (mwlwifi); the RPi4 would cope easily as well.

Looks more like a misconfigured router that uses software bridging between switch ports, rather than hardware switching. Please post the contents of /etc/config/network for me to verify this.

And yes, WiFi is a known CPU eater on this router.

You could try overclocking the archer. I have it clocked at 1 GHz.

mvebu is pretty much the gold standard for Ethernet.

WiFi from what I've heard works fine with the WRT3200ACM and WRT32X. The older models are fairly poor performers. You also need to forgot about WPA3.

Here is the config. BTW I am using another router as AP and 2.4 GHz is turned off all this time due to WiFi issue.

/etc/config# cat network

config interface 'loopback'
	option ifname 'lo'
	option proto 'static'
	option ipaddr '127.0.0.1'
	option netmask '255.0.0.0'

config globals 'globals'
	option ula_prefix 'fd00:1234:43bb::/48'

config interface 'lan'
	option type 'bridge'
	option ifname 'eth1.1'
	option proto 'static'
	option netmask '255.255.255.0'
	option ip6assign '60'
	option ipaddr '192.168.1.1'

config interface 'wan'
	option ifname 'eth0.2'
	option proto 'dhcp'
	option hostname 'router'
	list dns '9.9.9.9'
	list dns '149.112.112.112'
	option peerdns '0'

config interface 'wan6'
	option ifname 'eth0.2'
	option proto 'dhcpv6'
	list dns '2620:fe::fe'
	list dns '2620:fe::9'
	option reqprefix 'auto'
	option reqaddress 'try'
	option peerdns '0'

config switch
	option name 'switch0'
	option reset '1'
	option enable_vlan '1'

config switch_vlan
	option device 'switch0'
	option vlan '1'
	option vid '1'
	option ports '3 2 0t'

config switch_vlan
	option device 'switch0'
	option vlan '2'
	option vid '2'
	option ports '6t 1'

config switch_vlan
	option device 'switch0'
	option vlan '3'
	option vid '3'
	option ports '4 0t'

config switch_vlan
	option device 'switch0'
	option vlan '4'
	option vid '4'
	option ports '5 0t'

config interface 'guest'
	option proto 'static'
	option ifname 'eth1.3'
	option ipaddr '10.11.3.1'
	option broadcast '10.11.3.255'
	option type 'bridge'
	option netmask '255.255.255.0'

config interface 'iot'
	option proto 'static'
	option ifname 'eth1.4'
	option ipaddr '10.11.4.1'
	option broadcast '10.11.4.255'
	option type 'bridge'
	option netmask '255.255.255.0'
	list dns '9.9.9.9'

The configuration looks simple and correct.

So - obvious question: is the result on speedtest.net (as opposed to dslreports.com) also slow?

My ISP test results match dslr results. Given that the direct modem connection is fast, why do you suspect DSLR results? I even tried fast.com. It show similar difference albeit slightly slower than DSLR.

1 Like

OK, so we know that the CPU is not the bottleneck. Could you please do the test with TTL adjustment on the router, to rule out ISP cheating? Here is how:

opkg update
opkg install iptables-mod-ipopt
iptables -t mangle -F POSTROUTING
iptables -t mangle -A POSTROUTING -o eth0.2 -j TTL --ttl-inc 1

Then redo the speed test. No matter what the result is, reboot the router, in order to undo the tweak.

Just to explain the (wrong) line of thought, here are my results with R7800:

speedtest from Chromium with dslreports 353.2 Mbps down / 802 Mbps up
speedtest from Chromium incognito tab with dslreports 357.3 Mbps down / 747 Mbps up
speedtest from Chromium against speedtest.net, Rostelecom server 390.60 Mbps down / 914.40 Mbps up
speedtest from incognito Chromium tab, Rostelecom server 787.60 Mbps down / 918.80 Mbps up
speedtest from the speedtest.net cli app, Rostelecom server 839.35 Mbps down / 936.22 Mbps up
speedtest from the speedtest.net cli app, TTK Ural server 683.19 Mbps down / 920.56 Mbps up, the difference is that I have less than 1 ms ping to Rostelecom and ~20 ms to TTK Ural.

See how unreliable and dependent on the exact benchmarking methodology the speed test result is? But you are right, I cannot refute the fact that the same methodology (browser) yields different results with and without the Archer in the middle.

How do you overclock the router?

1 Like