Page 1 of 1
p2p traffic limit
Posted: Tue Jul 05, 2005 4:10 pm
by fatonk
Hello all,
I have limited all my clients with 128 Kbps, with Per Address Queuing using PCQ, now I would like to limit the P2P traffic Per Address Queuing using PCQ, with 32 Kbps per client.
Is this possible to limit the bandwidth at 128 Kbps per client and at the same time P2P at 32 Kbps per client ???
Posted: Wed Jul 06, 2005 11:56 pm
by sergejs
This 32k limit included in 128k limit or not ?
Posted: Thu Jul 07, 2005 1:52 pm
by Roman
use mangle
first mark p2p traffic, then everything else
and create separate pcq types for p2p and for all
Posted: Thu Jul 07, 2005 2:53 pm
by fatonk
First I have marked p2p traffic and than all other traffic, what I have done you can find it below:
for p2p traffic I have configured as follows:
[admin@MikroTik] ip firewall mangle> add src-address=10.84.0.0/24 mark-flow=p2p-out p2p=all-p2p action=passthrough
[admin@MikroTik] ip firewall mangle> add dst-address=10.84.0.0/24 mark-flow=p2p-in p2p=all-p2p action=passthrough
[admin@MikroTik] queue type> add name="p2p-out" kind=pcq pcq-rate=32000 pcq-classifier=src-address
[admin@MikroTik] queue type> add name="p2p-in" kind=pcq pcq-rate=32000 pcq-classifier=dst-address
[admin@MikroTik] queue tree> add name="p2p-in" parent=global-in flow=p2p-in queue=p2p-in
[admin@MikroTik] queue tree> add name="p2p-out" parent=global-out flow=p2p-out queue=p2p-out
for all other traffic I have configured as follows:
ip firewall mangle add action=accept mark-flow=all
queue type add name=PCQ-Download kind=pcq pcq-rate=131072 pcq-classifier=dst-address
queue type add name=PCQ-Upload kind=pcq pcq-rate=131072 pcq-classifier=src-address
queue tree add parent=global-in queue=PCQ-Download flow=all
queue tree add parent=global-out queue=PCQ-Upload flow=all
Posted: Thu Jul 07, 2005 7:03 pm
by fatonk
I have found where the trick was,
under ip firewall mangle instead of add action=passthrough should be used add acction=accept, in order not to ignore the first rule and jump to the next one, which is limiting the bandwidth and not P2P.