1、dscp 优先脚本,付标记例子,是唯一最简单低成本的解决 adsl 带宽瓶颈的方法,补发脚本本帖最后由 WGHBOY 于 2010-4-28 02:25 编辑 DSCP 是优先数据中最简单的一种,是 HTB 的改进型,可配合网维大师或者交换机使用dscp 分为 64 级,0 最小 63 最大,建议大家使用 16 级就行了,级别多数据缓慢,cpu 高耗#如下脚本在 3.x 下只接运行#标记优先数据包:for x from 0 to 63 do=/ip firewall mangle add action=mark-packet chain=postrouting comment=(“dscp_“
2、 . $x) disabled=no dscp=$x new-packet-mark=(“dscp_“ . $x) passthrough=no#标记限速/queue treeadd burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 max-limit=5000000 name=down parent=lan queue=default#prio8:for z from 0 to 7 do=/queue tree add burst-limit=0 burst-threshold=0 burst-time=
3、0s disabled=no limit-at=0 max-limit=0 name=(“routine_“ . $z . “_down“) packet-mark=(“dscp_“ . $z) parent=down priority=8 queue=dscp_pcq#prio7:for z from 8 to 15 do=/queue tree add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 max-limit=0 name=(“priority_“ . $z . “_down“) packe
4、t-mark=(“dscp_“ . $z) parent=down priority=7 queue=dscp_pcq#prio 6:for z from 16 to 23 do=/queue tree add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 max-limit=0 name=(“immediate_“ . $z . “_down“) packet-mark=(“dscp_“ . $z) parent=down priority=6 queue=dscp_pcq#prio 5:for z
5、from 24 to 31 do=/queue tree add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 max-limit=0 name=(“flash_“ . $z . “_down“) packet-mark=(“dscp_“ . $z) parent=down priority=5 queue=dscp_pcq#prio 4:for z from 32 to 39 do=/queue tree add burst-limit=0 burst-threshold=0 burst-time=0
6、s disabled=no limit-at=0 max-limit=0 name=(“flash_override_“ . $z . “_down“) packet-mark=(“dscp_“ . $z) parent=down priority=4 queue=dscp_pcq#prio 3:for z from 40 to 47 do=/queue tree add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 max-limit=0 name=(“critical_“ . $z . “_down
7、“) packet-mark=(“dscp_“ . $z) parent=down priority=3 queue=dscp_pcq#prio 2:for z from 48 to 55 do=/queue tree add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 max-limit=0 name=(“intercon_“ . $z . “_down“) packet-mark=(“dscp_“ . $z) parent=down priority=2 queue=dscp_pcq#prio 1:for z from 56 to 63 do=/queue tree add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 max-limit=0 name=(“netcon_“ . $z . “_down“) packet-mark=(“dscp_“ . $z) parent=down priority=1 queue=dscp_pcq