Sunteți pe pagina 1din 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
:local
:local
:local

x
y
n
m

($j/$i);
($x/4);
(($x*16)/10);
(($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;
}
}

S-ar putea să vă placă și