Cake SQM priorize gaming and twitch streaming using DSCP

My computer is wired to my router, a TP-Link Archer C60 v2 with OpenWrt 19.07.5 r11257-5090152ae3 / LuCI openwrt-19.07 branch git-20.341.57626-51f55b5 installed.

Current settings

root@OpenWrt:~# cat /etc/config/sqm

config queue 'eth1'
        option interface 'eth1'
        option debug_logging '0'
        option verbosity '5'
        option qdisc 'cake'
        option script 'piece_of_cake.qos'
        option linklayer 'ethernet'
        option overhead '44'
        option download '95000'
        option upload '95000'
        option enabled '1'
        option qdisc_advanced '1'
        option squash_dscp '1'
        option squash_ingress '1'
        option ingress_ecn 'ECN'
        option egress_ecn 'ECN'
        option qdisc_really_really_advanced '1'
        option linklayer_advanced '1'
        option tcMTU '1544'
        option linklayer_adaptation_mechanism 'default'
        option tcMPU '64'
        option iqdisc_opts 'diffserv4 ingress nat dual-dsthost'
        option eqdisc_opts 'diffserv4 nat dual-srchost'
        option tcTSIZE '128'

I would like to priorize my game and second the Twitch stream.
I tried to read a couple of posts but am a bit confused.

From what I have read what I'm looking for is DSCP marking for gaming. But I don't really understand how to configure it and where.
Using diffserv4 I understood there are 4 classes, and using DSCP I would be able to mark the packets of my game and the ones from my stream and put them in the correct class.

Just for context. I have a main router that belongs to the ISP and can not configure. That's why I'm using a second router mentioned before.
I asked them to enable DMZ on the main router using the IP of my secondary router.

You can create firewall traffic rules to dscp tag your packets. It will only work on the upstream direction but that's the direction that's most important for you.

Thanks for your reply. Could you point me to a guide for dummies? Most of this goes over my head.
I probably have no business messing with this complicated stuff, but I enjoy tinkering.
This a dumb question, but how do I find out which DSCP markings go in each bin of diffserv4?

EDIT
Found what I was looking for here

/*  Further pruned list of traffic classes for four-class system:
 *
 *	    Latency Sensitive  (CS7, CS6, EF, VA, CS5, CS4)
 *	    Streaming Media    (AF4x, AF3x, CS3, AF2x, TOS4, CS2, TOS1)
 *	    Best Effort        (CS0, AF1x, TOS2, and those not specified)
 *	    Background Traffic (CS1)
 *
 *		Total 4 traffic classes.
 */

try this but i not understand too

:slight_smile:

1 Like

That guide is a bit confusing. Specially without the images.

2 Likes

@Dopam-IT_1987
@redp

I have fixed the images and updated the guide slightly

1 Like

yes thanks for your help

:wink: