If you will
never require the VLANs to be present on more than one physical port then you can attach an
/interface vlan directly to a port. The do not work as drawn, they merely add a VLAN tag for packets passing in one direction and remove it for packets passing in the other.
Consider
/interface vlan
add interface=ether4 name=vlan1 vlan-id=1
add interface=ether4 name=vlan400 vlan-id=400
add interface=ether4 name=vlan401 vlan-id=401
add interface=ether4 name=vlan402 vlan-id=402
When you add IP addresses, DHCP servers, etc. to the
vlan1/
400/
401/
402 interfaces the packets have the corresponding VLAN tag added as they leave ether4. For
untagged packets you would use
ether4 directly, not
vlan1, as untagged packets have no VLAN ID. Using
vlan1 adds a tag with VLAN ID 1 for packets leaving
ether4, and will only accept packets tagged with VLAN ID 1 on entry.
The main confusion arises when a switch chip or VLAN-aware bridge is used, these typically have no mechanism for handling untagged packets internally so manufacturers use/reserve one. Untagged packets have this reserved VLAN ID added on entry to the switch or bridge, and removed on exit.
On Mikrotiks a VLAN-aware bridge behaves like a managed switch which is embedded within the Mikrotik, in addition to the external ports there is also a bridge-to-CPU port which can be configured as untagged only, hybrid or tagged only just like the external ports. Tagged traffic on this bridge-to-CPU port has to be handled by
/interface vlan as the services provided by the CPU generally expect untagged traffic only.
viewtopic.php?t=173692 may be helpful.