Manual:Queues - PCQ Examples: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
|||
Line 11: | Line 11: | ||
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: | 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_download" kind=pcq pcq-rate=64000 pcq-classifier=dst-address | ||
Line 17: | Line 17: | ||
3. Finally, two queue rules required: | 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-in queue=PCQ-download packet-mark=all | ||
/queue tree add parent=global-out queue=PCQ-upload packet-mark=all | /queue tree add parent=global-out queue=PCQ-upload packet-mark=all |
Revision as of 08:56, 5 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:
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