My current Internet connection aggregates 2 modems, so I have two ethernet cables, one from each modem.
I'm testing a setup where I'm virtualizing the OpenWrt router inside a Proxmox cluster (kvm/qemu, the usual stuff) with redundant networking.
This means that there are two network switches, and each Proxmox host is connected to both, using a Linux bonding set to active-backup (i.e. failover, either one cable or the other works at the same time, not both). This should ensure that if one of the network switches dies the cluster is still operational.
My current plan was to use an OpenWrt wifi router device I have laying around to aggregate both ethernet cables of the two modems and a wifi network over a single ethernet cable using VLANs, so I have VLAN 7 and 8 dedicated to the modems and VLAN 4 from the wifi, with one port untagged each, and both come out of a tagged port that goes to the switch, and from there it goes to the Proxmox cluster and the OpenWrt router VM inside.
And this works.
But this setup isn't connected to both switches of the redundant networking setup, so if I lose the switch it is currently connected to, I lose access to the wifi and to the internet.
I tried setting an additional port as tagged for VLANs 4, 7 and 8 so I could connect one on a switch and one on the other, but it does not really work.
I'm looking for a way to set up a Linux bonding set to active-backup on this wifi router as well, but with VLANs. I have installed luci-protocol-bonding (which lets me create bonds like that) and tried some things but nothing worked and I'm not sure what I should do here.
This is the current /etc/config/network, and this device is using DSA switching architecture. The "lan" interface is used as a management interface to not lock myself out of the box while I'm doing experiments, and is connected to the WAN port (which is called "internet" here for some reason)
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 'fdb0:036c:c59f::/48'
config device
option name 'br-lan'
option type 'bridge'
option bridge_empty '1'
option ipv6 '0'
list ports 'ethernet1'
list ports 'ethernet2'
list ports 'ethernet3'
list ports 'ethernet4'
list ports 'internet'
option stp '1'
config interface 'lan'
option proto 'static'
option ipaddr '192.168.1.1'
option netmask '255.255.255.0'
option ip6assign '60'
option device 'br-lan.1'
config bridge-vlan
option device 'main-switch'
option vlan '7'
list ports 'ethernet1'
list ports 'ethernet3:t'
list ports 'ethernet4:t'
config bridge-vlan
option device 'main-switch'
option vlan '8'
list ports 'ethernet2'
list ports 'ethernet3:t'
list ports 'ethernet4:t'
config bridge-vlan
option device 'br-lan'
option vlan '1'
list ports 'internet:u*'
config bridge-vlan
option device 'br-lan'
option vlan '7'
list ports 'ethernet1'
list ports 'ethernet3:t'
list ports 'ethernet4:t'
config bridge-vlan
option device 'br-lan'
option vlan '8'
list ports 'ethernet2'
list ports 'ethernet3:t'
list ports 'ethernet4:t'
config interface 'vlan7'
option device 'br-lan.7'
option proto 'static'
option ipaddr '192.168.8.2'
option netmask '255.255.255.0'
option defaultroute '0'
config interface 'vlan8'
option device 'br-lan.8'
option proto 'static'
option ipaddr '192.168.88.2'
option netmask '255.255.255.0'
option defaultroute '0'
config bridge-vlan
option device 'br-lan'
option vlan '4'
list ports 'ethernet3:t'
list ports 'ethernet4:t'
config interface 'vlan4'
option device 'br-lan.4'
option proto 'dhcp'