:for aaa from 1 to 251 do={/queue ** add name=(PC . $aaa) dst-address=(192.168.1. . $aaa) limit-at=120000/500000 max-limit=200000/1000000}
# 静态限速平均网速120000/500000,普通限速200000/1000000
/ ip firewall mangle
add chain=prerouting action=mark-packet new-packet-mark=all-mark \
passthrough=yes comment="" disabled=no
#这个是固定脚本!
/ queue type
add name="PCQ-up" kind=pcq pcq-rate=200000 pcq-limit=50 \
pcq-classifier=src-address pcq-total-limit=2000
add name="PCQ-down" kind=pcq pcq-rate=2000000 pcq-limit=50 \
pcq-classifier=dst-address pcq-total-limit=2000
#动态限速时的全网上传速度和下载速度
/ queue **
add name="PCQ" target-addresses=192.168.1.0/24 dst-address=0.0.0.0/0 \
interface=all parent=none packet-marks=all-mark direction=both priority=1 \
queue=PCQ-up/PCQ-down limit-at=0/0 max-limit=512000/40000000 \
total-queue=default-small disabled=yes
#动态限速策略
/ system script
add name="PCQON" source=":if \(\[ /queue sim get \[/queue sim find \
name=\"PCQ\"\] disable \]=true \) do={/queue sim enable PCQ}" \
policy=ftp,reboot,read,write,policy,test,winbox,password
add name="PCQOFF" source=":if \(\[ /queue sim get \[/queue sim find \
name=\"PCQ\"\] disable \]=false \) do={/queue sim disable PCQ}" \
policy=ftp,reboot,read,write,policy,test,winbox,password
#这个是启发脚本
/ tool traffic-monitor
add name="PCQON" interface=wan traffic=received trigger=above \
threshold=3000000 on-event=PCQON comment="" disabled=no
add name="PCQOFF" interface=wan traffic=received trigger=below \
threshold=1000000 on-event=PCQOFF comment="" disabled=no
#这个是流量监控(wan外网的网卡)
#260个机,不限迅雷旋风,只限快车,电驴比特等等,20M带宽,爆机没有明显卡
本文来源:未知 作者:佚名