Great question! mwan3 works well on the SpacemiT K1 RISC-V platform with OpenWrt 23.05. Here is a step-by-step guide:
Ensure both WAN interfaces are configured in /etc/config/network:
config interface 'wan1' option proto 'dhcp' option device 'eth0' config interface 'wan2' option proto 'dhcp' option device 'eth1'Edit /etc/config/mwan3:
config member 'wan1_m1_w1' option interface 'wan1' option metric 1 option weight 1 config member 'wan2_m1_w1' option interface 'wan2' option metric 1 option weight 1 config policy 'balanced' list use_member 'wan1_m1_w1' list use_member 'wan2_m1_w1'mwan3 status
This should show both WAN interfaces as active and traffic distributed according to your policy. > Tip: For physical isolation, connect WAN1 and WAN2 to different RGMII interfaces, each with its own YT9152S switch. This ensures complete network separation. Feel free to ask follow-up questions!Building on the existing thread. A few things that catch people out on the SpacemiT K1 specifically when running mwan3 on OpenWrt 23.05:
mwan3 running against the older iptables backend works but is slower because every rule walks through the iptables-nft compat layer. To switch to native nftables mode, set option netmask 'ip' in /etc/config/mwan3 (or use mwan3 2.11+, which auto-detects the backend on 23.05).ifname for the two RGMII ports is stable across reboots, but the MAC address can shift if the bootloader is reflashed. Always reference WAN1 / WAN2 by ifname, never by macaddr, in mwan3 config - otherwise mwan3 will silently lose track of one of the WANs after a u-boot reflash./etc/rc.local for a measurable single-flow improvement (typically 10-20% in iperf3 single-stream tests)./etc/config/mwan3 for a dual-WAN K1 (replace eth0 / eth1 with the actual K1 RGMII interface names):
config globals 'globals'
option mmx_mask '0x7F00'
config interface 'wan'
option enabled '1'
list track_ip '8.8.4.4'
list track_ip '1.1.1.1'
option reliability '1'
option count '1'
option timeout '2'
option interval '5'
option down '3'
option up '3'
config interface 'wan2'
option enabled '1'
list track_ip '9.9.9.9'
option reliability '1'
option count '1'
option timeout '2'
option interval '5'
option down '3'
option up '3'
config member 'wan_m1_w1'
option interface 'wan'
option metric '1'
option weight '1'
config member 'wan2_m1_w1'
option interface 'wan2'
option metric '1'
option weight '1'
config policy 'balanced'
list use_member 'wan_m1_w1'
list use_member 'wan2_m1_w1'
config rule 'default_rule'
option dest_ip '0.0.0.0/0'
option policy 'balanced'
If you have specific dual-WAN K1 issues, drop the ifconfig / route / mwan3 status output and we can dig in further.
(Source: cross-referenced from the SpacemiT K1 OpenWrt wiki + community Q&A.)While waiting for the official feed, the community has been successful using OpenWrt upstream with the SpacemiT dts patches from linux-riscv. Drop a note here if you want a curated patch set.
Source: https://forum.spacemit.com/c/k1/8.json