找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 4996|回复: 2

[其它] 求助,关于限制网内BT下载

[复制链接]
发表于 2005-1-20 22:30:21 | 显示全部楼层 |阅读模式

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

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

×
BT下载是不错的,但是如果下载者不限速则会占用大量的网络带宽出口,曾经看到有人说过,设置routeros的BT下载速度,如果有人用BT,就自动把用BT的人的网速降到一定的值。请那位兄弟出来具体说说如何设置,解救受BT祸害的大众吧!
routeros
 楼主| 发表于 2005-1-21 09:51:41 | 显示全部楼层
这是官方关于限制P2P下载上传速度的资料,我按下面的方法做了以后并没有发现有效果,我限制BT下载为56K,可是用Bitcomet实际下载速度却可以上到100K以上,禁止BT的设置我已经做成功了,但是有些游戏,比如大话西游II是用BT更新的,所以不能完全禁止。有做成功过的兄弟来指点一下啊!Peer-to-Peer Limitation with PCQLet us consider a situation where the limited network is 192.168.0.0/24 (see the picture above). Wewill limit the p2p download traffic to 256kbit/s and upload to 128kbit/sThe 192.168.0.0/24 network has to be masquaraded in order to get public access (it will use theaddress 10.0.0.217). To do so, we will masquerade this network.[admin@MikroTik] ip firewall src-nat> add src-address=192.168.0.0/24 \\... action=masquerade[admin@MikroTik] ip firewall src-nat> printFlags: X - disabled, I - invalid, D - dynamic0 src-address=192.168.0.0/24 action=masquerade[admin@MikroTik] ip firewall src-nat>Then we have to mark download and upload traffic. To do so with masqueraded traffic, let's add 2mangle rules - the first one stands for marking the p2p connection with the mark p2p_con which iscomming from the local network (192.168.0.0/24) , the second one will mark all packets whithinthis connection with mark p2p_limit, which will be used for limiting the upload and downloadtraffic.[admin@MikroTik] ip firewall mangle> add src-address=192.168.0.0/24 p2p=all-p2p \\... mark-connection=p2p_con action=passthrough[admin@MikroTik] ip firewall mangle> add connection=p2p_con action=acceptmark-flow=p2p_limit[admin@MikroTik] ip firewall mangle>Next, we will make two PCQ types - one for download (pcq-download), and one for upload(pcq-upload).[admin@MikroTik] queue type> add kind=pcq name=pcq-download \\... pcq-rate=256000 pcq-classifier=dst-address[admin@MikroTik] queue type> add kind=pcq name=pcq-upload \\... pcq-rate=128000 pcq-classifier=src-address[admin@MikroTik] queue type> print0 name="default" kind=pfifo bfifo-limit=15000 pfifo-limit=50 red-limit=60red-min-threshold=10 red-max-threshold=50 red-burst=20 sfq-perturb=5sfq-allot=1514 pcq-rate=0 pcq-limit=50 pcq-classifier1 name="ethernet-default" kind=pfifo bfifo-limit=15000 pfifo-limit=50Page 432 of 545red-limit=60 red-min-threshold=10 red-max-threshold=50 red-burst=20sfq-perturb=5 sfq-allot=1514 pcq-rate=0 pcq-limit=50 pcq-classifier2 name="wireless-default" kind=sfq bfifo-limit=15000 pfifo-limit=50red-limit=60 red-min-threshold=10 red-max-threshold=50 red-burst=20sfq-perturb=5 sfq-allot=1514 pcq-rate=0 pcq-limit=50 pcq-classifier3 name="synchronous-default" kind=red bfifo-limit=15000 pfifo-limit=50red-limit=60 red-min-threshold=10 red-max-threshold=50 red-burst=20sfq-perturb=5 sfq-allot=1514 pcq-rate=0 pcq-limit=50 pcq-classifier4 name="pcq-download" kind=pcq bfifo-limit=15000 pfifo-limit=50 red-limit=60red-min-threshold=10 red-max-threshold=50 red-burst=20 sfq-perturb=5sfq-allot=1514 pcq-rate=256000 pcq-limit=50 pcq-classifier=dst-address5 name="pcq-upload" kind=pcq bfifo-limit=15000 pfifo-limit=50 red-limit=60red-min-threshold=10 red-max-threshold=50 red-burst=20 sfq-perturb=5sfq-allot=1514 pcq-rate=128000 pcq-limit=50 pcq-classifier=src-address[admin@MikroTik] queue type>And finally, add the queue rules.[admin@MikroTik] queue tree> add name=down parent=Local \\... flow=p2p_limit queue=pcq-download[admin@MikroTik] queue tree> add name=up parent=Public \\... flow=p2p_limit queue=pcq-upload[admin@MikroTik] queue tree> printFlags: X - disabled, I - invalid, D - dynamic0 name="down" parent=Local flow=p2p_limit limit-at=0queue=pcq-download priority=8 max-limit=0 burst-limit=0burst-threshold=0 burst-time=01 name="up" parent=Public flow=p2p_limit limit-at=0 queue=pcq-uploadpriority=8 max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0[admin@MikroTik] queue tree>Page 433 of 545
routeros
回复

使用道具 举报

发表于 2005-1-21 10:39:54 | 显示全部楼层
accept 和passthrough怎么用一直不清楚。 但官方在p2p用的是accept 。http用的是passthroughadd in-interface=wlan1 p2p=all-p2p action=accept mark-flow=p2p-in comment="" disabled=no add in-interface=ether1 p2p=all-p2p action=accept mark-flow=p2p-out comment="" disabled=no add in-interface=ether2 p2p=all-p2p action=accept mark-flow=p2p-out comment="" disabled=no
routeros
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-12-27 00:58 , Processed in 0.067653 second(s), 14 queries , Gzip On, Redis On.

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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