Someone asked me about hotspot related issue . The scenario was that HOTSPOT was configured with SQUID proxy server. He also had User Manager so queuing is dynamically managed by user manager in hotspot. He had simple queue to provide cache hit marked packets unlimited speed to users. The issue was that when any hotspot user user login and Hotspot/Radius creates Dynamic Queues, and it override simple queue by moving itself above the static queue, so the cache-hit queue remain useless to provide unlimited speed to cache packets dueto its lower position.
As showed in the image below . . .
Before HOTSPOT user login,
↓
After HOTSPOT user logged in,
The workaround for this issue was to create a script that moves this static queue name “cache-hit” to 0 (top number) whenever any user login. The scripts can be added in HOTSPOT > USERS PROFILES > SCRIPTS.
This way whenever any hotspot user login, this script will run, and it will move the cache-hit to 0 number (Top)
Ok first rename your cache hit queue to “cache-hit“
Now add a script that will do actually move the cache-hit queue to top.
/system script add name=movestatic0 policy=\ ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api \ source="/queue simple move [find name=\"cache-hit\"] 0"
↓
Now we have to add this script in the HOTSPOT user profiles (in this example I have only one default profile, if you ahve multiple user profiles, you have to add this in all profiles either via CLI, or preferably via GUI )
/ip hotspot user profile set [ find default=yes ] idle-timeout=none keepalive-timeout=2m name=default \ on-login="/system script run movestatic0" shared-users=1 \ status-autorefresh=1m transparent-proxy=no
↓
Now whenever any hotspot user will login , the hotspot profile will execute the script “movestatic0″ that we created earlier, and it will move the cache-hit queue to TOP.
Now the results will be as showed in the images below . . .
↓
↓
Regard’s
Syed Jahanzaib
Filed under: Mikrotik Related
