سكربت لتقسيم السرعه حسب الاكتف لخط 4 ميجا. يمكن تعديل سرعة الخط وكذلك سرعه التحميل القصوى
:global active
:global uspeed 4096
:global dspeed 1024
:global maxu
:global maxd
:set active ( [
:len [/ip hotspot active find]] )
:set maxd (($uspeed / $active)*1000)
:set maxu (($dspeed / $active)*1000)
/ip hotspot active ;
:foreach nm in=[find]
do={
:local ip [get $nm address]
:local mind [get $nm user];
:if ( $nm = $mind )
do={} else={ /queue simple ;
remove [find name=$mind] ;
add burst-limit=0/0 burst-threshold=0/0 burst-time=10s/10s comment=newmind direction=both disabled=no
interface=all limit-at="$maxu/$maxd" max-limit="$maxu/$maxd" name=$mind packet-marks="" parent=none priority=4
queue=default-small/default-small target-addresses=$ip total-queue=default-small;
}}
إرسال تعليق