Community discussions

MikroTik App
 
xgalsax1
just joined
Topic Author
Posts: 5
Joined: Tue Apr 12, 2022 3:50 am

Weird Cake QOS bug with Simples Queues on 7.15.2

Tue Jul 02, 2024 7:00 pm

This week I was playing around with Cake QOS on my RB5009 and I came across a strange bug with simple queues. When I set the bandwidth limit directly on the cake queue and assign it to a simple queue on a wan interface, if I try to access winbox from the wan side through the wan ip all traffic to and from that wan starts being dropped, some times it only stops dropping after I disable the simple queue entirely.

I have a dual wan setup on this 5009 so I suspected some of its configuration could be the culprit, so I grabbed an old hAP ac2 I had around and installed 7.15.2 on it, I started the ac2 with a blank configuration and only configured a bridge, ips and the queues, same result.

This is the configuration which allowed me to reproduce the issue with the hAP ac2 :
# 1970-01-02 00:19:54 by RouterOS 7.15.2
# model = RBD52G-5HacD2HnD
/interface bridge
add name=bridge
/queue type
add cake-bandwidth=100.0Mbps cake-diffserv=besteffort kind=cake name=\
    cake-wan-down
add cake-bandwidth=50.0Mbps cake-diffserv=besteffort kind=cake name=\
    cake-wan-up
/queue simple
# CAKE type with bandwidth setting detected, configure traffic limits within queue itself
add name=wan-qos queue=cake-wan-down/cake-wan-up target=ether1
/interface bridge port
add bridge=bridge interface=ether2
add bridge=bridge interface=ether3
add bridge=bridge interface=ether4
add bridge=bridge interface=ether5
/ip firewall connection tracking
set udp-timeout=10s
/ip address
add address=192.168.88.1/24 interface=bridge network=192.168.88.0
add address=192.168.100.2/24 interface=ether1 network=192.168.100.0

Is this a known bug? I did a quick search and found nothing on this.
Last edited by xgalsax1 on Tue Jul 02, 2024 8:56 pm, edited 2 times in total.
 
neki
Member Candidate
Member Candidate
Posts: 252
Joined: Thu Sep 07, 2023 10:20 am

Re: Weird Cake QOS bug with Simples Queues on 7.15.2

Tue Jul 02, 2024 7:33 pm

The red text reporting you misconfiguration doesn't strike you? Also the values are wrong, use just M or k
# CAKE type with bandwidth setting detected, configure traffic limits within queue itself

sq01.png
Mbps is not valid
You do not have the required permissions to view the files attached to this post.
 
xgalsax1
just joined
Topic Author
Posts: 5
Joined: Tue Apr 12, 2022 3:50 am

Re: Weird Cake QOS bug with Simples Queues on 7.15.2

Tue Jul 02, 2024 7:49 pm

The red text reporting you misconfiguration doesn't strike you? Also the values are wrong, use just M or k
# CAKE type with bandwidth setting detected, configure traffic limits within queue itself
sq01.png
Mbps is not valid
That's just a warning, not exactly a misconfiguration, you CAN configure the bandwidth directly on the queue with Cake, it's a feature.

About the "Mbps", that's just how the export command works, configure bandwidth directly on a Queue Type and try it yourself:
/export file=config.rsc

It's a valid command on the terminal.
 
neki
Member Candidate
Member Candidate
Posts: 252
Joined: Thu Sep 07, 2023 10:20 am

Re: Weird Cake QOS bug with Simples Queues on 7.15.2

Tue Jul 02, 2024 8:10 pm

I did try it before posting.. 8) Anyway you choose to ignore the advice (not from me, but from ROS itself) and you are now curious why it's not working.. I have no idea why not to try it...

At the end, my cake is working fine... :-P
 
xgalsax1
just joined
Topic Author
Posts: 5
Joined: Tue Apr 12, 2022 3:50 am

Re: Weird Cake QOS bug with Simples Queues on 7.15.2

Tue Jul 02, 2024 8:11 pm

I did try it before posting.. 8) Anyway you choose to ignore the advice (not from me, but from ROS itself) and you are now curious why it's not working.. I have no idea why not to try it...

