edwpat
101
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 
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


1 Like
edwpat
103
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
Bartvz
104
Seems like you don't have ip6tables installed
1 Like
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
elan
108
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 
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
elan
114
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
do you suggest to put 30000-45000 source
and destination 3074-3076 for udp
## Game ports (The script already has rules to prioritize "non-bulk" unmarked traffic like gaming and VoIP, which means that adding game ports is optional)
TCP_SRC_GAME_PORTS=""
TCP_DST_GAME_PORTS=""
UDP_SRC_GAME_PORTS=""
UDP_DST_GAME_PORTS=""
## "SRC" = Source port | "DST" = Destination port
# Define a list of TCP and UDP ports used by games.
# Use a comma to
you can see if i put ps5 to source the schema is reversed
like this
In that case you should enter both port ranges into both fields...
By the way this indicates that @ldir's tc action and iptables approach would be quite helpful here, the UDP ports essentially seem to be used as in TCP an the conn track table should nicely capture the forward and reverse UDP-flows, as if they were TCP flows.
The onus is on me to get a snapshot on my router that offers the modified iptables version so I can test how to include that into on new script for sqm. With that in place the DSCP marling action in the firewall GUI would be the most convenient place to configure marking rules specific for IP-address:port combinations, exactly what I believe should be used to minimize the mis-classification problem....
CAVEAT: this is all rather theoretical from my perspective, neither do I play on-line reaction-time-gated games nor do I have the need for any explicit prioritization in my network (cake with per internal IP isolation simply is good enough for my use-cases); so keep that in mind when evaluating my recommendations, these come from first principles and not (hard-won) first-hand experience. And often enough things that appear simple and elegant in theory, do not work as expected in practice.
1 Like
redp
118
Hello. I have installed the script.
Seems to be running my Nvidia Now streams a bit better.
But sometimes I get some weird connection issues when using my browser.
It refuses to load the website on the first visit. Only after reloading multiple times does the website eventually load.
hi do you have delete adress in static ip for your pc
example ...
## TorrentBox (Static IP)
IPV4_TORRENTBOX_STATIC_IP=""
# Define a list of IPv4 addresses to mark 'all traffic' as bulk.
# Write a single IPv4 address or ranges of IPv4 addresses A-B and use a comma to separate them as shown.
IPV6_TORRENTBOX_STATIC_IP=""
# Write the IPv6 address or simply write "IPv6::" to automatically add the IPv6 address of your router
# and just change the number "10" to the last number of the static IPv4.
# To add an IPv6 address, simply change the number after the double colon "::" for the last number of your static IPv4 address.
# The last
redp
120
I did not initially. But now have set it to my pc's IP after add it by following the instructions.
## To add static IP addresses in OpenWrt go to "Network -> DHCP and DNS -> Static Leases -> Click on 'Add'".
After modifying the script, how do I apply the new settings?
Just running the script again or do I have to reboot?