Script Auto Limit DHCPserver Mikrotik

:local parent [/queue simple find name=TOTAL]:local network "192.168.101.0/24" :if ([:len $parent] = 0) do={/queue simple add name=TOTAL max-limit=500M/500M target="$network" packet-marks=no-mark} :local queueName "Client-$leaseActMAC"; :if ($leaseBound = "1") do={ /queue simple add name=$queueName target=($leaseActIP . "/32") limit-at=1M/1M max-limit=10M/10M burst-limit=11M/11M burst-threshold=1M/1M burst-time=8/8 parent=TOTAL packet-marks=no-mark comment=[/ip dhcp-server lease get [find where active-mac-address=$leaseActMAC && active-address=$leaseActIP] host-name]; } else={ /queue simple remove $queueName }