Configuration of the script "Ultimate SQM settings: Layer_cake + DSCP marks (New Script!)" for CSGO Prioritization

Hello everyone,

I have replied to the following post : Ultimate SQM settings: Layer_cake + DSCP marks (New Script!)
But it seems that it's not active anymore. So I try to create a new post if someone could help to go through this setup.

I have been searching this forum to find a way to play cs:go with no lag and I have created a post asking for help (SQM qos for cs:go)
Users of the forum was very helpfull, and told me to check this post to set DSCP on my router.

I use a wrt3200ACM and I have installed the David custom firmware : openwrt-mvebu-cortexa9-linksys_wrt3200acm-squashfs-factory.img
Firmware Version : OpenWrt SNAPSHOT r13342-e35e40ad82 / LuCI Master git-20.144.63033-62ed4e6

I have downloaded the package on github : https://github.com/hisham2630/Ultimate-SQM-settings-Layer_cake-DSCP-marks-New-Script 6

And I was following the old post to check the setup step before doing anything.

My first question is: is it mandatory to have the extroot ? Because if I'm right I then need to install the version 14.07 of OpenWrt ?

After that I will follow the different step and my second and last question will be concerning the /etc/config/sqm

What should I exactly add on it

This is mine :


config queue 'eth1'
        option ingress_ecn 'ECN'
        option debug_logging '0'
        option verbosity '5'
        option script 'piece_of_cake.qos' **> change to : option script 'layer_cake.qos'**
        option qdisc_advanced '1'
        option squash_dscp '1' **> change to 0**
        option squash_ingress '1' **> change to 0**
        option linklayer 'atm'
        option overhead '44'
        option interface 'eth1.2'
        option qdisc 'cake'
        option enabled '1'
        option download '7480'
        option upload '705'
        option egress_ecn 'NOECN'
        option qdisc_really_really_advanced '1'
        option iqdisc_opts 'nat dual-dsthost ingress' **> change to : option iqdisc_opts 'diffserv4 nat dual-srchost'**
        option eqdisc_opts 'nat dual-srchost ack-filter' **> change to : option eqdisc_opts 'diffserv4 nat dual-dsthost '**

Is that correct ?

Thanks

uhurujam

My topic is not very popular, btw I tried myself without extroot and keeping my firmware as it is

I have added some commands for noobs like me that can be useful

connect with putty on the router
opkg update
opkg install kmod-veth kmod-netem kmod-ipt-ipopt kmod-nf-nathelper-extra kmod-sched kmod-sched-cake ip-full ipset iptables-mod-conntrack-extra iptables-mod-extra iptables-mod-ipopt iptables-mod-nat-extra
opkg remove dnsmasq ; opkg install dnsmasq-full
opkg install tcpdump -->to dump packets on interface for debugging.
opkg install kmod-tcp-bbr -->to enable BBR tcp congestion control,it's really improve network response.

/etc/sysctl.conf

cd ..
ls
cd etc
vi sysctl.conf
press i
copy paste the following lines
net.core.default_qdisc=fq_codel
net.ipv4.tcp_congestion_control=bbr
Press Esc
:wq to save and quit

/root/DSCP.sh

cd ..
cd root
touch DSCP.sh
vi DSCP.sh
copy paste the lines of the donwloaded DSCP_ipv4.sh
Esc
:wq

ls -l to check chmod
chmod 755 /root/DSCP.sh

/etc/dnsmasq.conf

edit dnsmasq.conf
vi dnsmasq.conf
Press i
copy paste the line of the dnsmasq file that you downloaded at the end of the conf file
Esc
:wq

/etc/config/sqm

queue 'eth1'
option ingress_ecn 'ECN'
option debug_logging '0'
option verbosity '5'
option script 'piece_of_cake.qos' > change to : option script 'layer_cake.qos'
option qdisc_advanced '1'
option squash_dscp '1' > change to 0
option squash_ingress '1' > change to 0
option linklayer 'atm'
option overhead '44'
option interface 'eth1.2'
option qdisc 'cake'
option enabled '1'
option download '7480'
option upload '705'
option egress_ecn 'NOECN'
option qdisc_really_really_advanced '1'
option iqdisc_opts 'nat dual-dsthost ingress' > change to : option iqdisc_opts 'diffserv4 nat dual-dsthost ack-filter'
option eqdisc_opts 'nat dual-srchost ack-filter' > change to : option eqdisc_opts 'diffserv4 nat dual-srchost ingress'

I keep ack-filter and ingress in the option, but I will test with and without

edit /usr/lib/sqm/defaults.sh
entrer /diffserv you will find the line
change

[ -z "$INGRESS_CAKE_OPTS" ] && INGRESS_CAKE_OPTS="diffserv4"
[ -z "$EGRESS_CAKE_OPTS" ] && EGRESS_CAKE_OPTS="diffserv4"

replace diffserv3 with diffserv4

If you think I made mistake, or if you have idea to make this configuration better, feel free to answer my topic

Regards

Could you describe the problem you are having with csgo? "no lag" does not say very much and what are you trying to achieve, what is your internet speed, maybe leave your steam id, I play cs and may know the solution to your problem

