Hi there,
I am running OpenWrt 19.07.4 on a Newifi D1 hardware, with a WAN port configured and connected to my home router, while USB port being used as a backup WAN connection.
I am having an issue where the primary default route continues to stay even after the primary ISP connection is down, and therefore network traffic gets blackholed.
Here is the configuration,
root@OpenWrt:~# cat /etc//config/network
config interface 'loopback'
option ifname 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config globals 'globals'
option ula_prefix 'fdfa:f59f:869d::/48'
config interface 'lan'
option force_link '1'
option type 'bridge'
option ifname 'eth0.1'
option proto 'static'
option ipaddr '192.168.1.1'
option netmask '255.255.255.0'
option ip6assign '60'
config interface 'wan'
option proto 'dhcp'
option metric '10'
option ifname 'eth0.2'
config interface 'wan2'
option proto 'dhcpv6'
option disabled '1'
option metric '20'
option ifname 'eth0.2'
config interface 'vpn0'
option ifname 'tun0'
option proto 'none'
config interface 'tethering'
option proto 'dhcp'
option metric '30'
option ifname 'usb0'
config switch
option name 'switch0'
option reset '1'
option enable_vlan '1'
config switch_vlan
option device 'switch0'
option vlan '1'
option vid '1'
option ports '6t 2 1'
config switch_vlan
option device 'switch0'
option vlan '2'
option ports '6t 4'
option vid '2'
---------------------------------------
root@OpenWrt:~# cat /etc//config/mwan3
config globals 'globals'
option enabled '1'
option mmx_mask '0x3F00'
option logging '1'
option loglevel 'debug'
option rtmon_interval '5'
list rt_table_lookup '1'
list rt_table_lookup '2'
list rt_table_lookup '220'
config interface 'wan'
option enabled '1'
list track_ip '8.8.4.4'
list track_ip '8.8.8.8'
list track_ip '208.67.222.222'
list track_ip '208.67.220.220'
option family 'ipv4'
option reliability '1'
option count '1'
option timeout '2'
option interval '5'
option down '3'
option up '8'
option initial_state 'online'
option track_method 'ping'
option size '56'
option max_ttl '60'
option failure_interval '5'
option recovery_interval '5'
option check_quality '1'
option failure_latency '1000'
option failure_loss '20'
option recovery_latency '500'
option recovery_loss '5'
option keep_failure_interval '1'
config interface 'wan2'
option enabled '1'
list track_ip '8.8.4.4'
list track_ip '8.8.8.8'
list track_ip '208.67.222.222'
list track_ip '208.67.220.220'
option family 'ipv4'
option reliability '2'
option count '1'
option timeout '2'
option interval '5'
option down '3'
option up '8'
option initial_state 'online'
option track_method 'ping'
option size '56'
option max_ttl '60'
option check_quality '0'
option failure_interval '5'
option recovery_interval '5'
config interface 'tethering'
option enabled '1'
list track_ip '8.8.4.4'
list track_ip '8.8.8.8'
list track_ip '208.67.222.222'
list track_ip '208.67.220.220'
option family 'ipv4'
option reliability '3'
option count '1'
option timeout '2'
option interval '5'
option down '3'
option up '8'
option initial_state 'online'
option track_method 'ping'
option size '56'
option max_ttl '60'
option check_quality '0'
option failure_interval '5'
option recovery_interval '5'
config member 'wan_only'
option interface 'wan'
option metric '1'
option weight '3'
config member 'wan2_only'
option interface 'wan2'
option metric '2'
option weight '3'
config member 'tethering_only'
option interface 'tethering'
option metric '3'
option weight '3'
config policy 'default_poli'
list use_member 'wan_only'
list use_member 'wan2_only'
list use_member 'tethering_only'
option last_resort 'default'
config rule 'default_rule'
option dest_ip '0.0.0.0/0'
option proto 'all'
option sticky '0'
option use_policy 'default_poli'
root@OpenWrt:~# mwan3 status
Interface status:
interface wan is online 47h:44m:51s, uptime 48h:03m:50s and tracking is active
interface wan2 is offline and tracking is down
interface tethering is online 00h:56m:52s, uptime 48h:02m:30s and tracking is active
Current ipv4 policies:
default_poli:
wan (100%)
Current ipv6 policies:
default_poli:
default
Directly connected ipv4 networks:
192.168.42.0/24
224.0.0.0/3
192.168.23.0/24
192.168.1.0/24
127.0.0.0/8
Directly connected ipv6 networks:
fe80::/64
fdfa:f59f:869d::/64
Active ipv4 user rules:
2884 278K - default_poli all -- * * 0.0.0.0/0 0.0.0.0/0
Active ipv6 user rules:
618 185K - default_poli all * * ::/0 ::/0
root@OpenWrt:~#
When the primary WAN ISP goes down, I am noticing that the uptime timer continues to increment while the offline timer does not increment, as shown below,
root@OpenWrt:~# mwan3 status
Interface status:
interface wan is offline 00h:00m:00s, uptime 48h:08m:40s and tracking is active
interface wan2 is offline and tracking is down
interface tethering is online 01h:01m:42s, uptime 48h:07m:20s and tracking is active
Current ipv4 policies:
default_poli:
tethering (100%)
Current ipv6 policies:
default_poli:
default
Directly connected ipv4 networks:
192.168.23.0/24
224.0.0.0/3
192.168.42.0/24
127.0.0.0/8
192.168.1.0/24
Directly connected ipv6 networks:
fe80::/64
fdfa:f59f:869d::/64
Active ipv4 user rules:
2928 324K - default_poli all -- * * 0.0.0.0/0 0.0.0.0/0
Active ipv6 user rules:
691 49752 - default_poli all * * ::/0 ::/0
root@OpenWrt:~#