Max Upgrade
-
Upload
salahal-hakimi -
Category
Documents
-
view
217 -
download
0
Transcript of Max Upgrade
-
7/25/2019 Max Upgrade
1/1
mikroubnt
{:local i;:local j 12288000;:set i [ :len [/ip hotspot active find] ];:if ($i=0) do={:set i 1;}:local x ($j/$i);:local y ($x/4);:foreach i in=[/queue simple find] do={/queue simple remove $i;}:local addr;:local uname;:foreach i in=[/ip hotspot active find] do={:set addr [/ip hotspot active get $i address];:set uname [/ip hotspot active get $i user];/queue simple add name=$uname target=$addr packet-marks=maxupgrade max-limit="$y/$x" queue=ethernet-default/ethernet-default;}}
/system script run mikroubnt
{:local i;:local j 12288000;
:set i [ :len [/ip hotspot active find] ];:if ($i=0) do={:set i 1;}:if ($i>35) do={:set i 35;}
:local x ($j/$i);:local y ($x/4);:local n (($x*16)/10);:local m (($x*6)/10);
:foreach i in=[/queue simple find] do={/queue simple remove $i;}:local addr;:local uname;:foreach i in=[/ip hotspot active find] do={
:set addr [/ip hotspot active get $i address];:set uname [/ip hotspot active get $i user];/queue simple add burst-limit="$n/$n" burst-threshold="$m/$m" burst-time=10s/10s\max-limit="$y/$x" name=$uname priority=1/1 target=$addr queue=ethernet-default/ethernet-default;}}