Hello guys, I want to control download and upload traffic for pppoe users connected with Mikrotik as pppoe-concentrator, by limiting the bandwidth based on group of users (users profiles), and at the same time equalize the bandwidth usage among users with the same profile. As an example, having some users with profile A, and other with profile B, and for the download side, I follow the following steps:
1) Create an IP address list of the users belonging to profile A and of the users belonging to profile B
2) Create the mangle rules to mark their packets:
Profile A
- /ip firewall mangle add chain=prerouting dst-address-list=A_list action=mark-connection new-connection-mark=A_conn passthrough=yes
- /ip firewall mangle add connection-mark=A_conn action=mark-packet new-packet-mark=A_mark chain=prerouting passthrough=no
Profile B
- /ip firewall mangle add chain=prerouting dst-address-list=B_list action=mark-connection new-connection-mark=B_conn passthrough=yes
- /ip firewall mangle add connection-mark=B_conn action=mark-packet new-packet-mark=B_mark chain=prerouting passthrough=no
3) Define new pcq queue types for A and B:
- /queue type add name=pcq_A kind=pcq pcq-classifier=dst-address
- /queue type add name=pcq_B kind=pcq pcq-classifier=dst-address
4) Define the download queue:
- /queue tree add name=Download parent=Local max-limit=total_available_dowload_bandwidth
5) Define the child queues:
- /queue tree add parent=Download limit-at=128K max-limit=1M queue=pcq_A packet-mark=A_mark
- /queue tree add parent=Download limit-at=256K max-limit=2M queue=pcq_B packet-mark=B_mark
The problem is that, while packets of a given address-list appears to be market correctly, I cannot see any packet in both the parent (Download) and the child queues (it is like the above controls doesn't make place). If, on the other hand, I set "global-in" virtual interface as parent of the "Download" queue, instead of "Local", I can see packet enqueued (but I wish to make the download control on the Local interface...).
Where I'm wrong? Anyone has some advice, correction or suggestion?
Thank you
-- gio