sblive 发表于 2005-1-28 16:34:44

好东西来了,routeros防火墙规则,限制所有P2P的速度,如果有人用P2P软件,自动把他的速度降到51K,上传降到25K,在命令行下输入,或在WINBOX下设也可以,注意要把IP改成自己的IP段。另送上170个IP的限速脚本,用记事本编辑替换IP为自己的IP就可以了,每个IP下载限制51K,上传25K ip firewall src-nat> add src-address=192.168.0.0/24 \... action=masquerade 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 queue type> add kind=pcq name=pcq-download \... pcq-rate=512000 pcq-classifier=dst-address queue type> add kind=pcq name=pcq-upload \... pcq-rate=256000 pcq-classifier=src-address 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

sblive 发表于 2005-1-28 16:35:28

这是转的,但是我加的时候提示flow=p2p_limit这一句有问题。。。请高手指正啊

默默 发表于 2005-1-28 16:45:42

使用PCQ限速...丢包...有好几个试过的都是如此..不知怎解..

killerwc3 发表于 2005-1-28 20:26:50

QUOTE (默默 @ Jan 28 2005, 04:45 PM)
使用PCQ限速...丢包...有好几个试过的都是如此..不知怎解..
没丢包的现象呀,这是MK官方的做法,对P2P还是蛮有效的,结合限速脚本一起用。

sblive 发表于 2005-1-29 00:04:53

QUOTE (killerwc3 @ Jan 28 2005, 08:26 PM)


QUOTE (默默 @ Jan 28 2005, 04:45 PM)
使用PCQ限速...丢包...有好几个试过的都是如此..不知怎解..
没丢包的现象呀,这是MK官方的做法,对P2P还是蛮有效的,结合限速脚本一起用。
请大大看看我的例子,我的提示FLOW有问题啊,这个例子有问题吗?

bow 发表于 2005-1-29 00:21:35

你用winbox加呢?再导出来看看。可能是你写的flow和前面设的有不一样的地方。

sblive 发表于 2005-1-29 00:25:37

QUOTE (bow @ Jan 29 2005, 12:21 AM)
你用winbox加呢?再导出来看看。可能是你写的flow和前面设的有不一样的地方。
就是用的WINBOX加的啊,在FLOW中没有这个flow=p2p_limit选项。。。郁闷。。

sblive 发表于 2005-1-29 00:53:07

终于弄好了,有些东东必须要在命令行下输入...郁闷.

bow 发表于 2005-1-29 11:22:58

QUOTE (sblive @ Jan 29 2005, 12:25 AM)


QUOTE (bow @ Jan 29 2005, 12:21 AM)
你用winbox加呢?再导出来看看。可能是你写的flow和前面设的有不一样的地方。
就是用的WINBOX加的啊,在FLOW中没有这个flow=p2p_limit选项。。。郁闷。。
mangle 里没加的话当然看不到了.

hzkane 发表于 2005-1-31 12:54:41

