I have installed and set up mwan3 and I believe it works.
However I may need some additional assistance.
First, here are the config files:
config globals 'globals'
option local_source 'lan'
option mmx_mask '0x3F00'
config interface 'wan'
option enabled '1'
list track_ip '1.0.0.1'
list track_ip '1.1.1.1'
list track_ip '208.67.222.222'
list track_ip '208.67.220.220'
option family 'ipv4'
option reliability '2'
config interface 'wan6'
option enabled '1'
list track_ip '2606:4700:4700::1001'
list track_ip '2606:4700:4700::1111'
list track_ip '2620:0:ccd::2'
list track_ip '2620:0:ccc::2'
option family 'ipv6'
option reliability '2'
config interface 'wwan'
option enabled '1'
list track_ip '1.0.0.1'
list track_ip '1.1.1.1'
list track_ip '208.67.222.222'
list track_ip '208.67.220.220'
option family 'ipv4'
option reliability '1'
config interface 'wwan6'
option enabled '1'
list track_ip '2606:4700:4700::1001'
list track_ip '2606:4700:4700::1111'
list track_ip '2620:0:ccd::2'
list track_ip '2620:0:ccc::2'
option family 'ipv6'
option reliability '1'
config interface '4gwan'
option enabled '1'
list track_ip '1.0.0.1'
list track_ip '1.1.1.1'
list track_ip '208.67.222.222'
list track_ip '208.67.220.220'
option family 'ipv4'
option reliability '1'
config interface '4gwan_6'
option enabled '1'
list track_ip '2606:4700:4700::1001'
list track_ip '2606:4700:4700::1111'
list track_ip '2620:0:ccd::2'
list track_ip '2620:0:ccc::2'
option family 'ipv6'
option reliability '1'
option initial_state 'online'
option track_method 'ping'
option count '1'
option size '56'
option max_ttl '60'
option timeout '4'
option interval '10'
option failure_interval '5'
option recovery_interval '5'
option down '5'
option up '5'
config member 'wan_m1_w3'
option interface 'wan'
option metric '1'
option weight '3'
config member 'wan6_m1_w3'
option interface 'wan6'
option metric '1'
option weight '3'
config member 'wwan_m1_w3'
option interface 'wwan'
option metric '1'
option weight '3'
config member 'wwan_m2_w3'
option interface 'wwan'
option metric '2'
option weight '3'
config member 'wwan_m3_w3'
option interface 'wwan'
option metric '3'
option weight '3'
config member 'wwan6_m1_w3'
option interface 'wwan6'
option metric '1'
option weight '3'
config member 'wwan6_m2_w3'
option interface 'wwan6'
option metric '2'
option weight '3'
config member 'wwan6_m3_w3'
option interface 'wwan6'
option metric '3'
option weight '3'
config member '4gwan_m1_w3'
option interface '4gwan'
option metric '1'
option weight '3'
config member '4gwan_m2_w3'
option interface '4gwan'
option metric '2'
option weight '3'
config member '4gwan_m3_w3'
option interface '4gwan'
option metric '3'
option weight '3'
config member '4gwan_6_m1_w3'
option interface '4gwan_6'
option metric '1'
option weight '3'
config member '4gwan_6_m2_w3'
option interface '4gwan_6'
option metric '2'
option weight '3'
config member '4gwan_6_m3_w3'
option interface '4gwan_6'
option metric '3'
option weight '3'
config policy 'wan_only'
list use_member 'wan_m1_w3'
list use_member 'wan6_m1_w3'
config policy 'wwan_only'
list use_member 'wwan_m1_w3'
list use_member 'wwan6_m1_w3'
config policy '4gwan_only'
list use_member '4gwan_m1_w3'
list use_member '4gwan_6_m1_w3'
config policy 'wwan_4gwan'
list use_member 'wwan_m1_w3'
list use_member 'wwan6_m1_w3'
list use_member '4gwan_m2_w3'
list use_member '4gwan_6_m2_w3'
config policy '4gwan_wwan'
list use_member '4gwan_m1_w3'
list use_member '4gwan_6_m1_w3'
list use_member 'wwan_m2_w3'
list use_member 'wwan6_m2_w3'
config policy 'wan_wwan_4gwan'
list use_member 'wan_m1_w3'
list use_member 'wan6_m1_w3'
list use_member 'wwan_m2_w3'
list use_member 'wwan6_m2_w3'
list use_member '4gwan_m3_w3'
list use_member '4gwan_6_m3_w3'
config policy 'wan_4gwan_wwan'
list use_member 'wan_m1_w3'
list use_member 'wan6_m1_w3'
list use_member '4gwan_m2_w3'
list use_member '4gwan_6_m2_w3'
list use_member 'wwan_m3_w3'
list use_member 'wwan6_m3_w3'
config policy 'balanced'
list use_member 'wan_m1_w3'
list use_member 'wan6_m1_w3'
list use_member 'wwan_m1_w3'
list use_member 'wwan6_m1_w3'
list use_member '4gwan_m1_w3'
list use_member '4gwan_6_m1_w3'
config rule 'https'
option sticky '1'
option dest_port '443'
option proto 'tcp'
option use_policy 'wan_wwan_4gwan'
config rule 'default_rule_v4'
option dest_ip '0.0.0.0/0'
option use_policy 'wan_wwan_4gwan'
option family 'ipv4'
config rule 'default_rule_v6'
option dest_ip '::/0'
option use_policy 'wan_wwan_4gwan'
option family 'ipv6'
config wifi-device 'radio0'
option type 'mac80211'
option path 'pci0000:00/0000:00:13.2/0000:03:00.0'
option channel 'auto'
option band '5g'
option htmode 'HE40'
option disabled '0'
option cell_density '0'
config wifi-iface 'wifinet2'
option device 'radio0'
option mode 'sta'
option network 'wwan'
option ssid 'xxxxxx'
option encryption 'psk2'
option key 'xxxxxx'
config wifi-device 'radio1'
option type 'mac80211'
option path 'pci0000:00/0000:00:14.0/0000:04:00.0'
option channel 'auto'
option band '2g'
option htmode 'HE40'
option disabled '0'
option cell_density '0'
config wifi-iface 'default_radio1'
option device 'radio1'
option network 'lan'
option mode 'ap'
option ssid 'xxxxxx'
option encryption 'psk2'
option key 'xxxxxx'
option wpa_disable_eapol_key_retries '1'
config globals 'globals'
option ula_prefix 'fd5c:3e41:fe5e::/48'
config device
option name 'br-lan'
option type 'bridge'
list ports 'eth0'
config interface 'loopback'
option device 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config interface 'lan'
option device 'br-lan'
option proto 'static'
option ipaddr '192.168.57.1'
option netmask '255.255.255.0'
option ip6assign '60'
config interface 'wan'
option device 'eth1'
option proto 'dhcp'
option metric '10'
config interface 'wan6'
option device 'eth1'
option proto 'dhcpv6'
option reqaddress 'try'
option reqprefix 'auto'
option metric '10'
config interface 'wwan'
option proto 'dhcp'
option device 'phy0-sta0'
option metric '20'
config interface 'wwan6'
option device 'phy0-sta0'
option proto 'dhcpv6'
option reqaddress 'try'
option reqprefix 'auto'
option metric '20'
config interface '4gwan'
option device '/dev/ttyACM0'
option proto 'xmm'
option pdp 'ipv4v6'
option apn 'internet'
option delay '10'
option auth 'auto'
option metric '30'
config dnsmasq
option domainneeded '1'
option boguspriv '1'
option filterwin2k '0'
option localise_queries '1'
option rebind_protection '1'
option rebind_localhost '1'
option local '/lan/'
option domain 'lan'
option expandhosts '1'
option nonegcache '0'
option cachesize '1000'
option authoritative '1'
option readethers '1'
option leasefile '/tmp/dhcp.leases'
option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
option nonwildcard '1'
option localservice '1'
option ednspacket_max '1232'
option filter_aaaa '0'
option filter_a '0'
config dhcp 'lan'
option interface 'lan'
option start '100'
option limit '150'
option leasetime '12h'
option dhcpv4 'server'
option dhcpv6 'server'
option ra 'server'
list ra_flags 'managed-config'
list ra_flags 'other-config'
config dhcp 'wan'
option interface 'wan'
option ignore '1'
config odhcpd 'odhcpd'
option maindhcp '0'
option leasefile '/tmp/hosts/odhcpd'
option leasetrigger '/usr/sbin/odhcpd-update'
option loglevel '4'
config defaults
option syn_flood '1'
option input 'REJECT'
option output 'ACCEPT'
option forward 'REJECT'
config zone
option name 'lan'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'ACCEPT'
list network 'lan'
config zone
option name 'wan'
option input 'REJECT'
option output 'ACCEPT'
option forward 'REJECT'
option masq '1'
option mtu_fix '1'
list network 'wan'
list network 'wan6'
list network 'wwan'
list network 'wwan6'
list network '4gwan'
list network '4gwan_6'
config forwarding
option src 'lan'
option dest 'wan'
config rule
option name 'Allow-DHCP-Renew'
option src 'wan'
option proto 'udp'
option dest_port '68'
option target 'ACCEPT'
option family 'ipv4'
config rule
option name 'Allow-Ping'
option src 'wan'
option proto 'icmp'
option icmp_type 'echo-request'
option family 'ipv4'
option target 'ACCEPT'
config rule
option name 'Allow-IGMP'
option src 'wan'
option proto 'igmp'
option family 'ipv4'
option target 'ACCEPT'
config rule
option name 'Allow-DHCPv6'
option src 'wan'
option proto 'udp'
option dest_port '546'
option family 'ipv6'
option target 'ACCEPT'
config rule
option name 'Allow-MLD'
option src 'wan'
option proto 'icmp'
option src_ip 'fe80::/10'
list icmp_type '130/0'
list icmp_type '131/0'
list icmp_type '132/0'
list icmp_type '143/0'
option family 'ipv6'
option target 'ACCEPT'
config rule
option name 'Allow-ICMPv6-Input'
option src 'wan'
option proto 'icmp'
list icmp_type 'echo-request'
list icmp_type 'echo-reply'
list icmp_type 'destination-unreachable'
list icmp_type 'packet-too-big'
list icmp_type 'time-exceeded'
list icmp_type 'bad-header'
list icmp_type 'unknown-header-type'
list icmp_type 'router-solicitation'
list icmp_type 'neighbour-solicitation'
list icmp_type 'router-advertisement'
list icmp_type 'neighbour-advertisement'
option limit '1000/sec'
option family 'ipv6'
option target 'ACCEPT'
config rule
option name 'Allow-ICMPv6-Forward'
option src 'wan'
option dest '*'
option proto 'icmp'
list icmp_type 'echo-request'
list icmp_type 'echo-reply'
list icmp_type 'destination-unreachable'
list icmp_type 'packet-too-big'
list icmp_type 'time-exceeded'
list icmp_type 'bad-header'
list icmp_type 'unknown-header-type'
option limit '1000/sec'
option family 'ipv6'
option target 'ACCEPT'
config rule
option name 'Allow-IPSec-ESP'
option src 'wan'
option dest 'lan'
option proto 'esp'
option target 'ACCEPT'
config rule
option name 'Allow-ISAKMP'
option src 'wan'
option dest 'lan'
option dest_port '500'
option proto 'udp'
option target 'ACCEPT'
I have changed the interface (network) names from earlier to look more similar and straightforward. 4gwan_6 is an automatically created virtual interface (by using the settings Proto 'xmm' and PDP 'IPv4v6').
In the single network policies in mwan3 I used IPv4 and IPv6 of the same physical interface with the same metric and weight. Is that correct? Does it matter at all in this context?
In the policies for multiple networks I did set the IPv4 and IPv6 entries of the same physical interface to the same metric and weight while the metric determines the priority of a physical interface. As I stated already I do not need traffic distribution between different networks. Are the policies Ok this way?
For all rules I used only the policy 'wan_wwan_4gwan'. So now it uses ethernet cable, if not available wlan, and finally falls back to 4G. That is OK for development, but not later on the road. How can I now switch between the policies according to how I descibed it in my first post above?
I envision to have a website where the user can select which networks to use, and enter SSID and password for the wireless network or access data for ethernet if necessary. Depending on the selection I want to run instructions, maybe a script, to connect to the desired network. I can imagine that it will not be enough to just modify config files entries but there must be some initiation of the network change. I have no idea how to do this.
Interface status:
interface wan is offline and tracking is paused
interface wan6 is offline and tracking is paused
interface wwan is online 01h:40m:17s, uptime 01h:40m:19s and tracking is active
interface wwan6 is online 01h:40m:15s, uptime 01h:40m:18s and tracking is active
interface 4gwan is online 00h:20m:34s, uptime 00h:20m:37s and tracking is active
interface 4gwan_6 is online 00h:20m:31s, uptime 00h:20m:36s and tracking is active
Current ipv4 policies:
4gwan_only:
4gwan (100%)
4gwan_wwan:
4gwan (100%)
balanced:
4gwan (50%)
wwan (50%)
wan_4gwan_wwan:
4gwan (100%)
wan_only:
unreachable
wan_wwan_4gwan:
wwan (100%)
wwan_4gwan:
wwan (100%)
wwan_only:
wwan (100%)
Current ipv6 policies:
4gwan_only:
4gwan_6 (100%)
4gwan_wwan:
4gwan_6 (100%)
balanced:
4gwan_6 (50%)
wwan6 (50%)
wan_4gwan_wwan:
4gwan_6 (100%)
wan_only:
unreachable
wan_wwan_4gwan:
wwan6 (100%)
wwan_4gwan:
wwan6 (100%)
wwan_only:
wwan6 (100%)
Directly connected ipv4 networks:
192.168.57.0/24
10.240.123.100
192.168.1.28
10.240.123.255
127.255.255.255
224.0.0.0/3
192.168.57.1
127.0.0.1
192.168.57.255
192.168.1.0/24
10.240.123.0/24
127.0.0.0/8
192.168.1.255
Directly connected ipv6 networks:
fe80::/64
2a02:3038:2e0:6fa4::/64
fdae:3665:fcd5::/64
fd5c:3e41:fe5e::/64
fdae:3665:fcd5::/48
2a02:3038:2e0:1de6::/64
2a02:3038:2e0:a67::/64
2a02:810d:8240:117e::/63
2a02:810d:8240:117e::/64
Active ipv4 user rules:
36 1910 S https tcp -- * * 0.0.0.0/0 0.0.0.0/0 multiport dports 443
2109 113K - wan_wwan_4gwan all -- * * 0.0.0.0/0 0.0.0.0/0
Active ipv6 user rules:
20 1440 S https tcp * * ::/0 ::/0 multiport dports 443
1358 182K - wan_wwan_4gwan all * * ::/0 ::/0
Powered by LuCI openwrt-23.05 branch (git-24.264.56413-c7a3562) / OpenWrt 23.05.5 (r24106-10cc5fcd00)