i have 1 m speed line = 1024/256 KB
i want divide bandwidth between active users only
i her about this script use in schedule
Code: Select all
:global host
:global uspeed 256
:global dspeed 1024
:global maxu
:global maxd
/ip hotspot host ;\
:foreach nm in=[find]\
do={\
:global byte1 [get $nm bytes-out]
}
:delay 1m
/ip hotspot host ;\
:foreach nm in=[find]\
do={\
:global byte2 [get $nm bytes-out]
:global bytenew ($byte2 - $byte1)
:if ($bytenew > 15000000)\
do={\
:global nm 0
:set host ($nm + 1)
:set maxd (($uspeed / $host)*1000)
:set maxu (($dspeed / $host)*1000)
:global ip [get $nm address]
/queue simple ;\
remove [find name=$ip] ;\
add burst-limit=0/0 burst-threshold=0/0 burst-time=0s/0s comment=newmind direction=both disabled=no \
interface=all limit-at="$maxu/$maxd" max-limit="$maxu/$maxd" name=$ip packet-marks="" parent=none priority=4 \
queue=default-small/default-small target-addresses=$ip total-queue=default-small;\
remove [find name!=$ip] ;\
}}}
please help me how i use it
or >>>>>>>>>>>>>>>>>
the true way to divide bandwidth between active users only
best regards