Here are my setup instructions:
Thanks to
@robcore for his work. Wish we can get more versions moving!
Running the following as well:
amtm, scmerlin, syslog-ng/scribe, skynet, diversion (large list/youtube blocker), unbound (core dns), suricata (ips/ids), cake (QoS).
Pre-reqs
- Not recommended for connection up/down of 250Mbps or higher
- Disable QoS (any) - probably best to go to Admin/Privacy and "Withdraw" to be sure (note disables others stuff too)
- Entware
- USB Storage
- jffs
Tips
Download based on your router
sched-cake-oot
RT-AC86U
https://drive.google.com/open?id=18sY2EmUxrw23ix-e0xHCWibLG6SB0YNu
RT-AX88U
https://drive.google.com/open?id=1YhawbEmvK1IMug9PeQbUH_gR8lN6o6Ee
All routers
tc-adv
https://drive.google.com/open?id=1cATB5RNBfwtxioP7JH89Sw-9PqX6voQ-
1. Upload to your router the files above.
2. Logon and browse to upload folder
3. Install:
- 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
4. Create a new file in /jffs/scripts/cake-qos-start.sh OR nano /jffs/scripts/cake-qos-start.sh
5. Add the following:
Code:
#!/bin/sh
case $1 in
start)
logger "Starting Cake queue management"
runner disable 2>/dev/null
fc disable 2>/dev/null
fc flush 2>/dev/null
insmod /opt/lib/modules/sch_cake.ko 2>/dev/null
#WAN-eth0
/opt/sbin/tc qdisc replace dev eth0 root cake bandwidth 12Mbit besteffort nat
ip link add name ifb9eth0 type ifb
/opt/sbin/tc qdisc del dev eth0 ingress 2>/dev/null
/opt/sbin/tc qdisc add dev eth0 handle ffff: ingress
/opt/sbin/tc qdisc del dev ifb9eth0 root 2>/dev/null
/opt/sbin/tc qdisc add dev ifb9eth0 root cake bandwidth 120Mbit besteffort nat wash ingress
ifconfig ifb9eth0 up
/opt/sbin/tc filter add dev eth0 parent ffff: protocol all prio 10 u32 match u32 0 0 flowid 1:1 action mirred egress redirect dev ifb9eth0
;;
stop)
logger "Stopping Cake queue management"
##off
/opt/sbin/tc qdisc del dev eth0 ingress 2>/dev/null
/opt/sbin/tc qdisc del dev ifb9eth0 root 2>/dev/null
/opt/sbin/tc qdisc del dev eth0 root 2>/dev/null
ip link del ifb9eth0
rmmod sch_cake 2>/dev/null
fc enable
runner enable
;;
*)
echo "Usage: $0 {start|stop}"
;;
esac
Note:
eth0 for upload, ifb9eth0 for download.
Kbit or Mbit both are ok. e.g 800Kbps upload and 10Mbps download.
Edit the lines in the above code block to suit along with any tweaks based on the Tips above based on connection type ADSL, Docsis etc.
- /opt/sbin/tc qdisc replace dev eth0 root cake bandwidth 800Kbit besteffort nat
- /opt/sbin/tc qdisc add dev ifb9eth0 root cake bandwidth 10Mbit besteffort nat ingress wash
6. nano /jffs/scripts/services-start
7. Add sh /jffs/scripts/cake-qos-start.sh start
8. nano /jffs/script/services-stop
9. Add /jffs/scripts/cake-qos-start.sh stop
10. chmod +x /jffs/scripts/cake-qos-start.sh
11. Start Cake QoS: sh /jffs/scripts/cake-qos-start.sh start
OR to stop sh /jffs/scripts/cake-qos-start.sh stop
12. Validate/test
- tc qdisc
- tc -s qdisc show dev eth0 (for upload)
- tc -s qdisc show dev ifb9eth0 (for download)