Two different queuing

I have DNS server with IP address 192.168.2.2/24, I want my client to have unlimited bandwidth to the DNS server but limited connection to the internet.
I tried to use perroute packet to mark packet and use simple queue to unlimited it but does not work any advice.
Thanks in advance

Do you use simple queues?
Add first simple queue,
/queue simple add target-address=your_local_subnet dst-address=DNS_Server (do not forget to set queue-type to default), add queue simple rules to limit the bandwidth for your clients below the rule.

When I add my my_local_subnet in the simple Queue for example upload 64K and download 128K, my question is does every client in the subnet will be limited to 64K/128K or all the subnet will share 64k/128K.
I more detail, I need to know does every client in this subnet can use 64k/128k in the same time.
thanks

When I add my my_local_subnet in the simple Queue for example upload 64K and download 128K, my question is does every client in the subnet will be limited to 64K/128K or all the subnet will share 64k/128K.

Subnet will be limited to 64k/128k

If you want to assign 64k/128k to every subnet user, you should use PCQ,
http://wiki.mikrotik.com/wiki/Manual:Queues_-_PCQ

How can i control Traffic via domain name example www.gmail.com

no way. you need Squid or something

you may use mark packet (mark udp and tcp 53 port)and then create simple queue with this mark an unlimited bandwidth at top of your users queue

Why (udp and tcp 53 port) i think http and https (tcp 80, tcp 443)

you may use mark packet (mark udp and tcp 53 port)and then create simple queue with this mark an unlimited bandwidth at top of your users queue

I do not think it will limit www.gmail.com traffic to the specific amount of bandwidth, neither port 80/443 will give a result.
Firewall/Queue does not offer option to limit by exact domain name, the most recommended solution to do the bandwidth limitation for www.gmail.com.

  • find all IP addresses used by www.gmail.com;
  • add them to address-list;
  • setup mangle to mark by address-list;
  • setup queue for mangle mark.

UDP / TCP 53 are the ports used by DNS, the OP wants to allow unlimited bandwidth to his DNS servers, so creating a packet mark on this traffic, then assigning a unlimited queue to that mark and putting it at the top is exactly correct.

as for limiting traffic to gmail, either implement a full web proxy suite, or try and get all the IPs of gmail and put them into a queue. it’ll work, but require you to validate the IPs you are limiting are still correct pretty frequently (I’d say at least once a month)