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?)
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.