Will this be an acceptable generic QoS solution, including VoIP? I am only interested in prioritizing in/out traffic without specifying bandwidth since this is hard to do, specially on busy city wireless links with a lot of wifis around or ADSL lines without any ISP speed warranty.
:for x from=0 to=63 do={/ip firewall mangle add action=mark-packet chain=postrouting disabled=no dscp=$x new-packet-mark=("dscp-" . $x) passthrough=no}
:for x from=0 to=7 do={/queue tree add disabled=no name=("dscp-" . $x) packet-mark=("dscp-" . $x) parent=global-out priority=8}
:for x from=8 to=15 do={/queue tree add disabled=no name=("dscp-" . $x) packet-mark=("dscp-" . $x) parent=global-out priority=7}
:for x from=16 to=23 do={/queue tree add disabled=no name=("dscp-" . $x) packet-mark=("dscp-" . $x) parent=global-out priority=6}
:for x from=24 to=31 do={/queue tree add disabled=no name=("dscp-" . $x) packet-mark=("dscp-" . $x) parent=global-out priority=5}
:for x from=32 to=39 do={/queue tree add disabled=no name=("dscp-" . $x) packet-mark=("dscp-" . $x) parent=global-out priority=4}
:for x from=40 to=47 do={/queue tree add disabled=no name=("dscp-" . $x) packet-mark=("dscp-" . $x) parent=global-out priority=3}
:for x from=48 to=55 do={/queue tree add disabled=no name=("dscp-" . $x) packet-mark=("dscp-" . $x) parent=global-out priority=2}
:for x from=56 to=63 do={/queue tree add disabled=no name=("dscp-" . $x) packet-mark=("dscp-" . $x) parent=global-out priority=1}
Is there a way to also add to the above dynamic equal bandwidth distribution between users without specifying link speeds?
You’ll probably save some resources by using mangle rules to make only 8 unique packet-marks, and have 8 queues (one for each mark) rather than 64 queues.
I was afraid of that also but I have been monitoring the CPU/memory load in a 450G board and surprisingly it doesn’t seem to have added as much as I would expect it to. I would probably say that for the past couple of days I have been playing around, it added around 2-3% CPU time with very stable VoIP even at full download speeds (12/1MBit ADSL) but I haven’t extensively tested the above with busy mutliuser network links yet. The reason for that, I suppose, is that not much traffic uses DSCP so actually very few queues (5-10) of all 64s are practically used.
So far, there is virtually no CPU difference at all between the two setups for a home ADSL network but I suppose in a large network you are probably right and it would most likely make some difference depending on the DSCP usage.