Cake(-autorate) teardown interfaces

tagging @Lynx
See: https://github.com/lynxthecat/cake-autorate/issues/333

Specifically https://github.com/lynxthecat/cake-autorate/issues/333#issuecomment-2844564141 where Lynx calls out a number of things over my head at the moment.

As much as it was actually contributions from others on here, on OFTC Openwrt and wiki contributors and searches on the internet (various forums and answer sites):

This script turns a lackluster bufferbloatery setup into super-smooth internetting. [All the protonvpnx wireguard interfaces set up for ipv4&6 using the not yet official but necessary ipv6 support. A further tweak seems to be setting the MTU on the vpn interface to 1300/1320.]

Can someone either edit the wiki or show the modifications necessary to 'tear down' the other cake interfaces. If there was a simple command that could be run to tear-down all cake interfaces, so it can be used in the part of the script that evaluates the cake situation,

that would be great. And if you could come in on Saturday, there's some TPS reports.

The wiki history indicates a wiki user s2s2 edited that script. @vgaetera do you know if the original author of that script on the wiki has an OpenWrt forum account?

@Dnominated the issue here relates to how to manage cake in the context of all these different VPN interfaces that can get used.

I think there are better ways to set up cake in this situation than the way attempted in this script.

See here:

Or here:

The first approach would need some adaptation to work with the multiple interfaces.

The second approach would pretty much work out of the box.

Whatever approach you use will require you to invest time into figuring a few things out. What you are trying to do is not entirely straightforward.

1 Like

I don't think it matters who wrote it. It matters if there is a simple way to modify it to make it work.

The temptation for so many is to make it excessively complex, whatever they are attempting to do. I don't know if that stems from insecurity or just curiosity. But at the end of the day, it's the KISS principal that matters.

Keep It Simple (Stupid).

Another way to ask this, is:
Given the existing script, which works fine after an initial boot (initial application of the vpn interface, followed by a 'service cake-autorate start'), if later, the VPN connection fails, and it needs to connect the second, third or fourth VPN (whichever one probes as good), will a simple

service cake-autorate restart

afterwards, work?

The only modifications to the default /root/cake-autorate/config,primary.sh are 1 additional line (read -r...) and then modifying the dl_if and ul_if variables to pull the current VPN dynamically:

read -r CAKEWAN < /tmp/currentvpn.txt
dl_if="ifb4${CAKEWAN}"
ul_if="${CAKEWAN}"

That retrieves the current active vpn interface, as reported by the /root/wan-watchdog.sh.

Hmm, I still think:

applies here.

From a brief look at that script it doesn’t seem to be setting up cake itself. Is that right? And if so, how are you managing that?

In any case, you have all the ingredients you need here!

I asked someone that knew more than me, and it got done.

Onto the next project..

Care to share exactly what ‘got done’ for the benefit of any others that read this thread and may be in the same position? Or do you intend to keep that a secret?

Instead of reporting my post, like someone who can't cope with criticism for bad behavior?