Sat Nov 16, 2024 4:22 pm
So the super short version ignoring very exotic needs:
If you have bridge without vlans, you "do stuff" directly on the bridge-interface (set IP of your router, etc).
If you have bridge with vlans, you hook the vlan-subinterfaces to the bridge-interface, and do everything else on the vlan-subinterfaces.
If you'll try to set firewall rules on the big bridge interface it'll be able to do very little because it will not see ethernet packets of type IP that it knows what to do with.
It will see ethernet packets of type "vlan container" - the IP packets are hiding inside. (I think you could do some filtering on MAC addreses and so on but again, unusual/exotic need).
Not sure how much profit you will have from a single list with "all the vlan subinterfaces" either, fair chance you will need to divide it further.
But some generic rules can work on such. The list with "just the bridge" will be basically useless for what you want.
As of why:
The bridge "object" is something that connects a bunch of interfaces (ethernet ports, ppp tunnels, bunch of other things) together.
From RouterOS' point of view, when you select the bridge-interface somewhere, you select the connection between the inside-of-bridge and logic/services inside of ROS.
You can have a "just passing through" bridge that's basically ignored by RouterOS functions if you don't hook up the bridge-itself interface to other processing by e.g. assigning an IP address there.
Once you activate vlan functionality on the bridge, you can have access/untagged ports which connect a single "normal" client device into a single vlan (add the vlan-tag if entering via this port, remove the vlan-tag and show the data inside when exiting via this port), or you can have trunk/tagged ports which pipe one or more vlans to destination keeping the vlan-tag intact.
(You can also do funky in-between mixes but that's for very special needs).
You do this vlan configuration in the bridge->vlans and bridge->ports sections, not in the interface->vlans menu, as those are properties of the bridge.
The "connection from bridge to RouterOS" interface is treated the same as any other bridge member here.
Typically you want your router to see/interact with many vlans (so it can deliver services, provide routing between them and so on).
So to do that, you set up the "bridge itself" interface to be a trunk port with many vlans tagged.
And if you do that, you have all those different streams of data flow out of the bridge interface, still hidden/wrapped inside vlan tags, so ROS will basically ignore them (in most cases).
Then you go to the "Interface->Vlan" menu, and create subinterfaces which will hang off the big trunked bridge pipe, and perform the job of adding/removing vlan tags.
Each of those subinterfaces is your router's pipe to "inside of that vlan", so you can work with the data - routing, firewalling, answering DHCP requests, everything else.