Qos and sqm run both together

Doeas any one know if i can run sqm cake and qos at ghe same time
As i want to be able to limit a certain ports egress and ingress while still using sqm cake or fq codel

short answer: no

any application can run on any port.

long answer: sqm tries to treat traffic by what it does, not what it claims to be doing.
while there are multiple ways to do what you want, none is trivial or sound.
your problem should probably be solved otherwise.

2 Likes

Not on the same interface, it should be possible to run qos-scripts on wan (I seem to recall it defaults to the wan interface) and sqm-scripts on lan. This is not a recommended configuration though.

You might be better off just using sqm-scripts and modifying your local copy of /etc/usr/sqm/layer_cake.qos to add the egress port to priority bin mapping, or to use nft-qos to add port based rules as a second layer to sqm-scripts.

1 Like

Thank you for the help
But now im totally lost becase i am a newbie at this stuff

Instead of a technical question, perhaps you could let us know what your underlying reason is for wanting this, and someone here could recommend a solution which does that thing, at least approximately?

3 Likes

I wanted to limit the bandwith to a certain port becuse if i limit the bandwith to the whole network will suffer
I used to do this on my tplink rouet it was called banwith control
Then i also wanted to run sqm to eliminate buffer bloat or lag spikes
Atm i do this with either fq colde or cake
There are brilliant for doin this as i play a lot of online gaming so i need a stable ping no jiiter
Im trying to know if i can run them together
Thank you for all the advice
I dont know how else to explain it so sorry if if i dont make sence
As im a newbie on openwrt

By "a certain port" you mean a certain wired port ie. a certain ethernet jack? You can put a wired port on a certain VLAN say vlan 3 as untagged, and then put SQM on the eth0.3 device and set it to a certain bandwidth, you don't need anything special there.

If you mean a certain udp or tcp port, you have a different problem.

Cake on the WAN interface should solve your bufferbloat problem. If you set up per-IP fairness it may solve your other problem of sharing bandwidth as well.

1 Like

Yeh sorry i mean udp ports i wanted to limit sorry
Thanks again for the help

There are a lot of possible ways to do sophisticated QoS, unfortunately, they really require some very specific skills at the moment. No-one has created a kind of pointy-clicky system or a simple description language for such advanced QoS applications.

1 Like

So if you can separate out the applications using the ports you want to throttle to a different computer than your gaming computer, so that it uses a different internal IP-address then the per-internal-IP-address fairness configuration for piece_of_cake or layer_cake should already help a lot. Why don't you try that first, while it will not truly solve your problem it might improve things enough so that you have enough time to research and learn more intricate QoS schemes?
If you want to go that route have a look at https://openwrt.org/docs/guide-user/network/traffic-shaping/sqm-details especially the "sing and dance" section.