Page 1 of 1

PPPoE Queues

Posted: Wed Oct 12, 2005 1:19 am
by Wyoming
I have PPPoE set up on my mikrotik but when it adds the simple queue it adds it at the bottom of the list. Is there a way to change where it will add it?

I wrote a script to move it to the top of the queue list but I can't get it to work. Can anyone see any problems with this script.

Thanks


:foreach I in=[/queue simple find dynamic=yes] do={
/queue simple move $I 0
:log info ("moved " . $I)
}

Posted: Wed Oct 12, 2005 1:38 am
by Wyoming
If I manually move the queue to somewhere near the top of the list of queues, I have found that no matter what I put into this script for the location to move it to, It will move the Dynamic queue back to the bottom of the list queues.

Thanks for any help you can give me.

Posted: Wed Oct 12, 2005 9:10 pm
by Wyoming
:foreach I in=[/queue simple find dynamic=yes] do={
/queue simple move $I 0
:log info ("moved " . $I)
}

Can anyone tell me why this isn't working. Everything I have tried doesn't make a difference. The scrip above will only move the script to the bottom of the list of queues. I wan't it to move it to the top of the list of queues. What am I doing wrong here?

Thanks for any advice you can give me.

Posted: Tue Oct 18, 2005 5:43 pm
by Wyoming
No one can see any problem with this script? If not then why isn't it working?

Thanks

Posted: Fri Oct 21, 2005 4:26 pm
by Eugene
This has been told many times before:
DO NOT USE ITEM NUMBERS IN SCRIPTS!
:foreach I in=[/queue simple find dynamic=yes] do={
/queue simple move $I *1
:log info ("moved " . $I)
} 
Instead of *1 which represents internal console number of the 1st item, you should use find statement.

Posted: Fri Oct 21, 2005 5:32 pm
by Wyoming
You have me confused then. The 0 in my script is the position where I am trying to move the queue to. So how would I use the find statement to find the first location. Do you have any suggestions that would work better for me on this script?

I really need something that will move the dynamic queues to the top of the list.
This has been told many times before:
DO NOT USE ITEM NUMBERS IN SCRIPTS!

Code:
:foreach I in=[/queue simple find dynamic=yes] do={
/queue simple move $I *1
:log info ("moved " . $I)
}


Instead of *1 which represents internal console number of the 1st item, you should use find statement.
Thank you for your resonse.

Posted: Fri Oct 21, 2005 6:27 pm
by Eugene
Then try to find static queues, take the first one and move dynamic on top of that.

Posted: Fri Oct 21, 2005 6:58 pm
by Wyoming
I have this figured out now. Thank you for your help Eugene.

What I did was make a Queue that I disabled at the top of the list with a special name. I then used that to find the location of the top of the list and move the Dynamic Queues above that.

Here is the working script.

:foreach I in=[/queue simple find dynamic=yes] do={
:log info ("Moved queue " . $I)
/queue simple move $I [/queue simple find name="Static Queues - Do Not Remove"]
}

Posted: Mon Oct 24, 2005 5:11 pm
by Eugene
:) nice.

Posted: Sat Dec 03, 2005 10:35 am
by bsnik
how you manage to make simple queues with PPPoE service ?

Re: PPPoE Queues

Posted: Mon Sep 08, 2008 1:36 am
by marko_bg
I need script , to move dinamic pppoe simplequeue to No.3 in SQ table,
but only for user with IP 172.20.xxx.xxx (172.20.0.0/16)

script can find interface with network 172.20.xxx.xxx, and used name of this interface to find SQ rules and move to No.3

have someone solution for this ?

I give licence lev4 for the script.