Manual:Queues - PCQ Examples

From MikroTik Wiki
Revision as of 06:51, 5 January 2006 by Normis (talk | contribs)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

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