Creating Multiple Simple Queues in Mikrotik at once

If you want to monitor every IP’s bandwidth usage there is no alternative to creating simple queues in Mikrotik. I wanted to achieve the same but creating simple queues one by one of a whole subnet is absolute madness and utterly boring. Therefore, use the following script to help creating multiple simple queues in Mikrotik at once.

:for x from 1 to 254 do={/queue simple add name="queue-$x" max-limit=2M/2M target="192.168.6.$x"  queue=default/default parent=LINK3 }

Explanation of the above code

:for x from 1 to 254 do= tells the router to keep creating queues until the value of x reaches 254

{/queue simple add name="queue-$x" defines the name format

max-limit=2M/2M target="192.168.6.$x" limits the maximum upload and download speed of the queue. Leave blank max-limit="" to have the queues unrestricted bandwidth.

queue=default/default changes queue type from small-default to default

parent=LINK3 adds the new simple queue to a parent queue called “LINK3”. Remove this parameter if you don’t want the new queues to be assigned to a parent queue.

If you have any questions or require assistance with this leave a comment down below. If you liked the post visit here for more and also don’t forget to follow our facebook page

Add a Comment

Your email address will not be published. Required fields are marked *