It consists of a router, two switches and an access point. In case any one of the two switches goes down it should still work. The failover link (on the left) between the router and the switch is working fine and I would like to achieve same behavior between the access point (openwrt) to a switch.
To avoid some confusion I would like to say that I know that previously 'bonding' used to be set up as an interface but in the new version of openwrt it's now set as a device (which is a good thing).
What would be the best practice to do this? Should I use bridge device somewhere here as this is the way to set VLAN filtering on openwrt?
I have tried multiple approaches but none of them gave the desired result
Switches dont crash, if they are cheap you should plan few minutes downtime for code upgrading, but in normal conditions they keep switching asic configuration while main system is being upgraded.
In normal operation traffic should be going from AP through switch 2, then switch 1 and then to the router. If switch 2 is down, then AP should use the failover link to pass traffic to switch 1 and the router.
I have STP enabled on switch 1 but what configuration should be done on AP (openwrt)? Both eth ports should be put on the bridge and STP enabled on the bridge?
Sadly just plain STP.
If you know what are you doing and you can configure STP on all bridge devices then lower the default timer values. Otherwise do not expect fail over in like 90 sec iirc.
As a second answer. I expect your devices have like at minimum 600 MHz and you have less then 16 vlans? My gut feelings are that we no longer have to deal with under powered devices like in the mid 90s so this should not be an issue. But the lameness of STP sucks in the 21. Century.
Cool kids use batman advanced but not every device supports an MTU of 1532 Byte so a wired backbone mesh is not an option every time.