Manual:Queues - PCQ Examples: Difference between revisions

From MikroTik Wiki
Jump to navigation Jump to search
No edit summary
 
No edit summary
Line 1: Line 1:
== Same bandwidth for network users ==
== Same bandwidth for network users ==


[[Image:Fir.jpg]]
In cases when you need to limit users to a specific bandwidth, you may use PCQ queues. We will limit all users to 64kbps download and 32kbps upload:
 
[[Image:Fir.JPG]]
 
 
1. Mark all packets with packet-mark all:
 
/ip firewall mangle add chain=prerouting action=mark-packet new-packet-mark=all passthrough=no
 
 
2. Setup two PCQ queue types - one for download and one for upload. dst-address is classifier for user's download traffic, src-address for upload traffic:
 
/queue type name="PCQ_download" kind=pcq pcq-rate=64000 pcq-classifier=dst-address
/queue type name="PCQ_upload" kind=pcq pcq-rate=32000 pcq-classifier=src-address
 
 
3. Finally, two queue rules required:
 
/queue tree add parent=global-in queue=PCQ-download packet-mark=all
/queue tree add parent=global-out queue=PCQ-upload packet-mark=all

Revision as of 22:51, 4 January 2006

Same bandwidth for network users

In cases when you need to limit users to a specific bandwidth, you may use PCQ queues. We will limit all users to 64kbps download and 32kbps upload:

Fir.JPG


1. Mark all packets with packet-mark all:

/ip firewall mangle add chain=prerouting action=mark-packet new-packet-mark=all passthrough=no


2. Setup two PCQ queue types - one for download and one for upload. dst-address is classifier for user's download traffic, src-address for upload traffic:

/queue type name="PCQ_download" kind=pcq pcq-rate=64000 pcq-classifier=dst-address /queue type name="PCQ_upload" kind=pcq pcq-rate=32000 pcq-classifier=src-address


3. Finally, two queue rules required:

/queue tree add parent=global-in queue=PCQ-download packet-mark=all /queue tree add parent=global-out queue=PCQ-upload packet-mark=all