Mwan3 question

is it possible to set up a backup internet with wwan? i followed these instructions https://youtu.be/vHWYH_5ooEY?si=iM883_iO03RWmP3b and everything seems to be up, except the internet does not switch when i remove the ethernet cable.

Yes, that is the point with Mwan3. Post your settings in /etc/config/network and /etc/config/mwan3

1 Like

network:

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

config globals 'globals'
option ula_prefix 'fd97:9b5b:51df::/48'

config device
option name 'br-lan'
option type 'bridge'
list ports 'eth1.1'

config interface 'lan'
option device 'br-lan'
option proto 'static'
option ipaddr '192.168.1.1'
option netmask '255.255.255.0'
option ip6assign '60'

config interface 'wan'
option device 'eth0.2'
option proto 'dhcp'
option metric '10'

config interface 'wan6'
option device 'eth0.2'
option proto 'dhcpv6'

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

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

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

config interface 'wwan'
option proto 'dhcp'
option metric '20'

mwan3:

config globals 'globals'
option mmx_mask '0x3F00'

config rule 'https'
option sticky '1'
option dest_port '443'
option proto 'tcp'
option use_policy 'wan_to_wwan'

config rule 'default_rule_v4'
option dest_ip '0.0.0.0/0'
option family 'ipv4'
option proto 'all'
option sticky '0'
option use_policy 'wan_to_wwan'

config rule 'default_rule_v6'
option dest_ip '::/0'
option use_policy 'balanced'
option family 'ipv6'

config interface 'wan'
option enabled '1'
option initial_state 'online'
option family 'ipv4'
list track_ip '8.8.8.8'
list track_ip '8.8.4.4'
option track_method 'ping'
option reliability '1'
option count '1'
option size '56'
option max_ttl '60'
option check_quality '0'
option timeout '4'
option interval '5'
option failure_interval '5'
option recovery_interval '5'
option down '3'
option up '3'

config interface 'wwan'
option enabled '1'
option initial_state 'online'
option family 'ipv4'
list track_ip '8.8.8.8'
list track_ip '8.8.4.4'
option track_method 'ping'
option reliability '1'
option count '1'
option size '56'
option max_ttl '60'
option check_quality '0'
option timeout '4'
option interval '5'
option failure_interval '5'
option recovery_interval '5'
option down '3'
option up '3'

config member 'wan_member'
option interface 'wan'
option metric '1'
option weight '1'

config member 'wwan_member'
option interface 'wwan'
option metric '2'
option weight '2'

config policy 'wan_to_wwan'
list use_member 'wan_member'
list use_member 'wwan_member'
option last_resort 'unreachable'

I am not sure if i understand your settings right. Looks like there is no device attached to interface wwan ? And if not using ipv6 i would deleted settings for it.

wwan is connected to my iphones hotspot wirelessly as a dhcp client.

I see, but still looks like your wwan interface is connected to wifi card.

If you compare settings for wan and wwan interface in network settings there is no device configured for wwan. This should be your wifi card.

oh yea, i noticed that when i went to edit wwan under interface, it says device unspecified, but its using wlan0 and it was connected so i just left it alone.
so turns out the mwan3 is working, it just takes a long time for wwan to start working, it takes like 40 seconds, going back to wan is pretty much instant tho, I might have to try with a usb connection instead. so the reason for this setup is for gaming, my isp drops frequently so I wanted to set this up so i don't lose connection during a match, I just tested it out during a match going from wann to wan and it seemed to work fine, I played for about 3 mins but then I got kicked, do you think the change in IP makes the servers think that something funny is going on? if so, is there anyway i can have wann + wan use the same IP?

edit: i just tried it out with usb tethering and its still taking like 40s to switch.

edit2: i got it to work instantly by switching up my setup, i used wwan to connect to my isp and i used my iphone connected to my macbook to share through ethernet so that i could use the wan port as the backup and for some reason this worked, they both switched pretty much instantly, only problem is COD still kicks me out :confused: so all this for nothing.. :frowning: