Read this excellent reference with examples. http://forum.mikrotik.com/t/using-routeros-to-vlan-your-network/126489/1