For ISPS: Motivations and methods for implementing fq_codel and cake

Im using one of your queue tree script with dscp mangling now that cake is possible should i just change the queue type to cake in queue tree. Or is there anything more that should be configured in mangle or queue tree.

With cake you don’t need the 8 leaf queues anymore for the different priorities, only the parent queue. The script you showed for openwrt had some additional mangling of certain websites to mark them in certain ways which might be useful to you, these markings can be done in RouterOS using address lists to store the sites and packet mark rules in the mangle table.

Thanks, so for 8 leaf queues it needs to be remove and cake queue for the parent. What packet mark do put for the parent queue ? no-mark ? is cake aware of the dscp value from mangle ?

Yes, use no-mark for the parent, and remove any mangle rules that apply any mark other than no-mark. And, yes, cake is aware of the dscp rule from mangle.

Thanks i’ll tweak your queue tree script for cake

@mducharme

No, I had failed to “connect the dots” on your terminology and subguis. (I’m still seeking a decent high end mikrotik box to try) Sounds like cake’s shaper (bandwidth param) can be used natively using that last panel you showed, without an htb. Yay!

cake’s “bandwidth” is not an “addon” parameter that could be used directly by some other qdisc like sfq, but integral to it, like the other params.

The “container” htb and tbf qdiscs inherit the default qdisc (in the bad ole days, pfifo_fast). There were a lot of shapers out there that used the default qdisc without explicit setup, so we’d hoped as this sysctl became common:

net.core.default_qdisc=fq_codel

that typical htb and tbf setups would just pick that up, just as they (sadly) picked up the change in pfifo_fast from 100 to 1000 packets by default in 2006.

Other shaper implementations (like I tend to think mikrotik is like) probably explicitly lay out all the params for you via the gui (with inheritance). Things to do on a migration would include not using packet limits anymore.

While I hope that we produce better documentation out of these long threads, I really long for getting detailed statistics out of these setups, in part to verify they are actually doing what we think they are!

I’ve been working on testing Cake on a CCR2116 and was able to shape at 10G line rate with no issue - i’m working on getting IPv6 up in my test network so I can try Cake with IPv6 as well but having some odd issues with OSPFv3 in 7.2rc1.

That said, being able to apply Cake with label switched traffic is a great idea and I’ll probably try that next!

In a more ISP-ideal world the ISP router would shape down to the customer, and the CPE router shape the up. It’s more cpu efficient, and packets
get dropped (and acks filtered) before they hit the bottleneck link. Our efforts to do both sides of the shaping on the consumer end router was more an act of desperation than efficiency, although the advantages of handing both sides of this task to the far edge can be pretty compelling.

I am not much of a lobbyist, but if there is a mikrotik group representing WISP interests?, i’d like to talk to them about how to spend a billion $ better:

https://docs.google.com/document/d/1FjRo9MNnVOLh733SNPNyqaR1IFee7Q5qbMrmW1PlPr8/edit

Hello!

First of all, thank you for developing this amazing tool, @dtaht. I do not know weather this request of mine really fits in this post. If not, my apologies.

I’m currently using Cake with queue trees in my home router. My experience with it so far is fine. However, I have some doubts with its design and correct configuration, so I wish if someone who has been involved in its development, could clarify it for me, please.
I get connected to my ISP’s FTTH ONT through ether1 port. This connection is composed of three vlans: vlan-2 is for VoIP, vlan-3 is for iptv, and via vlan-6, I get the connection to the internet with pppoe encapsulation. So, I configure a pppoe-client over vlan-6 to get decapsulated pppoe traffic through pppoe-out interface. I would really appreciate if someone would help me to understand how the classification of the packet flows works for this scenario with Cake and fq-codel. I know that it is based on Linux flow dissector and that it can cope with protocols like GRE or IP-in-IP, but I would like to be sure that it can also cope with PPPoE. Namely, my questions are:

  1. if I place a Cake tree queue at the ether1 interface for upstream, will Cake decapsulate correctly pppoe traffic and arrange 5-tuples based on the actual iP source and destination addresses for the internet traffic ?
  2. Or should I place it at the pppoe-out interface instead?
  3. If I use fq-codel instead, should I use ether1 or pppoe-out?

The config I’m using is the following:

/queue type
add cake-diffserv=diffserv4 cake-flowmode=dual-srchost cake-mpu=84 cake-nat=
yes cake-overhead=50 cake-overhead-scheme=
ethernet,ether-vlan,ether-vlan,ether-vlan kind=cake name=cake-int-ul
add cake-diffserv=diffserv4 cake-flowmode=dual-dsthost cake-mpu=84 cake-nat=
yes cake-overhead=50 cake-overhead-scheme=
ethernet,ether-vlan,ether-vlan,ether-vlan kind=cake name=cake-int-dl
/queue tree
add bucket-size=0.005 max-limit=610M name=upload-queue packet-mark=no-mark
parent=WAN-ether1 queue=cake-int-ul
add bucket-size=0.005 max-limit=610M name=download-queue packet-mark=no-mark
parent=bridge queue=cake-int-dl

..and here you can find the results. I have 500Mb/s symmetrical nominal, but I get 620Mb/s measured.


Screenshot 2024-09-04 at 23.57.48.jpg

I’m using cake too and always wonder if my configuration is right. All guides and YT video’s show another way to configure it on RouterOS. I wish Mikrotik would make a guid on it and say “This is the right way to do it”.

Xmas is soon. Write a :envelope: