蓝色动力网络

 找回密码
 立即注册

扫一扫,访问微社区

QQ登录

只需一步,快速开始

查看: 2573|回复: 1

ROS小包优先+带宽均分+简单队列限制上传速度

[复制链接]
发表于 2011-7-5 10:28:47 | 显示全部楼层 |阅读模式
ROS小包优先+带宽均分+简单队列限制上传速度。

小包优先的脚本如下:
/ip firewall mangle
add chain=forward p2p=all-p2p action=mark-connection    new-connection-mark=p2p_conn passthrough=yes comment="" disabled=no
add chain=forward connection-mark=p2p_conn action=mark-packet    new-packet-mark=p2p passthrough=yes comment="" disabled=no
add chain=forward connection-mark=!p2p_conn action=mark-packet    new-packet-mark=general passthrough=yes comment="" disabled=no
add chain=forward packet-size=32-512 action=mark-packet new-packet-mark=small    passthrough=yes comment="" disabled=no
add chain=forward packet-size=512-1200 action=mark-packet new-packet-mark=big    passthrough=yes comment="" disabled=no

/ queue tree
add name="p2p1" parent=wan packet-mark=p2p limit-at=2000000 queue=default   priority=8 max-limit=6000000 burst-limit=0 burst-threshold=0 burst-time=0s   disabled=no
add name="p2p2" parent=lan packet-mark=p2p limit-at=2000000 queue=default   priority=8 max-limit=6000000 burst-limit=0 burst-threshold=0 burst-time=0s   disabled=no
add name="ClassA" parent=lan packet-mark="" limit-at=0 queue=default   priority=8 max-limit=100000000 burst-limit=0 burst-threshold=0   burst-time=0s disabled=no
add name="ClassB" parent=ClassA packet-mark="" limit-at=0 queue=default   priority=8 max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0s   disabled=no
add name="Leaf1" parent=ClassA packet-mark=general limit-at=0 queue=default   priority=7 max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0s   disabled=no
add name="Leaf2" parent=ClassB packet-mark=small limit-at=0 queue=default   priority=5 max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0s   disabled=no
add name="Leaf3" parent=ClassB packet-mark=big limit-at=0 queue=default   priority=6 max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0s   disabled=no

然后是带宽均分:

/ip firewall mangle add chain=forward src-address=192.168.0.0/24 \
action=mark-connection new-connection-mark=users-con
/ip firewall mangle add connection-mark=users-con action=mark-packet \
new-packet-mark=users chain=forward

/queue type add name=pcq-download kind=pcq pcq-classifier=dst-address
/queue type add name=pcq-upload kind=pcq pcq-classifier=src-address

/queue tree add name=Download parent=lan max-limit=30M
/queue tree add parent=Download queue=pcq-download packet-mark=users


/queue tree add name=Upload parent=wan max-limit=28M

/queue tree add parent=Upload queue=pcq-upload packet-mark=users

请根据直接实际修改IP地址段,下载最大速度,上传最大速度,lan为我连接内网的网卡,wan是我连接外网的网卡


限制上传速度的脚本:

:for aaa from 2 to 180 do={/queue simple add name=(PC . $aaa) dst-address=(192.168.0. . $aaa) limit-at=10000000/3000000 max-limit=30000000/3000000}

如果是3.2版本的,这个脚本自己要修改下,

就用这3个部分,别的不需要的,绝对比什么智能动态限速好的多。


大家好!我想问一下 我这是100兆光纤 又是用的ROS3.30的 请问改哪些?希望好心人帮帮忙 我QQ85239088 不会白帮的 我出10个Q币!
 楼主| 发表于 2011-7-5 10:31:21 | 显示全部楼层
我这是100兆光纤 带220台机器!
回复 支持 反对

使用道具 举报

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

本版积分规则

蓝色动力网络微信平台
网站管理,业务合作联系邮箱: admin#lansedongli.com    QQ:13412492 限网站业务问题.
网站帐号、密码、密保找回请使用注册邮箱,发送邮件至 password#lansedongli.com ,否则不予受理.
免责声明:本论坛所有文字和图片仅代表其个人观点.
本站某些资料或文章来自于互联网,不代表本站观点,如果侵犯了您的权益,请来信告知,我们会在三天内删除.
为了给大家一个更好的交流场所,请勿在本论坛发表与中华人民共和国法律相抵触的言论,请合作,谢谢!
Copyright © 2007-2019 Corporation Powered by网吧系统 版权所有    转载请注明!
浙ICP备11043737号 程序:Discuz! x3.4

湘公网安备 43018102000145号

手机版|Archiver|蓝色动力网络   

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