Community discussions

MikroTik App
 
wtechlink
just joined
Topic Author
Posts: 11
Joined: Tue Mar 03, 2020 3:09 am

Cake Queues for multiple IPs with one queue?

Thu Sep 29, 2022 1:36 am

I run an ISP so this is at the provider level. We have customer IP addresses in firewall lists by speed, eg: 100000. Then we use mangle to park packets with those speeds as packet marks. We are currently using PCQ's and Simple queue to limit our users bandwidth but I wanted to try the new CAKE queues to give our customers a better experience by using the QOS features that CAKE offers but I'm running into an issue.

As of right now I define the PCQ in queue types with the Dst. Address classifier and a Src. Address Mask of 32 and then use that in the simple queues for all users by using the target=0.0.0.0/0. This lets every user get their full 100Mb before it starts to throttle them while the queue itself is able to process 500Mb+ at a time. This is my current PCQ Config:
/queue type
add kind=pcq name=PCQ_DOWN_100M pcq-burst-rate=120M pcq-burst-threshold=98M \
    pcq-burst-time=15s pcq-classifier=dst-address pcq-rate=100M \
    pcq-total-limit=1000000000KiB
add kind=pcq name=PCQ_UPLOAD_100M pcq-burst-rate=120M pcq-burst-threshold=98M \
    pcq-burst-time=15s pcq-classifier=src-address pcq-rate=100M \
    pcq-total-limit=1000000000KiB
/queue simple
add dst=sfp28-2 name="100k - 0.0.0.0/0" packet-marks=100000 \
    queue=PCQ_UPLOAD_100M/PCQ_DOWN_100M target="0.0.0.0/0"
However, when I try to implement CAKE it takes every IP address inside the target range and limits the sum of those IP's to 100Mb. So if I have 10 customers on different IP addresses around town trying to use the internet they are limited to 100Mb TOTAL instead of 100Mb EACH. This was the CAKE config:
/queue type
add cake-bandwidth=100.0Mbps cake-nat=yes kind=cake name=CAKE_DOWN_100M
add cake-bandwidth=100.0Mbps cake-nat=yes kind=cake name=CAKE_UP_100M
/queue simple
add dst=sfp28-2 name="cake 100M" packet-marks=100000 queue=\
    CAKE_UP_100M/CAKE_DOWN_100M target="0.0.0.0/0"
Is there a way to implement CAKE without creating an individual queue for each customer IP address or is this a feature that is planned in the future? If there was a Dst. Address classifier I'm sure it would work. I can't really have thousands of queues and keep track of those on all my edge routers so without some work around I'm not sure I can use CAKE. But man, the experiments I performed were amazing and it's something I REALLY want to get into my network.

Any input is appreciated!!
 
dtaht
Member Candidate
Member Candidate
Posts: 209
Joined: Sat Aug 03, 2013 5:46 am

Re: Cake Queues for multiple IPs with one queue?

Tue Oct 11, 2022 5:10 am

We (the cake developers) are struggling on how to implement your design with cake as well. We designed primarily to control the cpe (and would recommend you implement it there as well as it pays to shape/drop packets/etc as close to the exit point as possible.

We know how to do it using htb, in linux, and openwrt, and most recently libreqos.io. Over here we're trying to figure out how to output mikrotik compatible rules to accomplish what you (and many other new users of cake here on these forums), want: https://github.com/rchac/LibreQoS/issues/120
 
dtaht
Member Candidate
Member Candidate
Posts: 209
Joined: Sat Aug 03, 2013 5:46 am

Re: Cake Queues for multiple IPs with one queue?

Tue Oct 11, 2022 6:24 am

puckishly, I could suggest you change your business model, guaranteeing a minimum of number_of_ips_on_the_link/bandwidth, and just applying cake,
which does that automatically (it is fair to each ip). Customers would then be able to use up to the 500mbits available, and most usage patterns are *way* below that, so you could sell plans that offered 200mbit (but exceeded that usually) and only when you started seeing that 500mbit being cracked regularly, increase that limit.

Just don't tell em you weren't enforcing the upper limit. They'd be happy not to tell you they regularly got more than what they thought they were paying for!

This is also an opportunity to sell/rent better CPE to the customer which could then be used to enforce more limits, and provide better service overall on the wifi, etc.
 
jo2jo
Forum Guru
Forum Guru
Posts: 1003
Joined: Fri May 26, 2006 1:25 am

Re: Cake Queues for multiple IPs with one queue?

Wed Mar 06, 2024 12:35 am

we are bumping up against this same issue (ie currently using PCQ queues set to /32 Src Address mask to limit each Individual user device, in a private ip range of /23 to 50Mbit up/down).

since we are now slowly moving some locations to ros7 (from v6), this is a new possibility. (and wow! both fq_codal and cake preform excellently in our own synthetic tests here vs older queue types!)

So im also looking for a solution to use cake or FQ_codal queues (that does not involve creating 500x , or more, individual queues).

Although this would be easy to script on mikrotik, so may give it a try and will report back with results (or if i find a alternative solution).

Please do same (or If anyone else has a method to accomplish this currently, please post)

Who is online

Users browsing this forum: adrianmartin16, Amazon [Bot] and 74 guests