Community discussions

MikroTik App
 
Wyoming
Member Candidate
Member Candidate
Topic Author
Posts: 124
Joined: Wed Jun 09, 2004 11:43 pm
Location: Wyoming

PPPoE Queues

Wed Oct 12, 2005 1:19 am

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)
}
 
Wyoming
Member Candidate
Member Candidate
Topic Author
Posts: 124
Joined: Wed Jun 09, 2004 11:43 pm
Location: Wyoming

Wed Oct 12, 2005 1:38 am

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.
 
Wyoming
Member Candidate
Member Candidate
Topic Author
Posts: 124
Joined: Wed Jun 09, 2004 11:43 pm
Location: Wyoming

Wed Oct 12, 2005 9:10 pm

: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.
 
Wyoming
Member Candidate
Member Candidate
Topic Author
Posts: 124
Joined: Wed Jun 09, 2004 11:43 pm
Location: Wyoming

Tue Oct 18, 2005 5:43 pm

No one can see any problem with this script? If not then why isn't it working?

Thanks
 
User avatar
Eugene
Forum Veteran
Forum Veteran
Posts: 993
Joined: Mon May 31, 2004 5:06 pm
Location: Cranfield, UK

Fri Oct 21, 2005 4:26 pm

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.
Tout individu a droit à la vie, à la liberté et à la sûreté de sa personne.
 
Wyoming
Member Candidate
Member Candidate
Topic Author
Posts: 124
Joined: Wed Jun 09, 2004 11:43 pm
Location: Wyoming

Fri Oct 21, 2005 5:32 pm

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.
 
User avatar
Eugene
Forum Veteran
Forum Veteran
Posts: 993
Joined: Mon May 31, 2004 5:06 pm
Location: Cranfield, UK

Fri Oct 21, 2005 6:27 pm

Then try to find static queues, take the first one and move dynamic on top of that.
Tout individu a droit à la vie, à la liberté et à la sûreté de sa personne.
 
Wyoming
Member Candidate
Member Candidate
Topic Author
Posts: 124
Joined: Wed Jun 09, 2004 11:43 pm
Location: Wyoming

Fri Oct 21, 2005 6:58 pm

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"]
}
 
User avatar
Eugene
Forum Veteran
Forum Veteran
Posts: 993
Joined: Mon May 31, 2004 5:06 pm
Location: Cranfield, UK

Mon Oct 24, 2005 5:11 pm

:) nice.
Tout individu a droit à la vie, à la liberté et à la sûreté de sa personne.
 
bsnik
newbie
Posts: 36
Joined: Wed Oct 26, 2005 10:31 am

Sat Dec 03, 2005 10:35 am

how you manage to make simple queues with PPPoE service ?
 
marko_bg
Member Candidate
Member Candidate
Posts: 119
Joined: Sat Jun 03, 2006 11:48 am

Re: PPPoE Queues

Mon Sep 08, 2008 1:36 am

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.

Who is online

Users browsing this forum: vibhupandey and 23 guests