2 Gbps WAN/LAN NAT Routing on ramips MT7621 devices

what if I create two networks? lets say 192.168.1.0/24 (lan port) and 192.168.2.0/24 (wan port) . test between them would test routing troughoutput ?

1 Like

Yeah that will work.

Just to confirm - where a device is listed as “cannot benefit” I assume that this is something that cannot be worked around without a hardware mod? I have an Archer C6 v3 and I get that the WPS button is using a GPIO pin which clashes with RGMII2.

I wouldn’t mind installing a firmware with faster routing and no WPS button, but I don’t want to end up with custom hardware I’ve soldered myself!

I don't know why C6 v3 was left out, C6U which is hardware identical was converted.
C6 v3 is only lacking the USB port.

The WPS button for the C6U is on GPIO 10 but for the C6/A6 it’s on GPIO 28 which clashes with RGMII2

Yeah, you can disable the button in the devicetree in favor of using gmac1. I can send you a test build if you'd like.

If you can build yourself, you can apply this diff.

diff --git a/target/linux/ramips/dts/mt7621_tplink_archer-x6-v3.dtsi b/target/linux/ramips/dts/mt7621_tplink_archer-x6-v3.dtsi
index 217c1b60fe..2b2f6cfbf4 100644
--- a/target/linux/ramips/dts/mt7621_tplink_archer-x6-v3.dtsi
+++ b/target/linux/ramips/dts/mt7621_tplink_archer-x6-v3.dtsi
@@ -21,13 +21,6 @@
 	keys {
 		compatible = "gpio-keys";
 
-		wps {
-			label = "wps";
-			gpios = <&gpio 28 GPIO_ACTIVE_LOW>;
-			debounce-interval = <60>;
-			linux,code = <KEY_WPS_BUTTON>;
-		};
-
 		reset {
 			label = "reset";
 			gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
@@ -115,7 +108,7 @@
 
 &state_default {
 	gpio {
-		groups =  "i2c", "rgmii2", "uart2", "uart3", "jtag", "wdt";
+		groups =  "i2c", "uart2", "uart3", "jtag", "wdt";
 		function = "gpio";
 	};
 };
@@ -148,22 +141,29 @@
 	};
 };
 
-&ethernet {
-	pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>;
+&gmac0 {
+	nvmem-cells = <&macaddr_config_8>;
+	nvmem-cell-names = "mac-address";
 };
 
-&gmac0 {
+&gmac1 {
+	status = "okay";
+	label = "wan";
+	phy-handle = <&ethphy0>;
+
 	nvmem-cells = <&macaddr_config_8>;
 	nvmem-cell-names = "mac-address";
 };
 
+
+&mdio {
+	ethphy0: ethernet-phy@0 {
+		reg = <0>;
+	};
+};
+
 &switch0 {
 	ports {
-		port@0 {
-			status = "okay";
-			label = "wan";
-		};
-
 		port@1 {
 			status = "okay";
 			label = "lan1";
3 Likes

That’s amazing news. I have a second C6 v3 that I will try this on when I get some time (probably in a few weeks)

If it does work then I would be more than happy to exchange a WPS button that I never use for improved routing capacity that matches the interface speed. Is there any likelihood that it might eventually make it into the official image list?

It depends on whether or not it works, first of all. I don't think this would be accepted as the default way, so you'd do it for your own use case.

Would the TP-Link ER605 v1 and v2 be compatible?

ER605 v2 devicetree already implements this so the answer is yes. I don't see ER605 v1 support on OpenWrt at all.

The hardware offloading page in the official ubiquity documentation indicates that ER-X-SFP is supported, but does not details if it only concerns some interfaces.
Is this an omission from their side?

edit: nevermind

You seem to be confusing hardware offload with what this topic is about?

1 Like

Yup. My bad I got this entirely wrong :confused:

Any luck with trying this concept on Tplink Archer C6 (v3 / v3.20) ?
Can somebody build sysupgrade firmware update file with the patch or explain how to do it myself for the above model?
What are the chances that this feature gets integrated into the next release (build) or should it always stay as a patch?

Hi.
You can use the firmware selector.
https://firmware-selector.openwrt.org/?version=SNAPSHOT&target=ramips%2Fmt7621&id=tplink_archer-c6-v3
It is advised to add luci as customized package.
As this patch has already been merged, it will be included in the next major release. In the mean time it is only available within master snapshot.

1 Like

I don’t think that the C6 v3 has this enabled, even in master. The current master file is https://github.com/openwrt/openwrt/blob/master/target/linux/ramips/dts/mt7621_tplink_archer-x6-v3.dtsi

The patch to apply is in this post and as you can see it removes the WPS button, which is clearly present visible in master.

The topic is about WAN/LAN routing on mt7621, not WPS button.

What do you mean it has already mergerd?
So we don't need to create a customized image to apply it anymore?

that's nothing hard here you need only edit DTS file, if the device can support that setting.

gmac0
gmac1

The Archer C6 v3 is listed as "cannot support" the WAN/LAN routing throughput improvement. This is because the WPS button on the device is mapped to a physical pin on the mt7621 which is also needed for the routing improvement. You can't use the pin for both things at the same time so there is a patch in this forum topic which can be applied to remove the WPS button from the Archer C3 v3 DTS file and enable the routing throughput improvement.

1 Like