以下是我的,成功的限制了P2P和BT下载为56-28。。。# jan/31/2005 12:58:16 by RouterOS 2.8.18# software id = A4PD-LJN#/ queue type set default name="default" kind=pfifo bfifo-limit=15000 pfifo-limit=50 red-limit=60 \    red-min-threshold=10 red-max-threshold=50 red-burst=20 sfq-perturb=5 \    sfq-allot=1514 pcq-rate=0 pcq-limit=50 pcq-classifier="" set ethernet-default name="ethernet-default" kind=pfifo bfifo-limit=15000 \    pfifo-limit=50 red-limit=60 red-min-threshold=10 red-max-threshold=50 \    red-burst=20 sfq-perturb=5 sfq-allot=1514 pcq-rate=0 pcq-limit=50 \    pcq-classifier="" set wireless-default name="wireless-default" kind=sfq bfifo-limit=15000 \    pfifo-limit=50 red-limit=60 red-min-threshold=10 red-max-threshold=50 \    red-burst=20 sfq-perturb=5 sfq-allot=1514 pcq-rate=0 pcq-limit=50 \    pcq-classifier="" set synchronous-default name="synchronous-default" kind=red bfifo-limit=15000 \    pfifo-limit=50 red-limit=60 red-min-threshold=10 red-max-threshold=50 \    red-burst=20 sfq-perturb=5 sfq-allot=1514 pcq-rate=0 pcq-limit=50 \    pcq-classifier="" add name="PCQ-Download" kind=pcq bfifo-limit=15000 pfifo-limit=10 red-limit=60 \    red-min-threshold=10 red-max-threshold=50 red-burst=20 sfq-perturb=5 \    sfq-allot=1514 pcq-rate=56000 pcq-limit=50 pcq-classifier=dst-address add name="PCQ-Upload" kind=pcq bfifo-limit=15000 pfifo-limit=10 red-limit=60 \    red-min-threshold=10 red-max-threshold=50 red-burst=20 sfq-perturb=5 \    sfq-allot=1514 pcq-rate=28000 pcq-limit=50 pcq-classifier=src-address add name="PCQ_BT_IN" kind=pcq bfifo-limit=15000 pfifo-limit=10 red-limit=60 \    red-min-threshold=10 red-max-threshold=50 red-burst=20 sfq-perturb=5 \    sfq-allot=1514 pcq-rate=56000 pcq-limit=50 pcq-classifier=dst-address add name="PCQ_BT_OUT" kind=pcq bfifo-limit=15000 pfifo-limit=10 red-limit=60 \    red-min-threshold=10 red-max-threshold=50 red-burst=20 sfq-perturb=5 \    sfq-allot=1514 pcq-rate=28000 pcq-limit=50 pcq-classifier=src-address add name="queue1" kind=red bfifo-limit=15000 pfifo-limit=10 red-limit=60 \    red-min-threshold=10 red-max-threshold=50 red-burst=20 sfq-perturb=5 \    sfq-allot=1514 pcq-rate=0 pcq-limit=50 pcq-classifier="" / queue simple add name="download_1_down_up" target-address=0.0.0.0/0 dst-address=192.168.1.0/24 \    interface=all queue=default priority=8 limit-at=50000/30000 \    max-limit=100000/50000 disabled=yes add name="6chenxw_down_up" target-address=0.0.0.0/0 dst-address=192.168.0.6/32 \    interface=all queue=default priority=8 limit-at=50000/20000 \    max-limit=50000/40000 disabled=no add name="download_2_down_up" target-address=0.0.0.0/0 dst-address=192.168.2.0/24 \    interface=all queue=queue1 priority=8 limit-at=0/0 max-limit=0/0 disabled=yes add name="download_3_down_up" target-address=0.0.0.0/0 dst-address=192.168.3.0/24 \    interface=all queue=queue1 priority=8 limit-at=0/0 max-limit=0/0 disabled=no / queue tree add name="P2P-IN" parent=530lan1 flow=p2p_in limit-at=0 queue=PCQ-Download \    priority=8 max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0 disabled=no add name="P2P-OUT" parent=530wan1 flow=p2p_out limit-at=0 queue=PCQ-Upload \    priority=8 max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0 disabled=no add name="queue1" parent=139lan2 flow=http-out limit-at=0 queue=default priority=8 \    max-limit=1024000 burst-limit=0 burst-threshold=0 burst-time=0 disabled=yes add name="up1" parent=139lan2 flow=up limit-at=50000 queue=default priority=8 \    max-limit=100000 burst-limit=0 burst-threshold=0 burst-time=0 disabled=yes add name="download" parent=530lan1 flow=all limit-at=30000 queue=PCQ-Download \    priority=8 max-limit=50000 burst-limit=0 burst-threshold=0 burst-time=0 \    disabled=yes add name="uoload" parent=139lan2 flow=all limit-at=30000 queue=PCQ-Upload \    priority=8 max-limit=50000 burst-limit=0 burst-threshold=0 burst-time=0 \    disabled=yes add name="BT-IN" parent=530lan1 flow=bt-in limit-at=0 queue=PCQ_BT_IN priority=8 \    max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0 disabled=no add name="BT-OUT" parent=530wan1 flow=bt-out limit-at=0 queue=PCQ_BT_OUT priority=8 \    max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0 disabled=no add name="down" parent=530lan1 flow=p2p_limit limit-at=0 queue=PCQ-Download \    priority=8 max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0 \    disabled=yes add name="up" parent=139lan2 flow=p2p_limit limit-at=0 queue=PCQ-Upload priority=8 \    max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0 disabled=yes

qs168 发表于 2005-1-31 14:25:18

页: [1]
查看完整版本: 限制P2P和IP速度脚本。但似乎有问题,请高手指正。