Community discussions

MikroTik App
 
zimbola
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 56
Joined: Mon Feb 16, 2015 5:02 pm

Creating Queues in one shot

Sun Jul 19, 2015 8:43 am

Hello Friends.
I have more than 100 IP offered by DHCP.
I would like to create queues for all those IP in one shot
is it possible in one shot??? Or i have to do it manually one by one for 100 IP's :(

Image
 
zimbola
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 56
Joined: Mon Feb 16, 2015 5:02 pm

Re: Creating Queues in one shot

Mon Jul 20, 2015 5:36 pm

Any guides friends ??
It is really annoying if i have to manually add all the 100 IP's to queues. :(
 
wcsnet
Frequent Visitor
Frequent Visitor
Posts: 65
Joined: Mon Apr 29, 2013 12:43 pm
Location: South Africa

Creating Queues in one shot

Mon Jul 20, 2015 5:38 pm

Yep its ease are they all on the same sibme?


Sent from my iPhone using Tapatalk
 
wcsnet
Frequent Visitor
Frequent Visitor
Posts: 65
Joined: Mon Apr 29, 2013 12:43 pm
Location: South Africa

Creating Queues in one shot

Mon Jul 20, 2015 5:41 pm

Have a lool here http://forum.mikrotik.com/viewtopic.php?t=22760


Sent from my iPhone using Tapatalk
 
zimbola
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 56
Joined: Mon Feb 16, 2015 5:02 pm

Re: Creating Queues in one shot

Tue Jul 21, 2015 8:50 am

It doesn't work for me it throws an error
[admin@MikroTik] /system script> :for e from 1 to 100 do={
{... /queue simple add name=("IP-" . $e) \
{\... target-addresses=("192.168.1." . $e . "/32") \
expected end of command (line 3 column 1)
[admin@MikroTik] /system script> max-limit=32000/64000
syntax error (line 1 column 10)
[admin@MikroTik] /system script> }
 
zimbola
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 56
Joined: Mon Feb 16, 2015 5:02 pm

Re: Creating Queues in one shot

Fri Jul 24, 2015 3:07 pm

This one worked though.
:for e from=3 to=100 do={
/queue simple add name="wlan1-user $e" target="192.168.1.$e" max-limit=384000/384000 queue=default/default total-queue=default
}
I just changed the "target-addresses" to "target"

Sorry for posting in wrong section. Moderators please please please move it to scripting section :)
 
zimbola
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 56
Joined: Mon Feb 16, 2015 5:02 pm

Re: Creating Queues in one shot

Fri Jul 24, 2015 3:08 pm

Have a lool here http://forum.mikrotik.com/viewtopic.php?t=22760


Sent from my iPhone using Tapatalk
Thanks mate.