openwrt / packages

Community maintained packages for OpenWrt. Documentation for submitting pull requests is in CONTRIBUTING.md
GNU General Public License v2.0
4.04k stars 3.5k forks source link

mwan3 with NCM (+virtual interface) tracking issue #16966

Open mydogteddy opened 3 years ago

mydogteddy commented 3 years ago

I am not sure if this is known, I have been configuring mwan3. I have an Huawei cpe pro 2 router connected to the WAN port of a Belkin-3200.

I use mwan3 in the Belkin-3200 and have created a fall-over to an Huawei E3372s dongle working in NCM mode

The Huawei E3372s creates 2 interfaces named in my case HuaweiNCM which I have defined however the Belkin-3200 when using the Huawei E3372s creates another virtual interface which it names as HuaweiNCM_4

I have found the only way to get this working properly is to include both interfaces in the members and then to include both of these members into the policy.

I could not get this to work without including the virtual interface in members etc.

I don't know if this is the correct way to configure this but as far as I can tell it's the only way.

I believe this is a generic problem of mwan3 handling those automatic virtual interfaces

Further advice would be gratefully received.

config globals 'globals' option mmx_mask '0x3F00' option logging '1' option loglevel 'debug' list rt_table_lookup '220'

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

config rule 'fall_over' option family 'ipv4' option dest_ip '0.0.0.0/0' option proto 'all' option sticky '0' option use_policy 'wan_Hueth_HuNCM'

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

config member 'Huawei_m2_w1' option metric '2' option weight '1' option interface 'Huawei'

config member 'HuaweiNCM_m4_w1' option weight '1' option interface 'HuaweiNCM' option metric '4'

config member 'HuaweiNCM_4_m3_w1' option weight '1' option metric '3' option interface 'HuaweiNCM_4'

config policy 'wan_Hueth_HuNCM' option last_resort 'default' list use_member 'wan_m1_w1' list use_member 'Huawei_m2_w1' list use_member 'HuaweiNCM_m4_w1' list use_member 'HuaweiNCM_4_m3_w1'

config interface 'Huawei' option enabled '1' option initial_state 'online' option family 'ipv4' option track_method 'ping' option reliability '1' option count '1' option size '56' option max_ttl '60' option timeout '4' option recovery_interval '5' option down '6' list track_ip '1.1.1.1' option interval '3' option failure_interval '10' option up '3'

config interface 'HuaweiNCM_4' option enabled '1' option initial_state 'online' option family 'ipv4' option track_method 'ping' option reliability '1' option count '1' option size '56' option max_ttl '60' option down '6' option interval '3' option failure_interval '3' list track_ip '1.1.1.1' option timeout '3' option recovery_interval '3' option up '3'

config interface 'HuaweiNCM' option enabled '1' option initial_state 'online' option family 'ipv4' option track_method 'ping' option reliability '1' option count '1' option size '56' option max_ttl '60' option timeout '4' option failure_interval '5' option recovery_interval '5' option down '5' option up '3' option interval '3' option interface 'wan' option metric '3' option weight '1' list track_ip '1.1.1.1'

pcislocked commented 1 year ago

same happens to me, i put a cron to restart mwan3 10 mins after reboot, which brings wwan back to online, but after wwan dhcp expires, if it doesn't get it renewed in time, it sometimes goes back to disabled.