P2P up and down

We have several customers using P2P.
Each customer has its p2p traffic mangled and then put in a queue tree out and in.

I would like to play a little bit with the max-limit of the queues setting them on a cycle way to higher number.

I explain myself, lets say CL1 to CL30 have p2p on, all limited to 100kb each as max-limit.

I would like to give 1 our each to have 250kb.

So the script should read all the p2p queue avalable and then …

any of you did it?

can you describe more specific which queues you want to change (random?), at what time it should happen, when to go back to previous max-limit value?

Edgars

let’s say we have 10 queues of p2p mangled trafficm i.e.

p2pIN_user1 maxlimit 100
p2pIN_user2
p2pIN_user3 and so on

and p2pOUT_user1 etc… maxlimit 30

all of them with priority 5

every our one customer should have the BINGO TIMEm randonly
putting its queues to maxlimit 300 and the out to 90m priority to 1

then when the our is passedm back to same value and BINGO TIME to the next happy client

like a cycle

: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.

Edgars

many many thanks, I will try it asap.

Anyway there are just 2 other aspects:

  • 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

any idea?

Thank you very much
my email is gianred123@yehoo.it

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.

2.maybe ‘/tool torch’ is the helper in this case.

Edgars

ok thanks

but how do I see p2p traffic through the tool torch ? and how in s script ?
each client has a dst-nat different port

sorry, my mistake, you can’t do it with torch - it’s realtime traffic monitor.

Edgars

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

what do you suggest?

sorry but your script doesnt work

what errors are appearing in the logs after you ran it?

Edgars

I had to change a lot of things. When I have it done I will post it
many thanks anyway

actually we are NATting our users and having problems with LOWID and low performance with p2p programs… still solving this