PCQ & Rate Equalizing

Hey Guys,

I have my first MikroTik router (RB750Gr3) which I’m using to manage a small WISP in my neighborhood. I’m using it in conjunction with Ubiquiti Rockets and LiteBeams for wireless coverage.
I bought the MikroTik device specifically for it’s PCQ feature. I’ve tried my best to understand the tutorials, but I’m completely in the dark as how to implement PCQ and rate equalization into my topology.

I’ve attached a network diagram showing the topology of the current network. Below is a detailed explanation of what I want the router to do:

I have an incoming 10Mb/s DIA connection from the ISP.
This ISP is connected to ether1 (Internet) port of the MikroTik. The Ubiquiti Switch is connected to ether2. All other network devices are connected through this switch.
The Mikrotik handles DHCP in the 192.168.2.1 subnet.
I have a Rocket5 AC which connects wirelessly to client dishes. The Rocket5 has a WAN ip of 192.168.2.2. It connects to the client dishes (Litebeam ACs) through it’s WLAN interface in a 192.168.5.1 subnet. The Litebeams then connects to the customers routers, providing DHCP in the 192.168.7.1 subnet.

I have 3 bandwidth groups that I would like to offer to customers- 3Mb/s, 5Mb/s, 7Mb/s. (These are downstream limits only, I will limit upstream via each customer AP separately)
Let’s say the first bandwidth group (3Mb/s) goes on APs with the range of 192.168.5.5- 192.168.5.10
The second bandwidth group (5Mb/s) goes on APs with the range of 192.168.5.11- 192.168.5.20
The third bandwidth group (7Mb/s) goes on APs with the range of 192.168.5.21- 192.168.5.30

I’d like to set rate equalizing for each of these bandwidth groups, where each AP would be equalized to 3/5/7 Mb/s, rather than the entire group sharing a 3/5/7 Mb/s pipe. I’d also like to have PCQ enabled for all APs. The bandwidth grouping should not have any weight on the PCQ shaper. (If two customers from each bandwidth group are downloading at the same time, PCQ should allocate 1.6Mb/s to each customer.)

I also have an application server connected to the Ubiquiti Switch. I would like this server to be able to use the full 10Mb/s bandwidth offered by the ISP, while simultaneously being shaped by PCQ along with all of the customer APs. I would also like the server to have 3Mb/s minimum bandwidth available (upload and download). I don’t want to simply ‘reserve’ this bandwidth, but instead have it dynamically allocated as the server needs it.

The rate equalizing and PCQ rules should only affect traffic coming from the ether1 interface, and not affect any other traffic within the network.

Can anyone help me out with implementing this?

no one? :frowning:

/queue simple
add dst=192.168.0.0/16 name="LAN Traffic" queue=ethernet-default/ethernet-default target=192.168.0.0/16
add max-limit=10M/10M name=WAN queue=pcq-upload-default/pcq-download-default target =192.168.0.0/16
add limit-at=3M/3M max-limit=10M/10M name="Server" parent=WAN priority=1/1 queue=pcq-upload-default/pcq-download-default target=192.168.1.120/29
add limit-at=3M/3M max-limit=10M/10M name="3MB Customers" parent=WAN priority=1/1 queue=pcq-upload-default/pcq-download-default target=192.168.5.1/28
add limit-at=5M/5M max-limit=10M/10M name="5MB Customers" parent=WAN priority=1/1 queue=pcq-upload-default/pcq-download-default target=192.168.5.16/28
add limit-at=7M/7M max-limit=10M/10M name="7MB Customers" parent=WAN priority=1/1 queue=pcq-upload-default/pcq-download-default target=192.168.5.32/28

I would setup each of your customer areas into a subnet for ease of programing the router as I have done above. Move the WAN queue to the bottom of the order as it is parent for all the others.