At the end, my cake is working fine... :-P
Please refrain from posting if you have no idea of what you are talking about.
viewtopic.php?t=179307
Here's a topic of one of the contributors to cake talking in depth about how it works, in many examples the bandwidth limit is set directly on the queue type.
There they talk about how it works and the benefits of configuring it directly on the queue type.
 
almdandi
Frequent Visitor
Frequent Visitor
Posts: 78
Joined: Sun May 03, 2015 5:22 pm

Re: Weird Cake QOS bug with Simples Queues on 7.15.2

Tue Jul 02, 2024 9:45 pm

I reported the exact same problem to Mikrotik support same months ago. I followed this post, also recommending to set the limit on the queue-type it self.

This was the answer from support
Hello

Please fix this configuration problem here first:

/queue simple

CAKE type with bandwidth setting detected, configure traffic limits within queue itself
add bucket-size=0.001/0.001 name=CAKE_SHAPE queue=cake-download/cake-upload \
target=pppoe-fonira
If you create CAKE type of queue, you can use it freely on queue/interface settings. If you want to use CAKE type queue as Simple or Tree queue, then on queue type definition you do not need to specify cake-bandwidth parameter. This must be specified on the Simple/Tree queue itself as max-limit.

Best regards
 
xgalsax1
just joined
Topic Author
Posts: 5
Joined: Tue Apr 12, 2022 3:50 am

Re: Weird Cake QOS bug with Simples Queues on 7.15.2

Tue Jul 02, 2024 10:08 pm

I reported the exact same problem to Mikrotik support same months ago. I followed this post, also recommending to set the limit on the queue-type it self.

This was the answer from support
Hello

Please fix this configuration problem here first:

/queue simple

CAKE type with bandwidth setting detected, configure traffic limits within queue itself
add bucket-size=0.001/0.001 name=CAKE_SHAPE queue=cake-download/cake-upload \
target=pppoe-fonira
If you create CAKE type of queue, you can use it freely on queue/interface settings. If you want to use CAKE type queue as Simple or Tree queue, then on queue type definition you do not need to specify cake-bandwidth parameter. This must be specified on the Simple/Tree queue itself as max-limit.

Best regards
Are you sure it's the same issue?
On my case the simple queue works perfectly fine until someone tries to access Winbox through the wan interface, then it starts dropping all packets on that interface.
For now I have setted the bandwidth limit on the simple queue instead of the queue type.
 
almdandi
Frequent Visitor
Frequent Visitor
Posts: 78
Joined: Sun May 03, 2015 5:22 pm

Re: Weird Cake QOS bug with Simples Queues on 7.15.2

Wed Jul 03, 2024 12:53 am

I think so. I first tested the simple queue with the bandwidth limit set in the queue type on an RB5009 and it worked perfectly. I never connected to the RB5009 via winbox from WAN but one think i noticed was that `/certificate enable-ssl-certificate` also bugged the router forwarding traffic towards WAN. If I then restarted the pppoe tunnel or just disabled the simple queue, all started working again.

I also tried the setup on a CCR2116-12g-4s+, ware i was directly connected via winbox from WAN. As soon as I enabled the simple queue i lost connection. The public ip address was unreachable from the internet.
 
pe1chl
Forum Guru
Forum Guru
Posts: 10568
Joined: Mon Jun 08, 2015 12:09 pm

Re: Weird Cake QOS bug with Simples Queues on 7.15.2

Fri Jul 26, 2024 1:48 pm

I am experiencing issues with CAKE as well. I described them in this topic: viewtopic.php?t=209551
But now reading this, it may be that I am looking too deeply into it and the issue is more plain.

Does anyone here know if CAKE is re-ordering packets, e.g. prioritizing small packets over large ones?
That would improve TCP latency (prioritizing ACK) but maybe in my case (MLPPP) it may cause issues.
 
dtaht
Member Candidate
Member Candidate
Posts: 226
Joined: Sat Aug 03, 2013 5:46 am

Re: Weird Cake QOS bug with Simples Queues on 7.15.2

Fri Jul 26, 2024 10:30 pm

Cake does fair queuing using a DRR++ (deficit round robin) derived algorithm. So it attempts to deliver a MTU´s worth of bytes from each flow, in order (DRR), and also puts out flows with an arrival rate less than the total departure rate first.

Do not combine htb (simple queues) + cake bandwidth XXMbps. You cannot have two bandwidth managers inline in this way.