2 Gbps WAN/LAN NAT Routing on ramips MT7621 devices

I would have thought the switch would be switching between the ports even if two ports were configured to different CPU ports.

that's just it tho wan is no longer part of the switch

According to the top of this thread you will get 1Gbps total, so up to 1Gbps up, or 1Gbps down, or something in between if you do both at the same time. The actual split will depend on your usage pattern but is likely to be fine as long as the total speed of your upstream wan link (up+down) is less than 1Gbps.

1 Like

I can confirm this works, the diff patch left another &ethernet intact so I had to remove it too.

OpenWrt 22.03.3 iperf3 bidirectional - PC (WAN server) <-> PC (LAN client):

Without patch + hw offloading:

[ ID][Role] Interval           Transfer     Bitrate
[  5][RX-S]   0.00-20.01  sec  1.17 GBytes   501 Mbits/sec                  receiver
[  8][TX-S]   0.00-20.01  sec  1.02 GBytes   438 Mbits/sec                  sender

With patch + hw offloading:

[ ID][Role] Interval           Transfer     Bitrate
[  5][RX-S]   0.00-20.01  sec  2.19 GBytes   940 Mbits/sec                  receiver
[  8][TX-S]   0.00-20.01  sec  1.45 GBytes   623 Mbits/sec                  sender

This was addressed on master. My diff was intended for master so that's why you had to remove that on 22.03. Good to see it's working fine.

1 Like

Given that it works is there any appetite for either:

  • Updating the current definition for the Archer A3/C3
  • Creating a second set of device definitions for the Archer A3/C3 with full speed routing

It would be nice to see these devices benefit from this enhancement in the 23.x release.

The proper way forward would be to actually somehow have the CPU/switch topology configurable at runtime (reboot OK). And provide that for all targets that can support it.

One "easier" way to do it would be to select at runtime what DT overlay to load during next boot, and provide two (one with the default one-cpu-port configuration, good for AP mode or switch mode, and another with the two-cpu-ports configuration and switch split). An even better way would be to enhance the kernel drivers to have it able to reset and reconfigure all the relevant devices, to switch their modes. THAT is likely to be more difficult and complex.

The alternative (a device sub-model with "wan-router optimized switch topology" (or whatever one should call that) is good, but you'd need to ensure it doesn't cause sysupgrade headaches. But it has the added benefit that it is fairly easy to do right now.


This sounds great, but it's definitely beyond my OpenWRT skills to implement!

Hi @arinc9
Thanks for your hard work to extend lifetime of these devices.

I have question related to the EdgeRouter X SFP incompatibility issue.
Would it be possible to implement this change even at the cost of functionality loss?

If so, what would need to be disabled, SFP port, POE output or both?
Do you have patch file for ER-X-SFP laying around?


No I tried it before, it won't work.

What a shame, anyway, I just swapped ER-X SFP for non-SFP version.
Is your patch plug&play compatible with OpenWrt 22.03.4 source code?
If so, is mt7621_ubnt_edgerouter-x.dts patching sufficient or is it necessary to modify something else?

My understanding is that it needs a new kernel (5.15), so no it isn’t (and won’t be) compatible with 22.03.x

The patch was released only for the master snapshot branch, about 8 months ago. At that time, the master branch ran on kernel 5.10. Than it has switched to kernel 5.15 about two months ago.

I guess you are right, otherwise @arinc9 would have backported the patch to 22.03. Can you enlight us about this @arinc9 ?

I put the necessary information at the top post, please read.

You have already written the answer. Sorry.
Have a nice day.

It's quite obvious that it doesn't make sense to waste time and effort to backport this change into 22.03 and that it's up to the OpenWRT maintainers to decide when it would be included into upstream.
I however asked you before just about source-compatiblity of your patch with 22.03, i.e. can I build my own 22.03 image with your patch included in it?

Sure, go try it.

Patched 22.03.4 does work as it should.
Thanks again for your contribution :slight_smile:


Tried a snapshot version of OpenWRT on Edgerouter-X and it works as advertised. Fantastic job, thanks @arinc9 !
@kam821 would you mind sharing how you applied the patch set to v22.03.4? I tried pulling the PR against a v22.03.4 branch and got a million errors, I just don't know what I did wrong. Any nudge appreciated!
Edit: please ignore me. I found the procedure here: How to compile OpenWrt PR from GitHub?

Are the patches for these devices available somewhere?