CAKE QoS Script (OpenWrt)

Odd I see no AF31 rules in there.

1 Like

i thought modifying classes would change something, but it's the same game ports are marked with CS0 and not with CS4

I would respectfully recommend to bring @elan back into the discussion, I have zero first hand experience and hence it would be a waste of time if I would try to reverse engineer that script, given that its author is an active and helpful poster in this forum.

2 Likes

it would be of great help

1 Like

i am very newbie using qosify I prioritize the ports that my game has but there is always a queue that takes the prioritization I do not know if I allow myself to understand

Test my Qosify configuration

1 Like

an example would do me good if it's not too much trouble

1 Like

hi @edwpat sorry if you don't understand my language i'm a french user of OpenWrt

you can maybe test my settings based on script of elan :wink:

like this

config defaults
	list defaults /etc/qosify/*.conf
	option dscp_prio video
	option dscp_icmp +besteffort
	option dscp_default_tcp besteffort
	option dscp_default_udp besteffort
	option prio_max_avg_pkt_len 500

config class bulk
	option ingress CS1
	option egress CS1

config class besteffort
	option ingress CS0
	option egress CS0
	option dscp_prio video
	option prio_max_avg_pkt_len 500

config class high_throughput_data
	option ingress AF12
	option egress AF12
	option dscp_prio AF11
	option prio_max_avg_pkt_len 1200
	option dscp_bulk CS1
	option bulk_trigger_pps 700
	option bulk_trigger_timeout 60

config class network_services
	option ingress CS2
	option egress CS2

config class live_streaming
	option ingress CS3
	option egress CS3

config class video
	option ingress AF41
	option egress AF41
	
config class gaming
	option ingress CS4
	option egress CS4

config interface wan
	option name wan
	option disabled 0
	option bandwidth_up 16mbit
	option bandwidth_down 56mbit
	option overhead_type bridged-ptm
	# defaults:
	option ingress 1
	option egress 1
	option mode diffserv4
	option nat 1
	option host_isolate 1
	option autorate_ingress 0
	option ingress_options ""
	option egress_options "wash"
	option options "ether-vlan"






# DNS
tcp:53		network_services
tcp:5353	network_services
udp:53		network_services
udp:5353	network_services

# NTP
udp:123		network_services

# SSH
tcp:22		network_services

# DNS over TLS (DoT)
tcp:853		video
udp:853		video

# HTTP (TCP)
tcp:80		+high_throughput_data
tcp:443		+high_throughput_data

# QUIC (UDP)
udp:80		+besteffort
udp:443		+besteffort

# BitTorrent (TCP)
tcp:6881-6889	bulk
tcp:6969	bulk
tcp:51413	bulk

# BitTorrent (UDP)
udp:6881-6889	bulk
udp:6969	bulk
udp:51413	bulk

# Usenet
tcp:119	bulk
tcp:563	bulk

# Bulk
dns:*.backblaze.com		bulk
dns:*.backblazeb2.com		bulk
dns:*.ms-acdc.office.com	bulk
dns:*.windowsupdate.com		bulk
dns:*.update.microsoft.com	bulk
dns:*.onedrive.com		bulk
dns:*.1drv.ms			bulk
dns:*.1drv.com			bulk
dns:*.sharepoint.com		bulk

# Xbox (UDP)
udp:88		gaming
udp:500		gaming
udp:3544	gaming
udp:4500	gaming

# PlayStation (TCP)
tcp:1935	gaming
tcp:3074-3076	gaming
tcp:3478-3480	gaming

# PlayStation (UDP)
udp:3074-3079	gaming
udp:3478-3479	gaming
udp:3659	gaming
udp:30000-45000	gaming

# Zoom, Microsoft Teams and Skype - Them use the same ports.
udp:3478-3481		video
udp:8801-8810		video

# GoToMeeting
udp:1853		video
udp:8200		video

# Webex Meeting
tcp:5004		video
udp:9000		video

# Jitsi Meet
udp:10000		video

# Google Meet
udp:19302-19309		video

# FaceTime
udp:16384-16472		video

# TeamViewer
tcp:5938		video
udp:5938		video

# Live Streaming to YouTube Live, Twitch, Vimeo and LinkedIn Live.
tcp:1935-1936		live_streaming
tcp:2396		live_streaming
tcp:2935		live_streaming






you can see the all traffic gaming is CS4 for my example COD

and priorize twitch in CS3 for twitch

like my screen

Capture d’écran 2022-01-25 à 05.04.03
Capture d’écran 2022-01-25 à 05.02.43

1 Like
cake.sh: line 858: ip6tables: not found
cake.sh: line 858: ip6tables: not found
cake.sh: line 858: ip6tables: not found
cake.sh: line 858: ip6tables: not found
cake.sh: line 862: ip6tables: not found
cake.sh: line 862: ip6tables: not found
cake.sh: line 862: ip6tables: not found
cake.sh: line 862: ip6tables: not found
cake.sh: line 862: ip6tables: not found
cake.sh: line 862: ip6tables: not found
cake.sh: line 862: ip6tables: not found
cake.sh: line 862: ip6tables: not found
cake.sh: line 862: ip6tables: not found
cake.sh: line 862: ip6tables: not found
cake.sh: line 862: ip6tables: not found
cake.sh: line 862: ip6tables: not found
cake.sh: line 862: ip6tables: not found
cake.sh: line 862: ip6tables: not found
cake.sh: line 862: ip6tables: not found
cake.sh: line 862: ip6tables: not found
cake.sh: line 862: ip6tables: not found
cake.sh: line 862: ip6tables: not found
cake.sh: line 862: ip6tables: not found
cake.sh: line 862: ip6tables: not found
cake.sh: line 862: ip6tables: not found
cake.sh: line 862: ip6tables: not found
cake.sh: line 862: ip6tables: not found
cake.sh: line 862: ip6tables: not found
cake.sh: line 862: ip6tables: not found
cake.sh: line 862: ip6tables: not found
cake.sh: line 862: ip6tables: not found
cake.sh: line 862: ip6tables: not found
cake.sh: line 862: ip6tables: not found
cake.sh: line 862: ip6tables: not found
cake.sh: line 862: ip6tables: not found
cake.sh: line 862: ip6tables: not found
iptables v1.8.7 (legacy): invalid portrange specified
Try `iptables -h' or 'iptables --help' for more information.
cake.sh: line 862: ip6tables: not found
cake.sh: line 862: ip6tables: not found
cake.sh: line 862: ip6tables: not found
cake.sh: line 862: ip6tables: not found
cake.sh: line 868: ip6tables: not found
cake.sh: line 868: ip6tables: not found
cake.sh: line 868: ip6tables: not found
cake.sh: line 868: ip6tables: not found
cake.sh: line 868: ip6tables: not found
cake.sh: line 868: ip6tables: not found

Seems like you don't have ip6tables installed

1 Like



Screenshot_3

Good day
I am using as Wireless Access Point / Dumb Access Point
How can the script be customized? My WAN and LAN are the same

1 Like

i saw new commit on github, could you add list port from this sites too Game port list updated march 2022 thank you very much

2 Likes

The script has rules to prioritize non-bulk unmarked traffic like gaming and VoIP, that means you don't need to add game ports, but if you want you can also add game ports and static IP of game consoles to prioritize that traffic (although it is not necessary).

2 Likes

Okay. I will try your latest script.

2 Likes

yes this script works wonderfully, elan did what I always wanted, he spent the day yesterday finding the small bugs that I found in this script and I thank him for his patience :slight_smile:

good game to you all!

3 Likes

Hi, I'm interested in this script but getting lots of errors when running

Error: Could not process rule: No such file or directory
insert rule inet fw4 mangle_postrouting meta nfproto ipv6 jump dscp_marking_ip_addresses_ipv6 comment "DSCP marking rules for IP addresses (IPv6)"
                 ^^^
Error: Could not process rule: No such file or directory
insert rule inet fw4 mangle_postrouting meta nfproto ipv4 jump dscp_marking_ip_addresses_ipv4 comment "DSCP marking rules for IP addresses (IPv4)"

there are lots of lines like that for all rules.. just not gonna paste them.

Edit 1:

Installed latest rc and the script ran without problems, what I dont see now is the dscp marking using wireshark.

Edit 2:

Ok, I was monitoring the wan interface but it seems that all markings are done in veth1 where yeah, everything seems working.

I have a question @elan for the dscp marking to happen lets say in a gaming port of the listed, does it have to be when it is the same number in destination and souce of the packet or can it be in either of those to be marked?

1 Like

good evening first you don't need to add a port in the script because we have analyzed my game data and it results that maximum it reaches 1270 packets the script acts as qosfiy did before you can only see the markings if you put your device in destination using a Switch

beautiful evening

In order server cod ip ps5 dscp

1 Like

thanks for the reply but my doubt is other thing, I wasn't planning on adding port just want to know if the same port must be in dport and sport for the dscp mark to kick in.

1 Like

The script is based on nftables and only works on OpenWrt 22.03 or the latest snapshot.

Source and destination ports are usually the same value. If you are not sure, write the ports on both sides.

I think that in nftables, Source port is the download side (ingress) and Destination port is the upload side (egress).

2 Likes

That might or might not work... think about a bulk download that crosses a path that accidentally defaults to the old TCP default MSS of 536Bytes... Or think reverse ACK packets that typically are quite small (and no, putting all ACK packets into the highest priority class ist not universally the best strategy; putting ACKs into the same class as the forward traffic seems like the better alternative)

Sure ports (and even internal-IP:port combinations) are heuristics as well that might mis-fire, but the more specific the heuristic is, the less likely mis-classifications become.

1 Like