MUM 2010
It is currently Tue Feb 09, 2010 5:10 am

All times are UTC + 2 hours [ DST ]




Post new topic Reply to topic  [ 44 posts ] 
Author Message
 Post subject: Moving Static Queue Above Dynamic Queues
PostPosted: Sat Sep 29, 2007 11:25 pm 
Offline
Member
Member
User avatar

Joined: Wed Sep 06, 2006 1:42 pm
Posts: 391
Location: Abuja, Nigeria
I use this code in a hotspot login script
Code:
/queue simple move [find name=cached] 0
to move a particular rule to the topmost position. The script executes fine but rule does not get to position "0". The rule always end up below the dynamic rules.

I can manually move the rule to position "0" in winbox but the script can only move it as far as the dynamic rules. I am using ROS3.0RC5.

Image


Top
 Profile  
 
 Post subject: Re: Moving Static Queue Above Dynamic Queues
PostPosted: Mon Oct 01, 2007 12:56 pm 
Offline
Member
Member
User avatar

Joined: Wed Sep 06, 2006 1:42 pm
Posts: 391
Location: Abuja, Nigeria
Anyone?


Top
 Profile  
 
 Post subject: Re: Moving Static Queue Above Dynamic Queues
PostPosted: Tue Oct 02, 2007 12:53 am 
Offline
Frequent Visitor
Frequent Visitor

Joined: Fri Mar 23, 2007 10:09 pm
Posts: 75
Location: HONDURAS
hello i, i am trying to do the exactly same thing for the same reason. will delete my message or move it here as it is the same topic.

michael


Top
 Profile  
 
 Post subject: Re: Moving Static Queue Above Dynamic Queues
PostPosted: Tue Oct 02, 2007 12:25 pm 
Offline
Frequent Visitor
Frequent Visitor

Joined: Fri Mar 23, 2007 10:09 pm
Posts: 75
Location: HONDURAS
hello ,,

if we cant move the static above the dynamic with script what about moving the dynamic below the static???

anybody out there with anygood ideas??


Top
 Profile  
 
 Post subject: Re: Moving Static Queue Above Dynamic Queues
PostPosted: Tue Oct 02, 2007 1:29 pm 
Offline
Frequent Visitor
Frequent Visitor

Joined: Fri Mar 23, 2007 10:09 pm
Posts: 75
Location: HONDURAS
tried this but somting is wrong in it

