Thanks for your guide, I tried everything again.
Unfortunately it's still not working.
required packages: kmod-bonding luci-proto-bonding mii-tool ip-full git (I'm not 100% sure of git but ip-full is essential)
I had the package luci-proto-bonding installed and it had the dependencies proto-bonding and kmod-bonding, ip-full was preinstalled. So I just had to install mii-tool and git. I doubt git is necessary and also gave me an error when I installed it: "Unable to execute opkg install command: SyntaxError: Unexpected end of JSON input". However I tried reinstalling and got the message it was already installed as root and it showed under installed packages in LUCI.
use a short name for the bond interface, e.g. bond0 (it will become bond-bond0 anyway)
I used "lagg0" before but also tried "bond0" now but shouldn't matter because it has the same length. Still I can't confirm the "it will become bond-bond0 anyway" part. Mine stayed at "bond-lagg0" when I named it "lagg0".
are you sure you want to use layer 3+4 hashing? it's not standard for 802.3ad
I read the specs of my switch and it's able to make use of l3+l4 for hashing. But I changed it to l2+l3 on both sides (switch and OPNsense) again.
you can easily tell if your router uses DSA by checking for the swconfig linux command in the cli, or for the "Switch" configuration page under "Network" in luci. If your router has them it is NOT using DSA
It uses DSA. It's a Netgear G308T with OpenWrt 23.05.0 installed on it.
make sure each port is marked primary vlan for only one vlan
This shouldn't be necessary in OpenWrt for me since I only have max one untagged VLAN per physical port. I know primary VLAN should be the same as port tagging but the documentation says: "PVID: Primary VLAN ID makes the specified VLAN ID assigned to the interface the primary one. Untagged ingress will be assigned to the specified VLAN ID. This is not useful if only a single VLAN ID is assigned to the interface as untagged." (https://openwrt.org/docs/guide-user/network/dsa/converting-to-dsa#local)
change the lan interface to use one of the br-lan.xy interfaces you created by adding the vlans (xy being the vlan you want for lan). same goes for other vlans & networks, i.e. if you want you can add new networks by using the available br-lan.xy interfaces. you can set the new interfaces as static IP, dhcp client and even unmanaged (e.g. I used both dhcp client and unmanaged for the MR8300 since I want it used only as a "dumb" AP, and they work just fine)
It was preconfigured that LAN uses switch.1 (switch is the name of the bridge device and 1 the VLAN) and it can stay this way so I have direct access to my LAN when using an untagged VLAN 1 port.
For me it shouldn't be necessary to create new devices and interfaces since it's just a switch. So I unchecked the Local checkbox in Bridge VLAN filtering for all VLANs except VLAN 1. For testing purposes I checked it too.
However I used this on my dumb APs to create unmanaged interfaces so I was able to create SSIDs for every VLAN.
Let me know if you still struggle, I will try to help if I can
Very nice. Do you want me to post some config files from OPNsense and my OpenWrt switch or something else?
And two more questions:
Did you check the force link checkbox in the bonding interface? I tried both but I'm not sure what it does exactly.
Have you set an IP address from your network for this interface? I just set it to 10.0.0.1 since it's not in my network range and it also wasn't necessary to specify an IP address in my OPNsense firewall/router.