hi,
I’m using PCQ, for traffic shaping. I wonder if there is way to prioritize an IP’s traffic or maybe a protocol (DNS) within PCQ ?
I’ve thought of two ways to do so, both failed:
1)created a parent PCQ queue, and added children targeting different IPs.
2)created a parent default queue, and added a PCQ queue and other queue targeting different IPs as children.
IF there is no way, is it possible to mimic what PCQ does, with the help of mangle ( to mark streams of packets that come from a single IP) and limiting their traffic ?
To prioritize a protocol like DNS, then make a separate queue for that protocol (this queue need not necessarily be PCQ) - and note that the queue type doesn’t matter on any queue which is not a leaf queue. I.e. the root queue doesn’t pass tokens to the sub-queues using PCQ algorithms.
You pretty much need to make a parallel queue for any type of prioritization. If you have two different priority PCQs then this is what will happen:
Each queue will get X amount of bandwidth as a whole, as determined by the priority.
Each dynamic sub-queue will get equal treatment with the other sub-queues of the same PCQ.
Example:
If you have a parent queue with 50Mbps and two child queues: basicdata and primedata
basicdata and primedata both have max-limit of 50M so either may have the whole pipe if no clients in the other class are using any data.
limit-at = 20M on both queues so clients in either class will have at least 20M to share amongst themselves.
priority=8 on basicdata
priority=7 on primedata
This way, after both queues have received their guaranteed 20M, the remaining 10 will go to the primedata queue first.
(or you could specify 10M guaranteed for each class and let primedata have up to 40M)
If there’s some other priority traffic class such as DNS, then make a third Queue “dns” which matches the packet marks for DNS traffic, and has values e.g.
max-limit=5M limit-at=1M priority=5 parent=root queue