找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 13397|回复: 34

[其它] DSCP安装设置代码,卡了你抽我。

  [复制链接]
发表于 2010-9-15 22:24:38 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

×
本帖最后由 277370403 于 2010-9-17 22:39 编辑

#Set interface here
:global outboundInterface "lan"
#Set bandwidth of the interface (remember, this is for OUTGOING)
:global interfaceBandwidth 0
#Set where in the chain the packets should be mangled
:global mangleChain postrouting

#Don't mess with these. They set the parameters for what is to follow
:global queueName ("qos_" . $outboundInterface)
:global qosClasses [:toarray "netcon,intercon,critical,flash_override,flash,immedate,priority,routine"]
:global qosIndex 64

#Set up mangle rules for all 64 DSCP marks
#This is different in that the highest priority packets are mangled first.
:for indexA from 63 to 0 do={
        /ip firewall mangle add \
        action=mark-packet \
        chain=$mangleChain \
        comment=("dscp_" . $indexA) \
        disabled=no \
        dscp=$indexA \
        new-packet-mark=("dscp_" . $indexA) \
        passthrough=no
}


#Add a base queue to the queue tree for the outbound interface
/queue tree add \
        max-limit=$interfaceBandwidth \
        name=$queueName \
        parent=$outboundInterface \
        priority=1

#Set up queues in queue tree for all 64 classes, subdivided by 8.
:for indexA from=0 to=7 do={
        :local subClass ([:pick $qosClasses $indexA] . "_" . $outboundInterface)
        /queue tree add \
                name=$subClass \
                parent=$queueName \
                priority=($indexA+1) \
                queue=ethernet-default
        :for indexB from=0 to=7 do={
                :set qosIndex ($qosIndex-1)
                /queue tree add \
                name=($subClass . "_" . $indexB) \
                parent=$subClass \
                priority=($indexB+1) \
                packet-mark=("dscp_" . $qosIndex) \
                queue=ethernet-default
        }
}
routeros
发表于 2010-9-15 22:41:38 | 显示全部楼层
铜板从哪里来?
routeros
回复

使用道具 举报

发表于 2010-9-15 22:51:08 | 显示全部楼层
本帖最后由 qwert1388 于 2010-9-15 23:10 编辑

操官方大把还卡了抽你妈
routeros
回复

使用道具 举报

发表于 2010-9-15 23:01:36 | 显示全部楼层
我买了
routeros
回复

使用道具 举报

发表于 2010-9-15 23:08:21 | 显示全部楼层
这,我买一个试试看看~~
routeros
回复

使用道具 举报

发表于 2010-9-15 23:20:07 | 显示全部楼层
我操,40个,我还不如自己整
routeros
回复

使用道具 举报

发表于 2010-9-15 23:29:06 | 显示全部楼层
上当了,大家不要买了,是官方的脚本
就是这个
#Set interface here
:global outboundInterface "lan"
#Set bandwidth of the interface (remember, this is for OUTGOING)
:global interfaceBandwidth 0
#Set where in the chain the packets should be mangled
:global mangleChain postrouting

#Don't mess with these. They set the parameters for what is to follow
:global queueName ("qos_" . $outboundInterface)
:global qosClasses [:toarray "netcon,intercon,critical,flash_override,flash,immedate,priority,routine"]
:global qosIndex 64

#Set up mangle rules for all 64 DSCP marks
#This is different in that the highest priority packets are mangled first.
:for indexA from 63 to 0 do={
        /ip firewall mangle add \
        action=mark-packet \
        chain=$mangleChain \
        comment=("dscp_" . $indexA) \
        disabled=no \
        dscp=$indexA \
        new-packet-mark=("dscp_" . $indexA) \
        passthrough=no
}


#Add a base queue to the queue tree for the outbound interface
/queue tree add \
        max-limit=$interfaceBandwidth \
        name=$queueName \
        parent=$outboundInterface \
        priority=1

#Set up queues in queue tree for all 64 classes, subdivided by 8.
:for indexA from=0 to=7 do={
        :local subClass ([:pick $qosClasses $indexA] . "_" . $outboundInterface)
        /queue tree add \
                name=$subClass \
                parent=$queueName \
                priority=($indexA+1) \
                queue=ethernet-default
        :for indexB from=0 to=7 do={
                :set qosIndex ($qosIndex-1)
                /queue tree add \
                name=($subClass . "_" . $indexB) \
                parent=$subClass \
                priority=($indexB+1) \
                packet-mark=("dscp_" . $qosIndex) \
                queue=ethernet-default
        }
}
routeros
回复

使用道具 举报

发表于 2010-9-15 23:54:38 | 显示全部楼层
哈哈,目前还没见过有真正的dscp出现,都是忽悠贴
routeros
回复

使用道具 举报

发表于 2010-9-16 00:17:06 | 显示全部楼层
哈哈,目前还没见过有真正的dscp出现,都是忽悠贴  是吗
routeros
回复

使用道具 举报

发表于 2010-9-16 02:43:59 | 显示全部楼层
忽悠死你们,呵呵
routeros
回复

使用道具 举报

发表于 2010-9-16 03:29:48 | 显示全部楼层
铜板从哪里来?
routeros
回复

使用道具 举报

发表于 2010-9-16 08:07:58 | 显示全部楼层
忽悠的啊,赚个铜板
routeros
回复

使用道具 举报

发表于 2010-9-16 23:05:26 | 显示全部楼层
哈哈全!!!
routeros
回复

使用道具 举报

发表于 2010-9-17 00:04:07 | 显示全部楼层
有钱人真多
routeros
回复

使用道具 举报

发表于 2010-9-17 00:22:27 | 显示全部楼层
fdsadfsadfdsaf
routeros
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|手机版|小黑屋|软路由 ( 渝ICP备15001194号-1|渝公网安备 50011602500124号 )

GMT+8, 2024-5-5 11:09 , Processed in 0.149241 second(s), 4 queries , Gzip On, Redis On.

Powered by Discuz! X3.5 Licensed

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表