Ultimate SQM settings: Layer_cake + DSCP marks (New Script!)

Do you have the TEXT-SCRIPT ?

no i'm returned to mikrotik routerOS for testing im' search script rsc now for my better experience gaming

1 Like

How would I go about adding my own services into the script?

Like Zoom for example?

Good point but got no answer :frowning:

put simply they make sqm less protocol agnostic... principally by identifying bulk/sparse/expeditable traffic...

depending on the network configuration ( and further mark tracking ), they may also offer greater inbound traffic handling which can be have a huge impact as they are typically difficult to manage... and are half of the total sqm experience...

with these scripts... media intensive interactive websites such as netflix with their 'hover over and pop up video' respond almost instantly... without them there is a noticeable few milliseconds of delay... as cdn is just another flow to 'equalise' amongst the others...

so in a nutshell... they expedite better flows and mark bulk better... which results in 30+% better experience on a typical modern home network...

Well, the OP had some exposition at the original post. IMHO the point is that SQM offers per-flow-fairness by default and allows an easy way to implement per-internal-IP fairness on top of that. IMHO that covers a lot of middle-of-the-road use-cases (especially on links with "enough" speed), BUT there are situations where the user actually requires targeted un-fairness, and that requires more involved configurations. This thread as well as the one that spawned it offer a specific refined script to allow loads of targeted unfairness, and can serve as great example of how to do that.
In a sense, the standard SQM scripts aims at "good enough" while these scripts go the extra mile to make things even better (but at the cost of requiring more involved configuration).

My router has Switch0 and based on your information not to use the veth method.
What should I change in your script.
Thanks

Solved, by deleting the vert script.
forgive me for not being thorough in reading all posts.
thanks

Hi I have a Router dual band with 4 connections.
i am using Mwan3 for load balancer, each connection has a different speed
wlan0 = 50/30
wlan1 = 70/60
wan (eth0.2) = 30/3
wan1 (eth0.3) = 10/3

That's why I set up SQM only on the LAN side and install this script without Vert
(ingress/egress FLIPS on LAN interfaces and without NAT)

My SQM Config is:

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'

Is it true that the setup I made above, please correct it? Thanks

Hi All,

So I have implemented this using the LAN method as I don't use Wi-Fi on my router.

I think it's working apart from the fact YouTube loads very slowly when the WAN is under heavy load, the videos load fine, just the page loads slowly.

Any ideas?

hello can you help me to configurate idir ctinfo for PS4 prioritize games

thanks

https://gist.github.com/KiNgMaR/6298661 is it possible to incorporate this into hisham script? Most game servers lead to cloudflare if you dig far enoug...

Why have u made two config on eth0.1 and wan?

SQM by default uses an IFB for ingress, but that runs before iptables, so does not allow easy filtering and setting of DSCPs, so here I instruct SQN to not instantiate an IFB (option download '0' has that effect), but to still shap eingress traffic the scond shaper sits on the egress side of eth0.1 which points into the LAN (and hence affects traffic from the internet into the LAN). The sideeffects of such a setup are that traffic terminating at the router will not be shaped, nor will WAN to WiFi be shaped, but WiFi to LAN will be shaped. In other words that is a solution mainly if the primary router does not require WiFi... I hope that helps.

I see, ty for the information..

I wasnt having shaping on download side, i changed the interface to br-lan then it started working fine

just use CS4 for gaming i think

1 Like

hallo,help me this script please
My WAN is eth2 and prioritize ps4 (only) lan1
my sqm config

config queue 'eth1'
	option download '400000'
	option debug_logging '0'
	option verbosity '5'
	option enabled '1'
	option upload '0'
	option qdisc 'cake'
	option script 'layer_cake.qos'
	option linklayer 'ethernet'
	option linklayer_advanced '1'
	option tcMTU '2047'
	option tcTSIZE '128'
	option tcMPU '64'
	option qdisc_advanced '1'
	option squash_dscp '0'
	option squash_ingress '0'
	option ingress_ecn 'ECN'
	option qdisc_really_really_advanced '1'
	option egress_ecn 'ECN'
	option ilimit '18'
	option elimit '18'
	option iqdisc_opts 'overhead 28 diffserv4 nat dual-srchost rtt 200ms'
	option eqdisc_opts 'overhead 35 diffserv4 nat dual-dsthost rtt 200ms'
	option interface 'veth0'
	option overhead '0'
	option linklayer_adaptation_mechanism 'cake'

config queue
	option debug_logging '0'
	option verbosity '5'
	option squash_dscp '0'
	option squash_ingress '0'
	option ingress_ecn 'ECN'
	option download '1600'
	option upload '800'
	option qdisc 'cake'
	option script 'layer_cake.qos'
	option qdisc_advanced '1'
	option qdisc_really_really_advanced '1'
	option enabled '1'
	option linklayer 'ethernet'
	option linklayer_advanced '1'
	option tcMTU '2047'
	option tcTSIZE '128'
	option tcMPU '64'
	option egress_ecn 'ECN'
	option ilimit '18'
	option elimit '18'
	option linklayer_adaptation_mechanism 'cake'
	option interface 'eth0'
	option overhead '40'

what this realy do

#High priority ipset, i use for pubgM
iptmark ! -p tcp -m set --match-set latsens src,dst -j DSCP --set-dscp-class CS6 -m comment --comment "latency sensitive ipset" ## set dscp tag for Latency Sensitive (latsens) ipset,udp

iptmark -p tcp -m set --match-set latsens src,dst -j DSCP --set-dscp-class CS5 -m comment --comment "latency sensitive ipset" ## set dscp tag for Latency Sensitive (latsens) ipset

i play on ps4 and no traffic the if i change to udp proto

Those two lines set everything from or to the latency sensitive ipset that isn't TCP to CS6 and TCP to CS5

shaping was working fine till an hour back.... now it shows this... idk whats wrong...
now the veth0 is not limiting my download...
and sqm is not working on veth0 now...

qdisc noqueue 0: dev veth0 root refcnt 2
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0

sqm.@queue[1]=queue
sqm.@queue[1].debug_logging='0'
sqm.@queue[1].verbosity='5'
sqm.@queue[1].ingress_ecn='ECN'
sqm.@queue[1].tcMTU='2047'
sqm.@queue[1].tcTSIZE='128'
sqm.@queue[1].enabled='1'
sqm.@queue[1].download='0'
sqm.@queue[1].qdisc='cake'
sqm.@queue[1].script='piece_of_cake.qos'
sqm.@queue[1].qdisc_advanced='1'
sqm.@queue[1].egress_ecn='ECN'
sqm.@queue[1].qdisc_really_really_advanced='1'
sqm.@queue[1].ilimit='18'
sqm.@queue[1].elimit='18'
sqm.@queue[1].linklayer='ethernet'
sqm.@queue[1].linklayer_advanced='1'
sqm.@queue[1].tcMPU='64'
sqm.@queue[1].linklayer_adaptation_mechanism='cake'
sqm.@queue[1].interface='veth0'
sqm.@queue[1].squash_dscp='0'
sqm.@queue[1].squash_ingress='0'
sqm.@queue[1].upload='22000'
sqm.@queue[1].overhead='50'
sqm.@queue[1].eqdisc_opts='diffserv4 dual-dsthost ingress nat rtt 124ms'

anybody else has this problem?

restarted router and redid the setting on veth on sqm... now its working

I think maybe this is related to the question posted this morning about my other script not working after some time...

[SOLVED] SQM Script Hotplug

1 Like