What's new

[RT-AC86U] I built cake!!!

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Status
Not open for further replies.
Thanks, it looks good; the only possible thing is rounding up your upload speed so it's:

/jffs/scripts/cake-qos-start.sh start 58Mbit 13Mbit "pppoe-ptm ack-filter"

Perhaps it doesn't like the period. I hope this fixes it!
Just tried that. Unfortunately, it still doesn't appear to start at start-up. Not a massive problem though, I can start it manually easily enough :)

Edit: Should I still be using the FreshJR script when using cake?
 
Just tried that. Unfortunately, it still doesn't appear to start at start-up. Not a massive problem though, I can start it manually easily enough :)

Edit: Should I still be using the FreshJR script when using cake?

It clearly says to DISABLE any other QOS and even Bandwidth Monitor. All please read carefully. We posted all the pre-reqs on Page 5.

Logically speaking why would one want 2 services competing to do the same thing??
 
Just tried that. Unfortunately, it still doesn't appear to start at start-up. Not a massive problem though, I can start it manually easily enough :)

Edit: Should I still be using the FreshJR script when using cake?
Disable qos from gui
 
My sincere thanks to everyone contributing to this, I never really liked running QoS on my AC86U because it meant having to enable Trend-Micro.

Although I'm not a native to Bash scripting, I've made some modifications to the script to allow for parameter passing to minimize the need to edit the main cake script directly (and also uploaded the binaries to my server for easy installation). This means you only need to edit /jffs/scripts/services-start to change your settings (e.g. speeds, optional extra parameters like "docsis ack-filter")

To anyone looking to put together the "official" script feel free to use any part of my code, no credits needed :)

https://5m.ca/cake/ (contains my script, the binaries, and an md5sums.txt file so you can compare the hashes against the Google Drive ones linked in the other installation guides). Other installation guides in this thread:

https://www.snbforums.com/threads/rt-ac86u-i-built-cake.49190/page-3#post-589049
https://www.snbforums.com/threads/rt-ac86u-i-built-cake.49190/page-5#post-593992 (<= good points on pre-requisites + tips)

Rough guide - untested as my AC86U is at my parents and I'll be doing this late at night this weekend:

### Installation

Follow pre-reqs mentioned in https://www.snbforums.com/threads/rt-ac86u-i-built-cake.49190/page-5#post-593992 (e.g. disable QoS, Entware + JFFS required) then SSH into your router:

Code:
cd /tmp/home/root

# If RT-AC86U
Code:
wget https://5m.ca/cake/sched-cake-oot_2020-05-28-a5dccfd8-1_aarch64-3.10.ipk https://5m.ca/cake/tc-adv_4.16.0-git-20191110_aarch64-3.10.ipk
opkg install sched-cake-oot_2020-05-28-a5dccfd8-1_aarch64-3.10.ipk
opkg install tc-adv_4.16.0-git-20191110_aarch64-3.10.ipk

# If RT-AX88U
Code:
wget https://5m.ca/cake/sched-cake-oot_2020-05-28-a5dccfd8-ax_aarch64-3.10.ipk https://5m.ca/cake/tc-adv_4.16.0-git-20191110_aarch64-3.10.ipk
opkg install sched-cake-oot_2020-05-28-a5dccfd8-ax_aarch64-3.10.ipk
opkg install tc-adv_4.16.0-git-20191110_aarch64-3.10.ipk

# Download script
Code:
wget https://5m.ca/cake/cake-qos-start.sh -O /jffs/scripts/cake-qos-start.sh
chmod a+rx /jffs/scripts/cake-qos-start.sh

# To auto-run script on services start
Code:
nano /jffs/scripts/services-start

# Add the following line:

Change the bolded portions to match your needs, example: /jffs/scripts/cake-qos-start.sh start 30Mbit 5Mbit "docsis ack-filter"

IMPORTANT
: check that the first line of this file is - #!/bin/sh - add this if missing. If missing, also run chmod a+rx /jffs/script/services-start after saving.

