How to create most basic VLAN

It seems that people don’t find them attractive enough for some reason, but this and following examples in manual IMHO show the basics very well:

https://wiki.mikrotik.com/wiki/Manual:Interface/Bridge#VLAN_Example_.231_.28Trunk_and_Access_Ports.29

It’s really simple:

  • create bridge
  • add all ports that should participate in vlans
  • for each port set correct pvid (id of vlan that should be untagged on that port)
  • in “/interface bridge vlan” define what vlans should be tagged and untagged and where
  • if the router itself should participate in given vlan (instead of acting just like a switch), add “/interface vlan” for it on top of bridge, and IP address(es), dhcp server, … to this interface
  • enable vlan filtering on bridge

That’s it. If you want to avoid resetting whole router when you mess up, keep one port separate, so that you can always use it to access router.