Qosify: new package for DSCP marking + cake

Hi gents,

Few questions, is there is possibility to see output of already classified traffic by qosify?
Could someone please clarify, to which interface belong this config part?

config device wandev
	option disabled 1
	option name wan
	option bandwidth  XXmbit

Can someone please help me to sort out the correct config for the interfaces and devices:
Im using wrt3200 with a pppoe authenticated by vlan 20, so my config is next:

So the output is: interface pppoe-wan with device wan.20

root@OpenWrt:~# uci show network
network.loopback=interface
network.loopback.device='lo'
network.loopback.proto='static'
network.loopback.ipaddr='127.0.0.1'
network.loopback.netmask='255.0.0.0'
network.globals=globals
network.globals.ula_prefix='XX'
network.@device[0]=device
network.@device[0].name='br-lan'
network.@device[0].type='bridge'
network.@device[0].ports='lan1' 'lan2' 'lan3' 'lan4'
network.lan=interface
network.lan.device='br-lan'
network.lan.proto='static'
network.lan.ipaddr='192.168.1.1'
network.lan.netmask='255.255.255.0'
network.lan.ip6assign='60'
network.@device[1]=device
network.@device[1].name='wan'
network.@device[1].macaddr='XXX'
network.wan=interface
network.wan.ifname='wan.20'
network.wan.proto='pppoe'
network.wan.device='wan.20'
network.wan.username='XXXX
network.wan.password='XXXXX'
network.wan.ipv6='auto'
network.wan.peerdns='0'
network.wan.dns='1.1.1.1' '1.0.0.1'
config defaults
	list defaults /etc/qosify/*.conf
	option dscp_prio CS5
	option dscp_icmp CS6
	option dscp_bulk CS0
	option dscp_default_udp	CS4
	option bulk_trigger_timeout 5
	option bulk_trigger_pps	100
	option prio_max_avg_pkt_len 500
        option interfaces pppoe-wan

config interface wan
	option name wan.20
	option disabled 0
	option bandwidth_up 1000mbit
	option bandwidth_down 1000mbit
	# defaults:
	option ingress 1
	option egress 1
	option mode diffserv4
	option nat 1
	option host_isolate 1
	option autorate_ingress 1
	option ingress_options ""
	option egress_options ""
	option options "overhead 40"

Will this be the correct config?

Thanks!

What about when both default udp and tcp DSCP values are defined in the config? That would effectively wash the original DSCP, I believe.

Hi!
Great package.
Thank you for this.

But I have a few questions.
By default CS3 is used for HTTP/S,Quick (when no DSCP value is set)
This can not be overwrriten by the auto bulk detection feature?

So to put http/s,quick upload/downloads into the background queue.
I have to remove the default CS3 mapping?
Would be nice to have the inital http/s,quick packets go into a higher prio class and move them into the bulk class when higher traffic load is detected?

Does the dns matching feature overwrite any other rules?
For example, setting a dns name mapping to AF31/AF41, will this overwrite the default CS3 mapping of HTTP/S,Quick?

Should DNS really be in the CS5 class?

Someone else has the problem that qosify doesn't start and boot?

I tried to find some guidelines for proper mapping of services...

Streaming Video (like youtube,netflix, etc) should go into the AF3x class?
Live streaming video (video class, twitch streaming, etc) should go into the AF4x class?
Some RFC recommend to put DNS,DHCP, etc into the Default CS0 class. Some other suggest AF2x.
UDP Games to CS4? What about Games that use TCP?
Mail (SMTP/S,IMAP,POP3) into Bulk? Or AF1x?

Thank you.

1 Like

seems good what is your router for gigabit ?

Hi, Im using wrt3200acm, only as a modem and i can achive 850 with qosify without irqbalance, packet steering and offloading
 but i havent tested yet the performance

1 Like

ok and usually with sqm how you obtain max ?

I dont use sqm normally, so i could not provide the real value..

2 Likes

udp games with diffserv4 seems bad with CS4 i think

Re : any chance to see the qosify appair like sqm interface ? Thanks

I wonder, with the IETF pushing for some DSCPs being used end-to-end, whether an additional rule could be implemented that allows re-mapping based on the received DSCP?

So kind of a - only remap if the original ingress DSCP was not CS0.

As an example we had reports of ISPs dumping large fractions of normal traffic marked as CS1, which does not play well with cake's bulk/background tier unless such marked traffic truly is intended for background priority, same also applies to WMM default mapping.

Speaking of WMM/WiFi, is there a chance we could expose hostapd's qos_map feture in LuCI there is some pretty problematic stuff regarding DSCPs coming down the IETF RFC pipeline, that tries to "exploit" default WMM DSCP to AC mappings and it would really be great if OpenWrt would be prepared to deal with that gracefully (I am not saying things will go pear-shaped, only that the designers of the DSCPs are overly optimistic in regards to safety on on-aware WiFi networks)....

What does tc -s qdisc show dev wan.20 return? And what tc -s qdisc show dev ifb4wan.20? (the second might not work....)

yes the service don't start up you will do start manually

With cake, and this seems to be cake exclusive, sparse flows get a boost anyway (and all new flows are sparse especially during the handshake phase where they "ping-pong").

Similar, DNS tends to be sparse and hence needs little additional care in cake/fq_codel (unless you have enough DNS traffic to fill the queues).

My take is, keep as much in CS0 as possible and only move stuff to higher/lower priority tiers if you:
a) either know a priori that they deserve that, think a backround bit-torrent client, or UDP traffic to/from your gaming machine, or
b) figured out by looking at your traffic that special care is required, like your ISP mis-marking incoming packets (like interactive https packets anding up in CS1).

BTW, with cake the traditional names of the DSCPs are pretty irrelevant the only important thing is which of the 3/4/8 priority tier in cake's diffserv mode that DSCP maps into (and in addition which WiFI access class it maps into).

The DSCPs by themselves really do nothing, this is all about the matching per-hop-behaviour (PHB) that the IETF recommends to apply to each of the named DSCPs. So in your home network you are free to do what ever you want.

RE with new settings update qosify the tc -s qdisc doesn't work not diffserv4 appair

i'm playing wired to the console so i' has put EF to voice is right ? or i'm let CS6

config defaults
	list defaults /etc/qosify/*.conf
	option dscp_prio CS5
	option dscp_icmp CS6
	option dscp_bulk bulk
	option dscp_default_udp	CS4
	option bulk_trigger_timeout 5
	option bulk_trigger_pps	100
	option prio_max_avg_pkt_len 500

config alias bulk
	option ingress LE
	option egress LE

config alias video
	option ingress AF41
	option egress AF41

config alias voice
	option ingress EF
	option egress EF

config interface wan
	option name wan
	option disabled 0
	option bandwidth_up 3400kbit
	option bandwidth_down 56mbit
	# defaults:
	option ingress 1
	option egress 1
	option mode diffserv4
	option nat 1
	option host_isolate 1
	option autorate_ingress 1
	option ingress_options ""
	option egress_options ""
	option options "overhead 44"

config device wandev
	option disabled 1
	option name wan
	option bandwidth 100mbit

# DNS
tcp:53		CS5
tcp:5353	CS5
udp:53		CS5
udp:5353	CS5

# NTP
udp:123		CS6

# SSH
tcp:22		+CS4

# HTTP/QUIC
tcp:80		+CS3
tcp:443		+CS3
udp:80		+CS3
udp:443		+CS3

## COD 

udp:3074	+EF


##battlefield

udp:3659	+EF

@nbd a bug to update maybe ?

ok i has found replace to

option dscp_bulk bulk

by

option dscp_bulk CS1

tell me if i make just

Thanks for a feedback moeller0,

The result is:

root@OpenWrt:~# tc -s qdisc show dev wan.20 
qdisc noqueue 0: root refcnt 2 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
root@OpenWrt:~# tc -s qdisc show dev ifb4wan.20
Cannot find device "ifb4wan.20"
root@OpenWrt:~# 


cannot find device is bad

try make tc qdisc ls for see

tc qdisc ls

is my out

root@OpenWrt:~# tc qdisc ls
qdisc noqueue 0: dev lo root refcnt 2
qdisc fq_codel 0: dev eth0 root refcnt 2 limit 10240p flows 1024 quantum 1518 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
qdisc noqueue 0: dev lan1 root refcnt 2
qdisc noqueue 0: dev lan2 root refcnt 2
qdisc noqueue 0: dev lan3 root refcnt 2
qdisc noqueue 0: dev lan4 root refcnt 2
qdisc cake 1: dev wan root refcnt 2 bandwidth 3Mbit diffserv4 dual-srchost nat nowash no-ack-filter split-gso rtt 100ms noatm overhead 44
qdisc ingress ffff: dev wan parent ffff:fff1 ----------------
qdisc noqueue 0: dev br-lan root refcnt 2
qdisc cake 1: dev ifb-wan root refcnt 2 bandwidth 56Mbit diffserv4 dual-dsthost nat nowash ingress no-ack-filter split-gso rtt 100ms noatm overhead 44
root@OpenWrt:~#

@di_Niko

2 Likes

Than in my case its not running for any reason


can you post the tc qdisc ls ?

Yes, less is more, I guess.

Does cake actually do some kind of "sub prioritizing" ?
For example the voice/latency sensitive tin (when using diffserv4) with maps the following dscp codepoints into it:
CS7, CS6, EF, VA, CS5, CS4

Do they all share the same priority in this tin or does CS7 have higher/highest priority over all other codepoints in this tin? (CS6 over EF/VA..., EF over VA/CS5... etc)

Thank you.

2 Likes

@shm0 @moeller0
we agree that voice latency is good for video games and not for example AF41 for video, this question you asked is relevant because I have always asked myself

Cake has either 1, 3, 4 or 8 different prioroty tiers. Anything falling into the same priority tier is treated equally, but is still subject to the general gentle boosting of sparse flows versus 'fat' flows. And if traffic in a priority tier exceeds a tier's capacity it is treated as lower priority instead of being dropped (but I have not looked at that detail in the sourcecode in a long time so can not explain the details of that feature).

2 Likes