CTRL + X, Y, Enter to save

# To auto-stop script on services stop

Code:
nano /jffs/script/services-stop

# Add the following line:
Code:
/jffs/scripts/cake-qos-start.sh stop

IMPORTANT: check that the first line of this file is - #!/bin/sh - add this if missing. If missing, also run chmod a+rx /jffs/script/services-stop after saving.

CTRL + X, Y, Enter to save

Now you can either reboot your router or manually start / stop the scripts.

### Manually Start / Stop

To manually start:
Change the bolded portions to match your needs, example: /jffs/scripts/cake-qos-start.sh start 30Mbit 5Mbit "docsis ack-filter"

To manually stop:
Code:
sh /jffs/scripts/cake-qos-start.sh stop

### Validate / Test
Code:
tc qdisc
tc -s qdisc show dev eth0 # for upload
tc -s qdisc show dev ifb9eth0 # for download

Also check your system log for: Cake Queue Management Starting (e.g. Cake Queue Management Starting - config: 30Mbit | 5Mbit | docsis ack-filter)

### Uninstallation

Manually run:
Code:
sh /jffs/scripts/cake-qos-start.sh stop

Remove or comment out the cake lines from /jffs/script/services-start and /jffs/script/services-stop (I'd recommend commenting out vs removing)
To comment out, simply add a # to the beginning of the line.

(optional) Delete cake script by running: rm /jffs/script/cake-qos-start.sh

(optional) You can remove the binaries via: opkg remove binaryname (sorry I'm not too sure what the package names are but you can try opkg list-installed | grep cake and opkg list-installed | grep adv)

I'll review what you did, and if/when necessary update Page 5. I moved the ipks to my git, so hopefully I can update those links as well.....

cheers to everyone contributing!
 
It clearly says to DISABLE any other QOS and even Bandwidth Monitor. All please read carefully. We posted all the pre-reqs on Page 5.

Logically speaking why would one want 2 services competing to do the same thing??
I've turned QOS off. I wasn't sure if the FreshJR script still runs though.
 
I've turned QOS off. I wasn't sure if the FreshJR script still runs though.

Don't think it will once disabled, as it depends on the switch being "On".

Hope you get it resolved now. Cheers, just having lunch so apologies if it came across cranky pants...more hungry man :)
 
I've GPON connection from my provider, isp modem in bridge mode and my asus dials pppoe, what overhead is suitable for me, is it pppoe-ptm or i need more clarity about this, looks very help full thread ;)
 
I've GPON connection from my provider, isp modem in bridge mode and my asus dials pppoe, what overhead is suitable for me, is it pppoe-ptm or i need more clarity about this, looks very help full thread ;)

Whatever your previous ATM was for regular Adaptive Qos I'd match to the list below. Worse case you do not include any...remember, imo CAKE just works.

ADSL Overhead Keywords

Most ADSL modems have a way to check which framing scheme is in use. Often this is also specified in the settings document provided by the ISP. The keywords in this section are intended to correspond with these sources of information. All of them implicitly set the atm flag.

pppoa-vcmux
Equivalent to overhead 10 atm

pppoa-llc
Equivalent to overhead 14 atm

pppoe-vcmux
Equivalent to overhead 32 atm

pppoe-llcsnap
Equivalent to overhead 40 atm

bridged-vcmux
Equivalent to overhead 24 atm

bridged-llcsnap
Equivalent to overhead 32 atm

ipoa-vcmux
Equivalent to overhead 8 atm

ipoa-llcsnap
Equivalent to overhead 16 atm

See also the Ethernet Correction Factors section below.

VDSL2 Overhead Keywords
ATM was dropped from VDSL2 in favour of PTM, which is a much more straightforward framing scheme. Some ISPs retained PPPoE for compatibility with their existing back-end systems.

pppoe-ptm
Equivalent to overhead 30 ptm

PPPoE: 2B PPP + 6B PPPoE +
ETHERNET: 6B dest MAC + 6B src MAC + 2B ethertype + 4B Frame Check Sequence +
PTM: 1B Start of Frame (S) + 1B End of Frame (Ck) + 2B TC-CRC (PTM-FCS)

bridged-ptm
Equivalent to overhead 22 ptm
ETHERNET: 6B dest MAC + 6B src MAC + 2B ethertype + 4B Frame Check Sequence +
PTM: 1B Start of Frame (S) + 1B End of Frame (Ck) + 2B TC-CRC (PTM-FCS)

See also the Ethernet Correction Factors section below.

DOCSIS Cable Overhead Keyword
DOCSIS is the universal standard for providing Internet service over cable-TV infrastructure.

In this case, the actual on-wire overhead is less important than the packet size the head-end equipment uses for shaping and metering. This is specified to be an Ethernet frame including the CRC (aka FCS).

docsis
Equivalent to overhead 18 mpu 64 noatm

Ethernet Overhead Keywords
ethernet
Accounts for Ethernet's preamble, inter-frame gap, and Frame Check Sequence. Use this keyword when the bottleneck being shaped for is an actual Ethernet cable.
Equivalent to overhead 38 mpu 84 noatm

ether-vlan
Adds 4 bytes to the overhead compensation, accounting for an IEEE 802.1Q VLAN header appended to the Ethernet frame header. NB: Some ISPs use one or even two of these within PPPoE; this keyword may be repeated as necessary to express this.
 
Whatever your previous ATM was for regular Adaptive Qos I'd match to the list below. Worse case you do not include any...remember, imo CAKE just works.

ADSL Overhead Keywords

Most ADSL modems have a way to check which framing scheme is in use. Often this is also specified in the settings document provided by the ISP. The keywords in this section are intended to correspond with these sources of information. All of them implicitly set the atm flag.

pppoa-vcmux
Equivalent to overhead 10 atm

pppoa-llc
Equivalent to overhead 14 atm

pppoe-vcmux
Equivalent to overhead 32 atm

pppoe-llcsnap
Equivalent to overhead 40 atm

bridged-vcmux
Equivalent to overhead 24 atm

bridged-llcsnap
Equivalent to overhead 32 atm

ipoa-vcmux
Equivalent to overhead 8 atm

ipoa-llcsnap
Equivalent to overhead 16 atm

See also the Ethernet Correction Factors section below.

VDSL2 Overhead Keywords
ATM was dropped from VDSL2 in favour of PTM, which is a much more straightforward framing scheme. Some ISPs retained PPPoE for compatibility with their existing back-end systems.

pppoe-ptm
Equivalent to overhead 30 ptm

PPPoE: 2B PPP + 6B PPPoE +
ETHERNET: 6B dest MAC + 6B src MAC + 2B ethertype + 4B Frame Check Sequence +
PTM: 1B Start of Frame (S) + 1B End of Frame (Ck) + 2B TC-CRC (PTM-FCS)

bridged-ptm
Equivalent to overhead 22 ptm
ETHERNET: 6B dest MAC + 6B src MAC + 2B ethertype + 4B Frame Check Sequence +
PTM: 1B Start of Frame (S) + 1B End of Frame (Ck) + 2B TC-CRC (PTM-FCS)

See also the Ethernet Correction Factors section below.

DOCSIS Cable Overhead Keyword
DOCSIS is the universal standard for providing Internet service over cable-TV infrastructure.

In this case, the actual on-wire overhead is less important than the packet size the head-end equipment uses for shaping and metering. This is specified to be an Ethernet frame including the CRC (aka FCS).

docsis
Equivalent to overhead 18 mpu 64 noatm

Ethernet Overhead Keywords
ethernet
Accounts for Ethernet's preamble, inter-frame gap, and Frame Check Sequence. Use this keyword when the bottleneck being shaped for is an actual Ethernet cable.
Equivalent to overhead 38 mpu 84 noatm

ether-vlan
Adds 4 bytes to the overhead compensation, accounting for an IEEE 802.1Q VLAN header appended to the Ethernet frame header. NB: Some ISPs use one or even two of these within PPPoE; this keyword may be repeated as necessary to express this.
Is there any way devised yet to check overhead using ssh or command line or any script?
 
Is there any way devised yet to check overhead using ssh or command line or any script?

Meaning, check to see if your intended setting is being applied?
 
No, what exact overhead i need:(
I haven't seen any personally. What I do know is that with the defaults things were great, but when I added the docsis parameter it got even better consistently.

So, it's about "knowing" your connection type and completing isolated tests to see what's best for your environment.
 
My sincere thanks to everyone contributing to this, I never really liked running QoS on my AC86U because it meant having to enable Trend-Micro.

Although I'm not a native to Bash scripting, I've made some modifications to the script to allow for parameter passing to minimize the need to edit the main cake script directly (and also uploaded the binaries to my server for easy installation). This means you only need to edit /jffs/scripts/services-start to change your settings (e.g. speeds, optional extra parameters like "docsis ack-filter")

To anyone looking to put together the "official" script feel free to use any part of my code, no credits needed :)

https://5m.ca/cake/ (contains my script, the binaries, and an md5sums.txt file so you can compare the hashes against the Google Drive ones linked in the other installation guides). Other installation guides in this thread:

https://www.snbforums.com/threads/rt-ac86u-i-built-cake.49190/page-3#post-589049
https://www.snbforums.com/threads/rt-ac86u-i-built-cake.49190/page-5#post-593992 (<= good points on pre-requisites + tips)

Rough guide - untested as my AC86U is at my parents and I'll be doing this late at night this weekend:

### Installation

Follow pre-reqs mentioned in https://www.snbforums.com/threads/rt-ac86u-i-built-cake.49190/page-5#post-593992 (e.g. disable QoS, Entware + JFFS required) then SSH into your router:

Code:
cd /tmp/home/root

# If RT-AC86U
Code:
wget https://5m.ca/cake/sched-cake-oot_2020-05-28-a5dccfd8-1_aarch64-3.10.ipk https://5m.ca/cake/tc-adv_4.16.0-git-20191110_aarch64-3.10.ipk
opkg install sched-cake-oot_2020-05-28-a5dccfd8-1_aarch64-3.10.ipk
opkg install tc-adv_4.16.0-git-20191110_aarch64-3.10.ipk

# If RT-AX88U
Code:
wget https://5m.ca/cake/sched-cake-oot_2020-05-28-a5dccfd8-ax_aarch64-3.10.ipk https://5m.ca/cake/tc-adv_4.16.0-git-20191110_aarch64-3.10.ipk
opkg install sched-cake-oot_2020-05-28-a5dccfd8-ax_aarch64-3.10.ipk
opkg install tc-adv_4.16.0-git-20191110_aarch64-3.10.ipk

# Download script
Code:
wget https://5m.ca/cake/cake-qos-start.sh -O /jffs/scripts/cake-qos-start.sh
chmod a+rx /jffs/scripts/cake-qos-start.sh

# To auto-run script on services start
Code:
nano /jffs/scripts/services-start

# Add the following line:

Change the bolded portions to match your needs, example: /jffs/scripts/cake-qos-start.sh start 30Mbit 5Mbit "docsis ack-filter"

IMPORTANT
: check that the first line of this file is - #!/bin/sh - add this if missing. If missing, also run chmod a+rx /jffs/script/services-start after saving.

CTRL + X, Y, Enter to save

# To auto-stop script on services stop

Code:
nano /jffs/script/services-stop

# Add the following line:
Code:
/jffs/scripts/cake-qos-start.sh stop

IMPORTANT: check that the first line of this file is - #!/bin/sh - add this if missing. If missing, also run chmod a+rx /jffs/script/services-stop after saving.

CTRL + X, Y, Enter to save

Now you can either reboot your router or manually start / stop the scripts.

### Manually Start / Stop

To manually start:
Change the bolded portions to match your needs, example: /jffs/scripts/cake-qos-start.sh start 30Mbit 5Mbit "docsis ack-filter"

To manually stop:
Code:
sh /jffs/scripts/cake-qos-start.sh stop

### Validate / Test
Code:
tc qdisc
tc -s qdisc show dev eth0 # for upload
tc -s qdisc show dev ifb9eth0 # for download

Also check your system log for: Cake Queue Management Starting (e.g. Cake Queue Management Starting - config: 30Mbit | 5Mbit | docsis ack-filter)

### Uninstallation

Manually run:
Code:
sh /jffs/scripts/cake-qos-start.sh stop

Remove or comment out the cake lines from /jffs/script/services-start and /jffs/script/services-stop (I'd recommend commenting out vs removing)
To comment out, simply add a # to the beginning of the line.

(optional) Delete cake script by running: rm /jffs/script/cake-qos-start.sh

(optional) You can remove the binaries via: opkg remove binaryname (sorry I'm not too sure what the package names are but you can try opkg list-installed | grep cake and opkg list-installed | grep adv)

Hi,

I had a look and I'll leave it up to the community, but I prefer not seeing the parameters in the start/stop command. Just my preference, as the base config (other than up/down), works well. If we get the GUI from the OP on Post#1, those settings/variables can be passed as part of the GUI....

Open for other opinions on this as well. For now I have already posted to my git, and was planning to update the post in Page 5 to reflect those. In short, I look at it as another option for the community, but I am really hoping to get that done as part of the GUI/variable. Under the hood, it might do exactly what you are doing though....

Cheers on so much stuff happening in this thread recently...still I think the next steps are:

1. More router(s) supported/tested so we can update the list.
2. How do we do these builds ourselves so we can support new releases?
3. GUI addon to set/pass variables
4. Full scripted install
5. Possible amtm integration

Thoughts on the above also appreciated.
 
Hi,

I had a look and I'll leave it up to the community, but I prefer not seeing the parameters in the start/stop command. Just my preference, as the base config (other than up/down), works well. If we get the GUI from the OP on Post#1, those settings/variables can be passed as part of the GUI....

Open for other opinions on this as well. For now I have already posted to my git, and was planning to update the post in Page 5 to reflect those. In short, I look at it as another option for the community, but I am really hoping to get that done as part of the GUI/variable. Under the hood, it might do exactly what you are doing though....

Cheers on so much stuff happening in this thread recently...still I think the next steps are:

1. More router(s) supported/tested so we can update the list.
2. How do we do these builds ourselves so we can support new releases?
3. GUI addon to set/pass variables
4. Full scripted install
5. Possible amtm integration

Thoughts on the above also appreciated.

Below code old, check this post for the latest and greatest: https://www.snbforums.com/threads/rt-ac86u-i-built-cake.49190/page-5#post-593992

Perfectly valid reasons.

I worked on the script some more (new file) to include requirements checking (JFFS enabled, Entware check), auto-add/remove to services-start and services-stop, as well as included some more options ({install|enable|start|stop|disable}): https://5m.ca/cake/cake-qos.sh

This means that cake QoS can be installed and set up with 3 commands (below assumes AC86U and 30Mbit / 5 Mbit + Cable (Docsis) connection):
Code:
/usr/sbin/curl --retry 3 "https://5m.ca/cake/cake-qos.sh" -o "/jffs/scripts/cake-qos" && chmod 0755 /jffs/scripts/cake-qos
/jffs/scripts/cake-qos install ac86u
/jffs/scripts/cake-qos enable 30Mbit 5Mbit "docsis ack-filter"

Feel free to take anything from the code you like, I feel this will help towards #4 (scripted install) :) I'll probably remove this and my other post once an official script is put together to minimize confusion.
 
Last edited:
Perfectly valid reasons.

I worked on the script some more (new file) to include requirements checking (JFFS enabled, Entware check), auto-add/remove to services-start and services-stop, as well as included some more options ({install|enable|start|stop|disable}): https://5m.ca/cake/cake-qos.sh

This means that cake QoS can be installed and set up with 3 commands (below assumes AC86U and 30Mbit / 5 Mbit + Cable (Docsis) connection):
Code:
/usr/sbin/curl --retry 3 "https://5m.ca/cake/cake-qos.sh" -o "/jffs/scripts/cake-qos" && chmod 0755 /jffs/scripts/cake-qos
/jffs/scripts/cake-qos install ac86u
/jffs/scripts/cake-qos enable 30Mbit 5Mbit "docsis ack-filter"

Feel free to take anything from the code you like, I feel this will help towards #4 (scripted install) :) I'll probably remove this and my other post once an official script is put together to minimize confusion.
I do like this a lot more foolproof and less chance of mistakes with setup of cake, really good job :)
 
Hi,

I had a look and I'll leave it up to the community, but I prefer not seeing the parameters in the start/stop command. Just my preference, as the base config (other than up/down), works well. If we get the GUI from the OP on Post#1, those settings/variables can be passed as part of the GUI....

Open for other opinions on this as well. For now I have already posted to my git, and was planning to update the post in Page 5 to reflect those. In short, I look at it as another option for the community, but I am really hoping to get that done as part of the GUI/variable. Under the hood, it might do exactly what you are doing though....

Cheers on so much stuff happening in this thread recently...still I think the next steps are:

1. More router(s) supported/tested so we can update the list.
2. How do we do these builds ourselves so we can support new releases?
3. GUI addon to set/pass variables
4. Full scripted install
5. Possible amtm integration

Thoughts on the above also appreciated.

shoutout for these amazing developers who may be able to advise on how to improve on this project as it's a benefit to everyone using these routers might be able to help with a gui addon etc.... @Martineau @Xentrk @Adamm @thelonelycoder @Jack Yaz
@dave14305

Devs for further info....
https://www.snbforums.com/threads/rt-ac86u-i-built-cake.49190/page-5#post-593992
Github
https://github.com/ttgapers/cakeqos-merlin
 
Last edited:
Perfectly valid reasons.

I worked on the script some more (new file) to include requirements checking (JFFS enabled, Entware check), auto-add/remove to services-start and services-stop, as well as included some more options ({install|enable|start|stop|disable}): https://5m.ca/cake/cake-qos.sh

This means that cake QoS can be installed and set up with 3 commands (below assumes AC86U and 30Mbit / 5 Mbit + Cable (Docsis) connection):
Code:
/usr/sbin/curl --retry 3 "https://5m.ca/cake/cake-qos.sh" -o "/jffs/scripts/cake-qos" && chmod 0755 /jffs/scripts/cake-qos
/jffs/scripts/cake-qos install ac86u
/jffs/scripts/cake-qos enable 30Mbit 5Mbit "docsis ack-filter"

Feel free to take anything from the code you like, I feel this will help towards #4 (scripted install) :) I'll probably remove this and my other post once an official script is put together to minimize confusion.

I'll setup up the repo tonight.....at least now we can start collaborating in one spot!
 
shoutout for these amazing developers who may be able to advise on how to improve on this project as it's a benefit to everyone using these routers might be able to help with a gui addon etc.... @Martineau @Xentrk @Adamm @thelonelycoder @Jack Yaz
The request to get an install script added to amtm would go to @thelonelycoder as it's his work, but it seems he needs enough interest from users to do so, so tag him and he will hopefully look at this.
just as a suggestion, it might be polite to invite @dave14305 to have a look at what is happening here - as I understand it, he has been making changes to the original FreshJR QoS in the creator's absence. Maybe some some collaboration can happen?
 
Status
Not open for further replies.

Similar threads

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top