Friday, December 13, 2019

Script for Creating Simple Queue Automatically in Mikrotik

If you don't want to create simple queue manually, especially if you have hundreds of users in your network that need to be limited. There's a way to create those queues in just a second. Here's how it's done :
- First Make Parent Queue, for this example we'll give it name "warnet". Set Target to interface connected to client/user, in this example we'll use ether4, and then set Max-limit .
- Open new terminal in winbox and paste these codes :

:for x from 10 to 20 do={/queue simple add name="queue-$x" max-limit=2M/2M target="192.168.1.$x" limit-at=126k/128k priority=7/7 queue=default/default parent=warnet}

Note :
- 10 to 20 = ip address range, for example : from 192.168.1.10 to 192.168.1.20

- queue-$x = name of each queue that will be created, you can change queue to what ever you like for example PC-$x

- 192.168.1.$x = your network address, if your network is 172.16.1.0/24 then change it to 172.16.1.$x

- warnet = name of the parent you created before.

Here's the result after you pasted the script into new terminal :

No comments:

Post a Comment