killerwc3 发表于 2005-1-20 22:30:21
BT下载是不错的,但是如果下载者不限速则会占用大量的网络带宽出口,曾经看到有人说过,设置ROUTEROS的BT下载速度,如果有人用BT,就自动把用BT的人的网速降到一定的值。请那位兄弟出来具体说说如何设置,解救受BT祸害的大众吧!killerwc3 发表于 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. ip firewall src-nat> add src-address=192.168.0.0/24 \\... action=masquerade ip firewall src-nat> printFlags: X - disabled, I - invalid, D - dynamic0 src-address=192.168.0.0/24 action=masquerade 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. ip firewall mangle> add src-address=192.168.0.0/24 p2p=all-p2p \\... mark-connection=p2p_con action=passthrough ip firewall mangle> add connection=p2p_con action=acceptmark-flow=p2p_limit ip firewall mangle>Next, we will make two PCQ types - one for download (pcq-download), and one for upload(pcq-upload). queue type> add kind=pcq name=pcq-download \\... pcq-rate=256000 pcq-classifier=dst-address queue type> add kind=pcq name=pcq-upload \\... pcq-rate=128000 pcq-classifier=src-address 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 queue type>And finally, add the queue rules. queue tree> add name=down parent=Local \\... flow=p2p_limit queue=pcq-download queue tree> add name=up parent=Public \\... flow=p2p_limit queue=pcq-upload 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 queue tree>Page 433 of 545bow 发表于 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
页:
[1]