If you want VLANs spread over more than one router's ports, that would require bridge, which is used to configure on which ports you want VLANs and their forms (tagged/untagged). My favourite example is
one in manual, which I find simple and easy to understand (but not everyone feels the same).
That example is for trunkless inter-vlan routering. I think
this (old) and
this (new) are more like the example in this thread, with a trunk link.
There's an updated version of the intervlan routing with bridge document referenced by @Sob
here with some changes: It specifies allowed frame types, which is good practice. The update /interface bridge vlan section does not explicitly show the untagged ports, which has the same effect, but I think is possibly more confusing, because it relies on implicit behavior. I like to explicitly specify all involved bridge-ports related to a vlan in this section, if for no other reason than if you search the config, you can see the vlan member ports in the line. But all I have configured is hEX S, and that is port limited. On a CRS with many ports, that could be unwieldy (perhaps there is a way to create a "port group" that could be treated equally, but if that feature exists, I am not aware of it. It would be nice to be able to specify a list of bridge-port and give it a name, similar to /interface list for firewalls, but that could be referenced where a list of ports would be accepted. That would make configuring a CRS with many ports configured as access ports for the same vlan easier to configure/understand. Perhaps there is a way to do it using scripts, but I haven't gotten that far, and for port limited devices like the hEX S, it wouldn't make much difference.
These are the differences (the red is what is different)
Old:
Add bridge ports and specify pvid for VLAN access ports to assign their untagged traffic to the intended VLAN:
/interface bridge port
add bridge=bridge1 interface=ether6 pvid=200
add bridge=bridge1 interface=ether7 pvid=300
add bridge=bridge1 interface=ether8 pvid=400
Add Bridge VLAN entries and specify tagged and untagged ports in them. In this example bridge1 interface is the VLAN trunk that will send traffic further to do InterVLAN routing:
/interface bridge vlan
add bridge=bridge1 tagged=bridge1
untagged=ether6 vlan-ids=200
add bridge=bridge1 tagged=bridge1
untagged=ether7 vlan-ids=300
add bridge=bridge1 tagged=bridge1
untagged=ether8 vlan-ids=400
New:
Add bridge ports and specify pvid for VLAN access ports to assign their untagged traffic to the intended VLAN. Use frame-types setting to accept only untagged packets.
/interface bridge port
add bridge=bridge1 interface=ether6 pvid=200
frame-types=admit-only-untagged-and-priority-tagged
add bridge=bridge1 interface=ether7 pvid=300
frame-types=admit-only-untagged-and-priority-tagged
add bridge=bridge1 interface=ether8 pvid=400
frame-types=admit-only-untagged-and-priority-tagged
Add Bridge VLAN entries and specify tagged ports in them. In this example bridge1 interface is the VLAN trunk that will send traffic further to do InterVLAN routing. Bridge ports with frame-types set to admit-only-untagged-and-priority-tagged will be automatically added as untagged ports for the pvid VLAN.
/interface bridge vlan
add bridge=bridge1 tagged=bridge1 vlan-ids=200
add bridge=bridge1 tagged=bridge1 vlan-ids=300
add bridge=bridge1 tagged=bridge1 vlan-ids=400