Double WAN ports, default gateway problem

Good day,
I hope you are well.
I have installed luci 22.03 on ma Archer C7 V5 router.
I use 2 internet providers. One LAN is cofigured as WAN.
My default wan network has metric 10, but second wanb network has metric 20. Both interfaces configured as DHCP clients.
I use MWAN3 for failover.

My problem is that in Dashboard when both interfaces are on the gateway is all the time from wanb, but is route through main wan. Speedtest also say that internet is through main provider.
When I switch off wanb interfaces the dashboard shows correct gateway from main wan.
Can you explain what i should do ?

The main problem is that even i have main provider connection i lost the Internet, I suppose because main wan wants to route wanb gateway.

Regards

Can you take a screenshot of that? I am not sure I understand what do you mean.

Please run the following commands (copy-paste the whole block) and paste the output here, using the "Preformatted text </> " button:
grafik
Remember to redact passwords, MAC addresses and any public IP addresses you may have

ubus call system board; \
uci export network; uci export mwan3; \
uci export dhcp; uci export firewall; \
head -n -0 /etc/firewall.user; \
ip -4 addr ; ip -4 ro li tab all ; ip -4 ru; \
ls -l  /etc/resolv.* /tmp/resolv.* /tmp/resolv.*/* ; head -n -0 /etc/resolv.* /tmp/resolv.* /tmp/resolv.*/*

Dashboard Tab:


You have IPv4 Internet.
When have both interfaces started (wan and wanb) IPv4 is 172.29.1.... and gateway 172.29.1.1 it is gateway and ip from my second provider(wanb). But when i put command in cmd tracert 8.8.8.8 i see that is routing through 192.168.1.1 as should.

When I stop wanb interface I have proper ipv4 and gateway in dashboard for main wan.

Do I need configure gateways for both networks except metrics?