Hi Jumper and thanks for your answer!

I have 9mb download and 900 kb upload.
If I play csgo and no one use the network, I'm fine.
But if someone look the TV, Netflix, prime etc...
I have every minute or 2 mins 10 to 15% loss on Csgo (net_graph) but my ping is okay, switching Between 20 to 40 ms. So I want to prioritize the game to have a good gaming experience.
For the steamid I will send it to you in PM when I'm back on the computer

Regards

hi mate i very interesting by your topic

i'm french user , so i have a question in dscp-ipv4 you are let like this or change the config for you isp

the mine is orange in dhcp

dscp give the resultat but not traffic

thanks for advance

Désolé juju1366 mais je suis pas du tout un expert, j'ai récupéré les informations sur un autre poste et je les ai mis a ma sauce. Cependant cela ne fonctionne pas trÚs bien.

J'ai moi mĂȘme Orange et j'ai donc branchĂ© mon PC avec lequel je joue directement sur la livebox (wifi dĂ©sactivĂ© sur la livebox) et tout les autres pĂ©riphĂ©riques sont branchĂ©s sur mon routeur WRT3200ACM
J'ai une bande passante de 9000/900
Donc dans SQM j'ai appliqué une bande passante de 7000/650 du coup je garde 2000/250 pour mon PC gamer.
J'obtiens un ping de 15ms et je peux streamer netflix/prime/molotov sans problĂšme !
C'est la seule solution que j'ai trouvé car j'ai joué avec la QOS, la limite de bande passante par périphériques, j'ai additioné ces 2 solutions et ca ne changeait rien, j'avais toujours un ping degueulasse...

Je pense que pour ta question tu ferais mieux d'ouvrir un nouveau poste car le mien n'est pas trĂšs populaire.

Merci

1 Like

nous ne comprende pas, j'aime etudiee la francais mais, parlez anglais sil vous plait... pour nous? ( pardon francais tres mal tete :wink: )

1 Like

Sorry for that, I've seen that juju1366 was french, that's why I answerd in French.

But I've said that I connected my Gamer computer directy to the modem router, and just keep sqm cos to do a limit bandwidth 7000/650
So I just keep approx a 2000/250 for my computers
And with this connection it's working great, I can play my games with a 15/40 ping and my girlfriend can watch streaming and surf with her phone.

It's the only solution I find to be able to play correctly

Regards

3 Likes

On my WRT3200ACM my modem is connected on the internet port.

SQM QOS is set on eth1.2 (wan,wan6)

After I read the following post again : https://openwrt.org/docs/guide-user/network/traffic-shaping/sqm-details#making_cake_sing_and_dance_on_a_tight_rope_without_a_safety_net_aka_advanced_features

"This discussion assumes SQM is instantiated on an interface that directly faces the internet/WAN. If it is not (e.g., on a LAN port) the meaning of ingress/egress flips and now your Download has to put it in Upload speed (kbit/s) (egress) and your Upload has to put it in Download speed (kbit/s) (ingress), also don't have to add the nat option on LAN interfaces (this option should only be used in the WAN interface) or Per-Host Isolation stops working. In that case, just add in egress queueing disciplines dual-dsthost ingress and in ingress queueing disciplines dual-srchost (remember that ingress/egress flips on LAN interfaces)."

Those settings are correct right ?
option iqdisc_opts 'diffserv4 nat dual-dsthost ingress'
option eqdisc_opts 'diffserv4 nat dual-srchost ack-filter'

Thanks again :slight_smile:

1 Like

I am interested in your posts.
I'm currently trying to play around with sqm + dscp.
My network condition has 4 internet connections, so I setup my router with a load balancer (mwan3).
and to run SQM + DSCP settings on the LAN.

This is my SQM Config and I still haven't observed the effect:


config queue
	option enabled '1'
	option interface 'eth0.1'
	option download '0'
	option upload '0'
	option debug_logging '0'
	option verbosity '5'
	option qdisc 'cake'
	option script 'layer_cake.qos'
	option qdisc_advanced '1'
	option squash_dscp '1'
	option squash_ingress '0'
	option ingress_ecn 'NOECN'
	option egress_ecn 'ECN'
	option qdisc_really_really_advanced '1'
	option iqdisc_opts 'diffserv4 dual-srchost'
	option eqdisc_opts 'diffserv4 dual-dsthost ingress'
	option linklayer 'ethernet'
	option overhead '18'
	option linklayer_advanced '1'
	option tcMTU '2047'
	option tcTSIZE '128'
	option tcMPU '64'
	option linklayer_adaptation_mechanism 'cake'

I don't know whether the config is true or false, and currently it's based on test results http://www.dslreports.com/speedtest
shows good value.

1 Like

Hello, I wanted to know where I can download the DSCP.sh and dnsmasq.conf file
Thank you in advance

1 Like

I will try your config queue in my scenario but will keep my option download and upload.
I must check for the linklayer_advanced and the tcMTU/tcTSIZE/tcMPU and the linklayer_adaptation_mechanisme