Oy, DSCP is such a mess... The concept is fine but the standardization is just bonkers.
Practically speaking, what linux does by default to DSCP->WMM is https://wireless.wiki.kernel.org/en/developers/documentation/mac80211/queues?s[]=dscp it seems to take CS1 and CS2 to bulk. CS0 and CS3 are best effort and then CS4,5 are video and CS6,7 are voice. This follows a similar path, but offers two downgraded tiers that merge in the WMM bulk. You can use the CS2 tier for say filesystem traffic or downloads running for a few mins, and the CS1 tier for torrents or downloads running beyond a few mins or backups...
The IETF recommended 000001 tag maps to best effort in the WMM and that seems unfortunate.
fq_codel quantum I think is used like deficit in DRR, so it will move from queue to queue, but ultimately it's the higher level qdisc that determines the number of packets. HFSC will dequeue 1 at a time I believe unlike HTB which will dump multiple packets based on its quantum.
Well, the idea is that LE should be come an end2end DSCP and not just a PHB, so this was selected as it has low probability of being bleached to DCSP 0 during transit. Makes sense IMHO. The ball was dropped early on, when the decision was to keep the default besteffort PHB at 0, instead of moving that up to 1, but there are also good reasons why that was never a realistic option....
+1.
But regarding linux, 4 priority tiers are actually enough for quite a lot of situations, so WMM has most normal cases covered. WMM's fault is not introducing rate limits for AC_VO and AC_VI, but I digress...
Agreed, as long as the mappings work. Cake got this scrambled relative to linux standard behavior. Diffserv4 treats as
diffserv4
Provides a general-purpose Diffserv implementation with four
tins:
Bulk (CS1), 6.25% threshold, generally low priority.
Best Effort (general), 100% threshold.
Video (AF4x, AF3x, CS3, AF2x, CS2, TOS4, TOS1), 50%
threshold.
Voice (CS7, CS6, EF, VA, CS5, CS4), 25% threshold.
So the cake handling of CS3 and CS2 and related classes is different from the WMM handling .. CS2 is bulk WMM and CS3 is BE but both are "video" to cake
Yes, I believe this partially because cake's definitions are not tailored for perfect fit with the arguably wrong default AC mappings. https://tools.ietf.org/html/rfc8325 for example recommends to put CS2 into AC_BE...
Realistically though, that ship has sailed and WMM default definitions will constrain any non compatible marking scheme severely.
Ok, I think this thread is pretty long as is... I'm going to post a link to the github version of the script which will always be the most up to date one... @knomax can you accept this post as the answer to the thread and we can do a couple rounds of debugging and then voila it's all here for posterity?
To download the script, go to the above page, click the "raw" button, and then save the page as your script... voila
If you want to put the file directly to your router... log into the router and do:
cd /tmp
wget https://github.com/dlakelan/routerperf/raw/master/SimpleHFSCgamerscript.sh
Thanks! I really appreciate all the work that @knomax did in private messages to test versions of this script on a very constrained and non-ideal line, including many hours of router reboots and packet captures. His games look smooth as butter now even though he has only 830kbps upload! It's quite amazing how much better this is than when we started! Thanks for the late nights testing... I am in California and he is in somewhere far away (Greece?) so this international effort should be celebrated!
Great work! This week is too busy for any testing as I have late nights of scheduled maintenance operations. I look forward to testing it this weekend possibly.
i got lost on gamingip setup. i dont see that option anymore and on the other thread looks like we are going based on the old script.
so how do we setup our gaming ip?
GAMINGIPSET4="192.168.1.197"
GAMINGIPSET6="realtimeset6"
## set up your ipsets here:
ipset del 192.168.1.197 > /dev/null 2>&1
ipset del realtimeset6 > /dev/null 2>&1
ipset create 192.168.1.197 hash:ip || echo "ERROR: could not create r192.168.1.197 do you have ipsets working?"
ipset create realtimeset6 hash:ip family inet6 || echo "ERROR: could not create realtimeset6 do you have ipsets working?"
leave the script the way it was... and change this section, by adding your ips in the list of the "for" loop
## some examples to add your gaming devices to the realtime sets,
## allows you to have more than one console etc. Just add your ips
## into the list of ips in the for loop
for ip4 in 192.168.1.111 192.168.1.222; do
ipset add realtimeset4 "$ip4"
done
for ip6 in fd01:0101::1 fd01:0101::2 ; do
ipset add realtimeset6 "$ip6"
done
Yes, that's right, but the fd32:... address is a local only address. If you have ipv6 from your ISP you should put the address it has that starts with 2... that will be the public one.
if you don't have IPv6 from your ISP don't worry about it. just leave it.