Difference between revisions of "Manual:Queues - PCQ Examples"

From MikroTik Wiki
Jump to: navigation, search
m (Same bandwidth for network users)
m
Line 1: Line 1:
== Same bandwidth for network users ==
+
== Same bandwidth for router 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:
+
In cases when you need to limit users to a specific bandwidth, you may use PCQ queues. We will limit all router users to 64kbps download and 32kbps upload:
  
 
[[Image:Fir.JPG]]
 
[[Image:Fir.JPG]]

Revision as of 09:59, 5 January 2006

Same bandwidth for router users

In cases when you need to limit users to a specific bandwidth, you may use PCQ queues. We will limit all router 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, one for download and one for upload:

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