Per Connection Queue (PCQ) is a queuing discipline that can be used to
dynamically equalize or shape traffic for multiple users, using little administration.
It is possible to divide PCQ scenarios into three major groups: equal bandwidth
for a number of users, certain bandwidth equal distribution between unknown
number of users, unknown bandwidth(upstream/downstream) equal distribution
between users. See below example for better understanding.
We will configure the MT router for unknown bandwidth equal distribution between users.
Lets constider that,
ether1: WAN(public interface to the Internet)
ether2: LAN (local interface where clients are connected)
and LAN network: 10.0.0.0/24
/ip firewall mangle add action=mark-connection chain=forward comment="PCQ Equal mark-conn" new-connection-mark=equal-mark-con src-address=10.0.0.0/24
/ip firewall mangle add action=mark-packet chain=forward comment="PCQ Equal mark-pack" connection-mark=equal-mark-con new-packet-mark=equal-mark-pack
/queue type add kind=pcq name=pcq_down pcq-classifier=dst-address
/queue type add kind=pcq name=pcq_up pcq-classifier=src-address
/queue tree add name=DOWLOAD packet-mark=equal-mark-pack parent=LAN queue=pcq_down
/queue tree add name=UPLOAD packet-mark=equal-mark-pack parent=WAN queue=pcq_up
Step by step connect one user and Monitor Average rate, Connect two user and Monitor Average rate, Connect three user and Monitor Average rate, Connect four user and Monitor Average rate.
Its work very well!