:global i;:global e
:set e 1
:set i ($i/2+1) #make here your own random number
/queue tree{
set [find priority=1] max-limit=10000 priority=5
:foreach y in [find] do={
set [find name=(“p2pIN_user” . $i)] max-limit=30000 priority=1
}
}
:incr e
In this case i assume that all user have 10kbps bandwidth by default.
in my case not all the customers are using p2p, so instead of having a lineal increment of the variable, it would be nice to have a vector where i can put the list of customers I would like to include in this random.
then next step would be to increase priority and max-limit just if the customer is actually at the time using p2p, it would be nice to read the traffic on the queue and if more then zero then proceed, otherwise skip it and go to the next one. This would also (maybe) help on point 1
1.you have to wait (or use beta) for RouterOS v2.9. There will be possibility to work with strings and arrays, so you will be able to accomplish what you’ve planned.
I will try the script and organise the queues with some tricks, like just changing the queues with priority 5 to priority 1
and live queues that i dont want to change to priority 4 …
but this is not the solution
why dont look at the donwloaded bytes and each time it goes up to a certain amount, we can reset just the counter of this queue (is it possible) and go the next one