I observed when the interface wanb is stopped the disconnecting of main wan doesn't exist.
When I have both interfaces started every few hours wan is stacking and does not provide internet until restart of the main wan router(sometimes I need restart few times, I suppose it is because mess in gateways.

Best regards

below interface tab:

# ubus call system board
{
	"kernel": "5.10.111",
	"hostname": "OpenWrt",
	"system": "Qualcomm Atheros QCA956X ver 1 rev 0",
	"model": "TP-Link Archer C7 v5",
	"board_name": "tplink,archer-c7-v5",
	"rootfs_type": "squashfs",
	"release": {
		"distribution": "OpenWrt",
		"version": "22.03-SNAPSHOT",
		"revision": "r19304-0e607d60ef",
		"target": "ath79/generic",
		"description": "OpenWrt 22.03-SNAPSHOT r19304-0e607d60ef"
	}
}
# uci export network
package 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 'fd15:7de1:0150::/48'

config device
	option name 'br-lan'
	option type 'bridge'
	list ports 'eth0.1'
	option ipv6 '0'

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

config device
	option name 'eth0.2'
	option macaddr 'xx:xx:xx:xx:xx:xx'
	option ipv6 '0'

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

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 vid '1'
	option ports '0t 3 4 5'

config switch_vlan
	option device 'switch0'
	option vlan '2'
	option vid '2'
	option ports '0t 1'

config device
	option name 'eth0'
	option ipv6 '0'

config switch_vlan
	option device 'switch0'
	option vlan '3'
	option ports '0t 2'
	option vid '3'
	option description 'WANB'

config interface 'WANB'
	option proto 'dhcp'
	option device 'eth0.3'
	option metric '20'
	option delegate '0'
	option defaultroute '0'

config device
	option name 'eth0.3'
	option type '8021q'
	option ifname 'eth0'
	option vid '3'
	option ipv6 '0'

# uci export mwan3
package 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_wanb'

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_wanb'

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

config interface 'wan'
	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 timeout '4'
	option failure_interval '5'
	option recovery_interval '5'
	option interval '5'
	option down '3'
	option up '3'
	option enabled '1'

config interface 'WANB'
	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 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 'wanb_member'
	option interface 'WANB'
	option metric '2'
	option weight '2'

config policy 'wan_to_wanb'
	list use_member 'wan_member'
	list use_member 'wanb_member'
	option last_resort 'unreachable'
# uci export dhcp
package dhcp

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 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'
	list rebind_domain 'free.aero2.net.pl'
	option confdir '/tmp/dnsmasq.d'

config dhcp 'lan'
	option interface 'lan'
	option start '100'
	option limit '150'
	option dhcpv4 'server'
	option leasetime '3h'
	list ra_flags 'none'

config dhcp 'wan'
	option interface 'wan'
	option start '100'
	option limit '150'
	option leasetime '12h'
	option ignore '1'
	list ra_flags 'none'

config odhcpd 'odhcpd'
	option maindhcp '0'
	option leasefile '/tmp/hosts/odhcpd'
	option leasetrigger '/usr/sbin/odhcpd-update'
	option loglevel '4'

config dhcp 'WANB'
	option interface 'WANB'
	option ignore '1'
	list ra_flags 'none'
# uci export firewall
package firewall

config defaults
	option syn_flood '1'
	option input 'ACCEPT'
	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 'WANB'

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 src_ip 'fc00::/6'
	option dest_ip 'fc00::/6'
	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'
# ip -4 addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
6: br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    inet 192.168.2.1/24 brd 192.168.2.255 scope global br-lan
       valid_lft forever preferred_lft forever
9: eth0.2@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    inet 192.168.1.184/24 brd 192.168.1.255 scope global eth0.2
       valid_lft forever preferred_lft forever
11: eth0.3@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    inet 172.29.1.148/24 brd 172.29.1.255 scope global eth0.3
       valid_lft forever preferred_lft forever
# ip -4 ro li tab all
default via 192.168.1.1 dev eth0.2 table 1 proto static src 192.168.1.184 metric 10 
192.168.1.0/24 dev eth0.2 table 1 proto static scope link metric 10 
192.168.2.0/24 dev br-lan table 1 proto kernel scope link src 192.168.2.1 
172.29.1.0/24 dev eth0.3 table 2 proto static scope link metric 20 
192.168.2.0/24 dev br-lan table 2 proto kernel scope link src 192.168.2.1 
default via 192.168.1.1 dev eth0.2 proto static src 192.168.1.184 metric 10 
172.29.1.0/24 dev eth0.3 proto static scope link metric 20 
192.168.1.0/24 dev eth0.2 proto static scope link metric 10 
192.168.2.0/24 dev br-lan proto kernel scope link src 192.168.2.1 
broadcast 127.0.0.0 dev lo table local proto kernel scope link src 127.0.0.1 
local 127.0.0.0/8 dev lo table local proto kernel scope host src 127.0.0.1 
local 127.0.0.1 dev lo table local proto kernel scope host src 127.0.0.1 
broadcast 127.255.255.255 dev lo table local proto kernel scope link src 127.0.0.1 
broadcast 172.29.1.0 dev eth0.3 table local proto kernel scope link src 172.29.1.148 
local 172.29.1.148 dev eth0.3 table local proto kernel scope host src 172.29.1.148 
broadcast 172.29.1.255 dev eth0.3 table local proto kernel scope link src 172.29.1.148 
broadcast 192.168.1.0 dev eth0.2 table local proto kernel scope link src 192.168.1.184 
local 192.168.1.184 dev eth0.2 table local proto kernel scope host src 192.168.1.184 
broadcast 192.168.1.255 dev eth0.2 table local proto kernel scope link src 192.168.1.184 
broadcast 192.168.2.0 dev br-lan table local proto kernel scope link src 192.168.2.1 
local 192.168.2.1 dev br-lan table local proto kernel scope host src 192.168.2.1 
broadcast 192.168.2.255 dev br-lan table local proto kernel scope link src 192.168.2.1 
# ip -4 ru
0:	from all lookup local
1001:	from all iif eth0.2 lookup 1
1002:	from all iif eth0.3 lookup 2
2001:	from all fwmark 0x100/0x3f00 lookup 1
2002:	from all fwmark 0x200/0x3f00 lookup 2
2061:	from all fwmark 0x3d00/0x3f00 blackhole
2062:	from all fwmark 0x3e00/0x3f00 unreachable
3001:	from all fwmark 0x100/0x3f00 unreachable
3002:	from all fwmark 0x200/0x3f00 unreachable
32766:	from all lookup main
32767:	from all lookup default

Rest command I could not find in the system:
head -n -0 /etc/firewall.user; \ and
ls -l /etc/resolv.* /tmp/resolv.* /tmp/resolv./ ; head -n -0 /etc/resolv.* /tmp/resolv.* /tmp/resolv./

This is problem of the dashboard showing only one uplink. In Bootstrap I can see all the available uplinks.

Default route needs to be enabled.

Default route is enabled for wanb. It was disabled for test. But it is the same situation with enabled and disabled default route for this interace.

Well, as I explained earlier, it is working fine, however your dashboard is showing only one uplink. Switch to the default Bootstrap to see them all.

The whole block is meant to be pasted to the console not in parts. If you don't have any resolv files, you won't have dns.

Thank you for your reply.
How may I switch to default bootstrap?

Best regards

System/System/Language and Style.

I have default bootstrap, so it is not a problem.

I can not paste all text in the command system.

If you have Bootstrap, then go to Status/Overview. It should show all connections there.

AFAIK, the default bootstrap them does not include the Dashboard tab. It is the fruit of an installed package (luci-mod-dashboard).
To remove it, go to System/Software/Installed tab and type luci-mod-dashboard on the Filter box. Then click Remove...

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.