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.
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.....
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
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),
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.
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.
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 .
Post subject: Re: Moving Static Queue Above Dynamic Queues
Posted: Fri Dec 07, 2007 8:53 pm
Member
Joined: Sat May 29, 2004 12:10 am Posts: 433
Karma: 1
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
_________________ MKE Solutions: NEW Base of knowledge in spanish. Give me Karma if i help you
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 ..........
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 ..........
Post subject: Re: Moving Static Queue Above Dynamic Queues
Posted: Sun May 11, 2008 4:11 am
just joined
Joined: Sun May 11, 2008 4:08 am Posts: 1
Karma: 0
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...)???
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.
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.
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.
Anyone know how to force a static script to be the very last queue in the list. I can do a move command, but I guess I need to know how to find what the last queue is. The reason is, that I wish to use the dynamic queues made by userman, but in case I have other ips that were not generated by userman, I want them treated by a general PCQ rule that limits their speed.
so my command is
Code:
/queue simple move [find name=Catchall] 160
But of course the position is always changing.
I tried setting the position to something larger that the actual number of queues, but it always fails.
Users browsing this forum: MSN [Bot], yodos and 5 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