Page 1 of 1
adding multiple queues with a script
Posted: Tue Nov 30, 2004 9:51 am
by kapis
HI i can't manage to get my script working, so I was wondering if someone could help me.
Posted: Tue Nov 30, 2004 2:37 pm
by edzix
so, explain a bit further - what kind of script did you try? Where and what do you want to add?
Edgars
Posted: Tue Nov 30, 2004 4:00 pm
by kapis
for exaple i want to add a simple queues (2Mbps) for every ip in 10.90.90.0 subnet and name them user1, user2.... and so on
Posted: Tue Nov 30, 2004 4:11 pm
by normis
Posted: Tue Nov 30, 2004 6:27 pm
by kapis
No that's not what i meant, i need to add queues with script so I dont't need to add queue for each client manualy.
Posted: Tue Nov 30, 2004 7:06 pm
by Eugene
PCQ uses one rule for all clients, equally shaping traffic between them.
But if you want a script, read this:
http://www.mikrotik.com/docs/ros/2.8/ap ... t#11.2.2.1
Posted: Tue Nov 30, 2004 8:37 pm
by [ASM]
Kapis try this:
/ip firewall mangle add dst-address=10.90.90.0/24 mark-flow=down
/ip firewall mangle add src-address=10.90.90.0/24 mark-flow=up
/queue type add name=down kind=pcq pcq-rate=512000
/queue type add name=down kind=pcq pcq-rate=64000
/queue tree add name=down queue=down parent=global-in flow=down
/queue tree add name=up queue=up parent=global-out flow=up
It works great :)
Posted: Wed Dec 01, 2004 5:44 pm
by kapis
thanks it helped :)
add customer
Posted: Sun Feb 27, 2005 1:22 am
by djdodo
hi,it is possible add new customer to MANGLE and QUEUE TREE over one script.
I need easy add via
http://www...
Posted: Mon Feb 28, 2005 4:50 pm
by Eugene
Of course you can do it in one script, e.g.:
:for e from 1 to 100 do={
/ip firewall mangle add\
src-address=(1.1.1. . $e)\
src-netmask=255.255.255.255\
mark-flow=$e
/queue tree add flow=$e (anything you want after)
}
re
Posted: Mon Feb 28, 2005 8:44 pm
by djdodo
Sorry,how to upload from e.g. linux server to Mikrotik?
We need this solution for my dummy office-girl
She is dont know principle TCP/IP and other...
Of course you can do it in one script, e.g.:
:for e from 1 to 100 do={
/ip firewall mangle add\
src-address=(1.1.1. . $e)\
src-netmask=255.255.255.255\
mark-flow=$e
/queue tree add flow=$e (anything you want after)
}
Posted: Tue Mar 01, 2005 11:34 am
by Eugene
Search the scripting forum. This question has been answered many times before.
Re:
Posted: Sat Aug 15, 2015 4:59 pm
by monj3d
Search the scripting forum. This question has been answered many times before.
Try this
/queue simple
:for i from=2 to=253 do={add name=("Usuarios $i") target=("192.168.0.$i") max-limit=512K/1024k limit-at=512k/1024k total-queue=default queue=pcq-up/pcq-down burst-limit=600k/1200k burst-threshold=512k/1024k burst-time=120/120 comment=("USUARIO $i")}