Per-VLAN/SSR and WAN-rooted bandwidth priority for GL.iNet Flint 2, GL.iNet Flint 3, GL.iNet Flint 4 / GL-BE14000, GL.iNet Slate 7, GL.iNet Slate 7 Pro, GL.iNet Beryl 7, and GL.iNet Flint 3e / GL-BE6500 using HTB + CAKE on OpenWrt.
Supports both QoS (WAN-rooted per-VLAN/SSID priority) and SQM (Smart Queue Management with CAKE) modes.
# One-liner install (with checksum verification)
curl -fsSL https://raw.githubusercontent.com/wickedyoda/Glinet-Bandwidth-script/master/install.sh | sh
# Run interactive setup
/usr/local/sbin/glinet-vlan-qos-setup.shThe setup wizard will:
- Ask you to choose QoS (WAN-rooted HTB) or SQM (WAN CAKE diffserv) mode
- Let you select your model or auto-detect
- Let you choose persistence mode
- Set WAN upload/download limits and assign VLAN priority
- Apply the configuration and verify it's working
WAN-Rooted Architecture:
- Auto-detects Flint 2 / Flint 3 / Flint 4 / Slate 7 / Slate 7 Pro / Beryl 7 / Flint 3e at runtime
- Auto-discovers all VLAN bridges (
br-*interfaces) — not just the default 3 (LAN/IoT/Guest). Any bridge likebr-vlan2,br-vlan3, etc. will be automatically detected, classified, and shaped. - HTB root qdisc on WAN interface (
eth0) with total bandwidth cap - Priority classes with CAKE leaf qdiscs:
- Class 10 (
prio 1): LAN + Tailscale — highest WAN priority - Class 20 (
prio 2): IoT — medium priority - Class 30 (
prio 3): Guest — lowest priority - Additional bridges (br-vlan2, br-vlan3, etc.) get assigned class numbers dynamically
- Class 10 (
- nft marks steer traffic to WAN classes via prerouting/forward/output chains
- fw filter on WAN egress routes marked packets to priority classes
- Optional bridge-level shaping for wired LAN clients
- Persistence via
/etc/gl-switch.d/+/etc/rc.local+/etc/sysupgrade.conf.d/
| File | Purpose |
|---|---|
glinet-vlan-qos.sh |
Main QoS engine |
glinet-vlan-qos-setup.sh |
Interactive setup wizard |
install.sh |
One-liner installer with checksum verification |
checksums.txt |
SHA256 checksums for verification |
README.md |
This documentation |
# Run interactive setup
glinet-vlan-qos-setup.sh
# Manual control
glinet-vlan-qos.sh start|stop|restart|status|detect|detect-vlans|install|uninstall
# View auto-discovered VLAN bridges
glinet-vlan-qos.sh detect-vlans
# Uninstall
glinet-vlan-qos-setup.sh uninstallWAN-rooted HTB + CAKE with per-VLAN priority
- Shaped at WAN egress for proper upload arbitration
- HTB classes prioritize LAN > IoT > Guest
- Optional bridge-level shaping for wired traffic
- Works on both
tc-tinyandtc-fullmodels
Smart Queue Management with CAKE diffserv
- Single WAN CAKE qdisc at measured bandwidth
- Best for bufferbloat reduction on single WAN connection
- Set
WAN_BW_UP/DOWNin config
| Priority | Bridge/Interface | Traffic Type |
|---|---|---|
| Top | br-lan + tailscale0 |
LAN + Tailscale mesh |
| Medium | br-iot |
IoT devices |
| Low | br-guest |
Guest network |
| Dynamic | Any additional br-* bridge |
Auto-detected VLAN bridges (e.g. br-vlan2, br-vlan3) |
Edit /etc/gl-qos-vlan.conf on the router:
# WAN bandwidth limits (kilobits per second)
WAN_BW_UP=100000 # 100 Mbps upload
WAN_BW_DOWN=500000 # 500 Mbps download
# Per-VLAN limits (kbps)
QOS_LAN_BW_UP=200000
QOS_LAN_BW_DOWN=500000
QOS_IOT_BW_UP=100000
QOS_IOT_BW_DOWN=200000
QOS_GUEST_BW_UP=100000
QOS_GUEST_BW_DOWN=200000
QOS_TAILSCALE_BW_UP=200000
QOS_TAILSCALE_BW_DOWN=500000
# Enable CAKE leaf qdisc
CAKE_ENABLE=1
# Persistence mode
PERSISTENT=1| Model | WAN UP | LAN | IoT | Guest | Tailscale |
|---|---|---|---|---|---|
| Flint 3 | 100/500 Mbps | 200/500 | 100/200 | 100/200 | 200/500 |
| Flint 2 | 100/300 Mbps | 100/300 | 50/100 | 20/50 | 50/100 |
| Flint 4 | 100/300 Mbps | 100/300 | 50/100 | 20/50 | 50/100 |
| Slate 7 | 100/500 Mbps | 200/500 | 100/200 | 100/200 | 200/500 |
| Slate 7 Pro | 100/300 Mbps | 100/300 | 50/100 | 20/50 | 50/100 |
| Beryl 7 | 100/300 Mbps | 100/300 | 50/100 | 20/50 | 50/100 |
| Flint 3e | 100/500 Mbps | 200/500 | 100/200 | 100/200 | 200/500 |
# Via setup wizard
glinet-vlan-qos-setup.sh uninstall
# Or directly
glinet-vlan-qos.sh uninstallThis removes:
- HTB qdiscs and CAKE leaf qdiscs on WAN and bridges
- All fw filters and nft marks
/etc/gl-switch.d/vlan-qos.shhook/etc/rc.localQoS stanza/etc/sysupgrade.conf.d/glinet-qos.conf- The scripts themselves from
/usr/local/sbin/
# Check QoS status
glinet-vlan-qos.sh status
# Verify detected model
glinet-vlan-qos.sh detect
# Verify WAN qdisc
tc class show dev eth0
# Verify nft marks
nft list table inet gl-qos- GL.iNet Flint 2, Flint 3, Flint 4, Slate 7, Slate 7 Pro, Beryl 7, or Flint 3e
- OpenWrt 21.02+
- Packages:
tc-fullortc-tiny,kmod-sched-cake,sqm-scripts - Root SSH access
Use at your own risk. While we have tested this script on the models and firmware versions listed above, you are solely responsible for any changes made to your router. We are not liable for damages, data loss, or bricked devices resulting from the use of this script.
Full disclaimer: Privacy Policy, Terms of Use, Disclaimer and Limitation of Liability
If you encounter issues, please open an issue ticket.
GPLv3 — see LICENSE for details.