{

:local name

/queue simple
:foreach i in=[/queue simple] do={

:set name [get $i name]

:if ($name=!"proxy_cache") do={
/queue simple move 0 6
}
}

_________________
setting up small WISP in Honduras over Satelite connections


Top
 Profile  
 
 Post subject: Re: Moving Static Queue Above Dynamic Queues: Possible bug?
PostPosted: Fri Oct 05, 2007 8:45 am 
Offline
Member Candidate
Member Candidate

Joined: Mon Jun 05, 2006 8:26 pm
Posts: 222
Location: Kenya
Hi Folks,

Have we stumbled upon a bug here?

I am able to replicate exactly what you are saying, in that dynamic queues for hotspot ALWAYS join at the top of the list, BUT this is not ALWAYS true for ALL dynamic queues.

I tried this also with my PPPOE server, and the PPPOE dynamic queues ALWAYS join at the bottom of the list (i.e. AFTER the static queues) therefore negating the need for the script that you guys (and myself) are looking for.

So, can someone at Mikrotik confirm for us what is the expected normal behaviour of dynamic queues?

Regarding the script, the first one that Skillful proposes always sends the static queues to the bottom because (I believe) we havent issued the print command before running the move command.

So I think mps01k is heading in the right direction in that we must query the queues first and then issue the move command.

I am not too good on scripting but am trying to work it through.....


Top
 Profile  
 
 Post subject: Re: Moving Static Queue Above Dynamic Queues
PostPosted: Mon Oct 08, 2007 10:09 pm 
Offline
Member Candidate
Member Candidate

Joined: Mon Jun 05, 2006 8:26 pm
Posts: 222
Location: Kenya
I have tried and failed with a script to solve this....

Did you guys solve it?


Top
 Profile  
 
 Post subject: Re: Moving Static Queue Above Dynamic Queues
PostPosted: Mon Oct 08, 2007 10:54 pm 
Offline
Frequent Visitor
Frequent Visitor

Joined: Fri Mar 23, 2007 10:09 pm
Posts: 75
Location: HONDURAS
still no luck,, and really need this!!!!!!!

_________________
setting up small WISP in Honduras over Satelite connections


Top
 Profile  
 
 Post subject: Re: Moving Static Queue Above Dynamic Queues
PostPosted: Tue Oct 09, 2007 12:23 pm 
Offline
Member
Member
User avatar

Joined: Wed Sep 06, 2006 1:42 pm
Posts: 391
Location: Abuja, Nigeria
I think it must be a bug.


Top
 Profile  
 
 Post subject: Re: Moving Static Queue Above Dynamic Queues
PostPosted: Wed Oct 10, 2007 11:50 pm 
Offline
Member Candidate
Member Candidate

Joined: Mon Jun 05, 2006 8:26 pm
Posts: 222
Location: Kenya
OK, so if we all think its a bug, then lets all send in our supout to support@mikrotik.com.

So, to clarify my problem, dynamic HOTSPOT queues ALWAYS jump to the top of the list above any static simple queues. But when I do dynamic PPPOE queues they stay at the bottom, leaving the static simple queues at the top where they can work.

Just to ask you, which version ROS are you using? I have had this with 2.9.46

Regards

Alex


Top
 Profile  
 
 Post subject: Re: Moving Static Queue Above Dynamic Queues
PostPosted: Wed Oct 10, 2007 11:58 pm 
Offline
Member Candidate
Member Candidate

Joined: Mon Jun 05, 2006 8:26 pm
Posts: 222
Location: Kenya
OK, I have written support.

Lets hope they can help us!

Rgds

Alex


Top
 Profile  
 
 Post subject: Re: Moving Static Queue Above Dynamic Queues
PostPosted: Thu Oct 11, 2007 6:05 pm 
Offline
Member Candidate
Member Candidate

Joined: Mon Jun 05, 2006 8:26 pm
Posts: 222
Location: Kenya
Ok folks,

This is the feedback from the ever helpful Sergejs at Mikrotik Support. (Their support is great isnt it?)

Quote:
Hello Alex,

Yes, it is working as designed, HotSpot queues are placed to the of the list.
It is possible to use 'on-login' and 'on-logout' script for the HotSpot user profile, when script is executed when any user logged in.

Identification is required for the 'queue simple' entry, in order script may find static 'queue' and place to the top,

you may use this script, that check for the priority (any other option might be used),

:foreach n in=[/queue simple find priority=1] do={ /queue simple move $n [:pick [/queue simple find] 0] }

Regards,
Sergejs


So he proposes a script! Which is where we started with this anyway.

I am going to start playing with this tonight. Will revert.

Rgds

Alex


Top
 Profile  
 
 Post subject: Re: Moving Static Queue Above Dynamic Queues (RESOLVED)
PostPosted: Thu Oct 11, 2007 9:08 pm 
Offline
Member Candidate
Member Candidate

Joined: Mon Jun 05, 2006 8:26 pm
Posts: 222
Location: Kenya
OKAY!

Now I am getting the idea.

Sergejs script looks for queue priorities, then moves the script of the relevant priority to position zero. Then the script loops round and repeats until finished.

I cant pretend to understand fully all the script variables, but it is working.

So, standard pppoe and hotspot dynamic simple queues have a default priority of 8 the loweest priority.

So I changed the priority of my static simple queues to 1 and then ran the script, and hey presto all the statics jump to the top of the list.

So now I have set the script to run on each login event of the hotspot user, and it is working.

Now I wonder how to set "on user login" scripts with usermanager.... but thats for another time.

Rgds

Alex


Top
 Profile  
 
 Post subject: Re: Moving Static Queue Above Dynamic Queues
PostPosted: Sat Oct 13, 2007 2:51 am 
Offline
Frequent Visitor
Frequent Visitor

Joined: Fri Mar 23, 2007 10:09 pm
Posts: 75
Location: HONDURAS
i need this for usermanager not for only hotspot.. still no luck getting anything to work and have tried .

_________________
setting up small WISP in Honduras over Satelite connections


Top
 Profile  
 
 Post subject: Re: Moving Static Queue Above Dynamic Queues
PostPosted: Sun Oct 14, 2007 2:43 pm 
Offline
Member Candidate
Member Candidate

Joined: Mon Jun 05, 2006 8:26 pm
Posts: 222
Location: Kenya
Hey mps01k

Can you describe fully what you are trying to do?

The script Sergejs suggest is working perfectly for me. I am using for dynamic scripts from both PPPOE server AND hotspot server. And it works for me both using usermanager and also the built in Hotspot users and PPPOE secrets.

It moves the queues to exactly where I want them, so to the original query in the this topic we have (sergejs have) solved it.....

I see that you are setting a wisp in Honduras via satelite? I am doing this in Kenya with a WISP with 2 x VSAT dishes, and all works great.

Post your config, we help you out.

Rgds

Alex


Top
 Profile  
 
 Post subject: Re: Moving Static Queue Above Dynamic Queues
PostPosted: Mon Oct 15, 2007 10:32 pm 
Offline
Frequent Visitor
Frequent Visitor

Joined: Fri Mar 23, 2007 10:09 pm
Posts: 75
Location: HONDURAS
hello ,

this is the error i am getting

[admin@MikroTik] /ip hotspot active> print
Flags: R - radius, B - blocked
# USER ADDRESS UPTIME SESSION-TIME-LEFT IDLE-TIMEOUT
0 R casm 192.168.250.3 29m39s
1 R favio 192.168.250.11 1h13m32s
2 R lucia 192.168.250.14 16m5s
[admin@MikroTik] /ip hotspot active> :foreach n in=[/queue simple find priority=1] do={ /queue simple move $n [:pick [
/queue simple find] 0] }
destination number too large
[admin@MikroTik] /ip hotspot active>

_________________
setting up small WISP in Honduras over Satelite connections


Top
 Profile  
 
 Post subject: Re: Moving Static Queue Above Dynamic Queues
PostPosted: Wed Oct 17, 2007 7:55 am 
Offline
Member Candidate
Member Candidate

Joined: Mon Jun 05, 2006 8:26 pm
Posts: 222
Location: Kenya
can you tell me what the priority you are giving to the hotspot dynamic queues? just double click one and look for priority.

Its not clear from your dump...


Top
 Profile  
 
 Post subject: Re: Moving Static Queue Above Dynamic Queues
PostPosted: Wed Oct 17, 2007 11:43 pm 
Offline
Frequent Visitor
Frequent Visitor

Joined: Fri Mar 23, 2007 10:09 pm
Posts: 75
Location: HONDURAS
i am using from 8 to 5 on the dynamic queues and 1 on the static queue i want to move.

_________________
setting up small WISP in Honduras over Satelite connections


Top
 Profile  
 
 Post subject: Re: Moving Static Queue Above Dynamic Queues
PostPosted: Thu Oct 18, 2007 7:48 am 
Offline
Member Candidate
Member Candidate

Joined: Mon Jun 05, 2006 8:26 pm
Posts: 222
Location: Kenya
Ok,

so you have changed the script to choose queue priority 1 which is correct, as that is the static that you have.

When I try to run this from the command prompt I get a different error like this:

"no items or no numbers defined"

But when I run it from inside the script system it works fine. I suggest you try that.

Maybe that is the problem? Because everything else looks ok.


Top
 Profile  
 
 Post subject: Re: Moving Static Queue Above Dynamic Queues
PostPosted: Fri Oct 19, 2007 1:46 am 
Offline
Frequent Visitor
Frequent Visitor

Joined: Fri Mar 23, 2007 10:09 pm
Posts: 75
Location: HONDURAS
what version of OS are you running ? i am using 3.0rc5. I just put it into the scripter and it runs but does nothing at all.

can you post an exapmple of exactly how you have it set , that it works for you and not for me?

thanks

_________________
setting up small WISP in Honduras over Satelite connections


Top
 Profile  
 
 Post subject: Re: Moving Static Queue Above Dynamic Queues
PostPosted: Sat Dec 01, 2007 10:39 pm 
Offline
newbie
User avatar

Joined: Mon Oct 09, 2006 5:38 pm
Posts: 27
Hi
I tried using this script and set the static simple queue priority to 1 but still not effect cause dynamic rule is still move over static.I'm using V3.0rc11 .

any suggestion ?


Top
 Profile  
 
 Post subject: Re: Moving Static Queue Above Dynamic Queues
PostPosted: Sun Dec 02, 2007 5:41 pm 
Offline
newbie
User avatar

Joined: Mon Oct 09, 2006 5:38 pm
Posts: 27
any one can help us in this problem ???


Top
 Profile  
 
 Post subject: Re: Moving Static Queue Above Dynamic Queues
PostPosted: Tue Dec 04, 2007 11:08 am 
Offline
Frequent Visitor
Frequent Visitor
User avatar

Joined: Thu Jun 16, 2005 6:20 pm
Posts: 71
Location: Sabac, Serbia
Tried everything some time ago, but i did not suceed.
I think it can't be done.


Top
 Profile  
 
 Post subject: Re: Moving Static Queue Above Dynamic Queues
PostPosted: Wed Dec 05, 2007 1:21 am 
Offline
newbie
User avatar

Joined: Mon Oct 09, 2006 5:38 pm
Posts: 27
ok what about Mikrotik support ? is there any way to solve this problem ? any script to solve it !!!!


Top
 Profile  
 
 Post subject: Re: Moving Static Queue Above Dynamic Queues
PostPosted: Fri Dec 07, 2007 8:53 pm 
Offline
Member
Member
User avatar

Joined: Sat May 29, 2004 12:10 am
Posts: 399
Location: Rio Cuarto, Argentina
skillful wrote:
I use this code in a hotspot login script
Code:
/queue simple move [find name=cached] 0
to move a particular rule to the topmost position. The script executes fine but rule does not get to position "0". The rule always end up below the dynamic rules.

I can manually move the rule to position "0" in winbox but the script can only move it as far as the dynamic rules. I am using ROS3.0RC5.

You can't use this sintaxis on scripting, use dinamic to find the position

Max

_________________
Personal Blog : http://maxid.com.ar | http://mikrotikexpert.com: The guide more complete on information and solutions.
News: Service > OutSourcing MKE


Top
 Profile  
 
 Post subject: Re: Moving Static Queue Above Dynamic Queues
PostPosted: Sat Dec 08, 2007 7:52 pm 
Offline
Staff
Staff
User avatar

Joined: Wed Feb 07, 2007 1:45 pm
Posts: 1790
Location: Latvia
navibaghdad wrote:
ok what about Mikrotik support ? is there any way to solve this problem ? any script to solve it !!!!

I think Mikrotik have fixed this already in RC11, at least now it works in my case.


Top
 Profile  
 
 Post subject: Re: Moving Static Queue Above Dynamic Queues
PostPosted: Sat Dec 08, 2007 9:48 pm 
Offline
newbie
User avatar

Joined: Mon Oct 09, 2006 5:38 pm
Posts: 27
ok I'm upgrad to RC11 but its still notwork.can u please post ur conf.


Top
 Profile  
 
 Post subject: Re: Moving Static Queue Above Dynamic Queues
PostPosted: Sun Dec 09, 2007 1:05 am 
Offline
Frequent Visitor
Frequent Visitor
User avatar

Joined: Thu Jun 16, 2005 6:20 pm
Posts: 71
Location: Sabac, Serbia
RC = not totally stable version (is there sucha thing anyway?) so i don't recommend using it in production environment


Top
 Profile  
 
 Post subject: Re: Moving Static Queue Above Dynamic Queues
PostPosted: Mon Dec 10, 2007 6:17 pm 
Offline
just joined

Joined: Mon Oct 02, 2006 12:37 pm
Posts: 12
rc = stable if hardware = rb333

RB333 users don't have choice we can only use version 3 release.


Top
 Profile  
 
 Post subject: Re: Moving Static Queue Above Dynamic Queues
PostPosted: Fri Dec 14, 2007 3:17 am 
Offline
newbie
User avatar

Joined: Mon Oct 09, 2006 5:38 pm
Posts: 27
ok then what is the best solution now ? mrz can u explain how u do it please ?


Top
 Profile  
 
 Post subject: Re: Moving Static Queue Above Dynamic Queues
PostPosted: Fri Dec 14, 2007 11:45 am 
Offline
Staff
Staff
User avatar

Joined: Wed Feb 07, 2007 1:45 pm
Posts: 1790
Location: Latvia
Well.. three queues:
[admin@gw-loc] /queue simple> print
Flags: X - disabled, I - invalid, D - dynamic
0 D name="<hotspot-user1>" target-addresses=10.1.101.225/32
..........
1 D name="hs-<hotspot1>" dst-address=0.0.0.0/0 interface=ether1 parent=none
..........

2 X name="queue1" target-addresses=10.1.101.225/32 dst-address=0.0.0.0/0
..........

Issue command:
/queue simple move [find name="queue1"] 0

and here you go, static queue is above dynamic:

Flags: X - disabled, I - invalid, D - dynamic
0 X name="queue1" target-addresses=10.1.101.225/32 dst-address=0.0.0.0/0
..........
1 D name="<hotspot-user1>" target-addresses=10.1.101.225/32
..........


Top
 Profile  
 
 Post subject: Re: Moving Static Queue Above Dynamic Queues
PostPosted: Sun May 11, 2008 4:11 am 
Offline
just joined

Joined: Sun May 11, 2008 4:08 am
Posts: 1
i have the same problem with queues between local network and internet.
does anyone have an idea how to do this when using Radius (user manager, etc...)???


Top
 Profile  
 
 Post subject: Re: Moving Static Queue Above Dynamic Queues
PostPosted: Fri Jun 20, 2008 1:06 pm 
Offline
Frequent Visitor
Frequent Visitor
User avatar

Joined: Thu Jun 16, 2005 6:20 pm
Posts: 71
Location: Sabac, Serbia
No, the script above don't work if you make script out of it, it work just in console, since you can't print in the script but only in console so it won't work.
As i said it can't be done afaik.


Top
 Profile  
 
 Post subject: Re: Moving Static Queue Above Dynamic Queues
PostPosted: Fri Jun 20, 2008 2:03 pm 
Offline
Staff
Staff
User avatar

Joined: Wed Feb 07, 2007 1:45 pm
Posts: 1790
Location: Latvia
Latest version (3.10) simple script:
/queue simple move [find name="queue1"] 0

Checked all possible ways to execute it ( from terminal, scheduler, netwatch etc.) It works!


Top
 Profile  
 
 Post subject: Re: Moving Static Queue Above Dynamic Queues
PostPosted: Fri Jun 20, 2008 5:10 pm 
Offline
Member
Member
User avatar

Joined: Wed Sep 06, 2006 1:42 pm
Posts: 391
Location: Abuja, Nigeria
mrz wrote:
Latest version (3.10) simple script:
/queue simple move [find name="queue1"] 0

Checked all possible ways to execute it ( from terminal, scheduler, netwatch etc.) It works!


This does not work with dynamic queues created by user-manager or hotspot. The script cannot move "queue1" above any dynamic queues created by hotspot or user-manager.


Top
 Profile  
 
 Post subject: Re: Moving Static Queue Above Dynamic Queues
PostPosted: Sat Jun 21, 2008 1:04 pm 
Offline
Frequent Visitor
Frequent Visitor
User avatar

Joined: Thu Jun 16, 2005 6:20 pm
Posts: 71
Location: Sabac, Serbia
skillful wrote:
mrz wrote:
Latest version (3.10) simple script:
/queue simple move [find name="queue1"] 0

Checked all possible ways to execute it ( from terminal, scheduler, netwatch etc.) It works!


This does not work with dynamic queues created by user-manager or hotspot. The script cannot move "queue1" above any dynamic queues created by hotspot or user-manager.


Exactly.
Wanted to say that but you were faster.


Top
 Profile  
 
 Post subject: Re: Moving Static Queue Above Dynamic Queues (FIXED)
PostPosted: Thu Jul 10, 2008 3:52 pm 
Offline
Member
Member
User avatar

Joined: Wed Sep 06, 2006 1:42 pm
Posts: 391
Location: Abuja, Nigeria
This issue had been fixed in ROS 3.11. This script
Code:
/queue simple move [find name="cached"] 0
now works as expected.

Many thanks to the Mikrotik team for this fix.


Top
 Profile  
 
 Post subject: Re: Moving Static Queue Above Dynamic Queues
PostPosted: Sat Aug 02, 2008 11:06 am 
Offline
newbie

Joined: Tue Oct 16, 2007 11:17 am
Posts: 30
Hello

u can u use this script to do what u want automaticlly

:foreach i in=[/queue simple find dynamic=no] do={/queue simple move [/ queue simple get $i name] [/queue simple find dynamic=yes]}

Rafal


Top
 Profile  
 
 Post subject: Re: Moving Static Queue Above Dynamic Queues (FIXED)
PostPosted: Thu May 28, 2009 1:30 am 
Offline
Member
Member
User avatar

Joined: Wed Sep 06, 2006 1:42 pm
Posts: 391
Location: Abuja, Nigeria
skillful wrote:
This issue had been fixed in ROS 3.11. This script
Code:
/queue simple move [find name="cached"] 0
now works as expected.

Many thanks to the Mikrotik team for this fix.



This is broken again in ver3.24!


Top
 Profile  
 
 Post subject: Re: Moving Static Queue Above Dynamic Queues (FIXED)
PostPosted: Mon Jun 01, 2009 11:18 am 
Offline
Member
Member
User avatar

Joined: Wed Sep 06, 2006 1:42 pm
Posts: 391
Location: Abuja, Nigeria
skillful wrote:
This is broken again in ver3.24!



Any comments on this from the Mikrotik squad?


Top
 Profile  
 
 Post subject: Re: Moving Static Queue Above Dynamic Queues
PostPosted: Mon Jun 01, 2009 11:34 am 
Offline
Staff
Staff
User avatar

Joined: Wed Feb 07, 2007 1:45 pm
Posts: 1790
Location: Latvia
Works for me.


Top
 Profile  
 
 Post subject: Re: Moving Static Queue Above Dynamic Queues
PostPosted: Mon Jun 01, 2009 7:49 pm 
Offline
Member
Member
User avatar

Joined: Wed Sep 06, 2006 1:42 pm
Posts: 391
Location: Abuja, Nigeria
Yes. it works but not with the expected result. Instead of moving the queue to #0, it is moved to the end.


Top
 Profile  
 
 Post subject: Re: Moving Static Queue Above Dynamic Queues
PostPosted: Tue Jun 02, 2009 8:26 am 
Offline
Staff
Staff
User avatar

Joined: Wed Feb 07, 2007 1:45 pm
Posts: 1790
Location: Latvia
If you are checking in winbox, make sure that queues are sorted by the first column


Top
 Profile  
 
 Post subject: Re: Moving Static Queue Above Dynamic Queues
PostPosted: Tue Jun 02, 2009 3:15 pm 
Offline
Member
Member
User avatar

Joined: Wed Sep 06, 2006 1:42 pm
Posts: 391
Location: Abuja, Nigeria
Queues are sorted by the first column. I get the same result in terminal when I issue command "/queue print without-paging"

When downgrade to version 3.23 and the script works as expected.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 44 posts ] 

All times are UTC + 2 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
MUM Poland and MUM China free REGISTRATION OPEN