I am trying to build a DSCP based QoS implementation (based largely on http://wiki.mikrotik.com/wiki/DSCP_based_QoS_with_HTB)
I have created the following components as outlined in the script below
/ip firewall mangle
add action=change-dscp chain=prerouting comment=HTTP disabled=no new-dscp=20 protocol=tcp src-port=8
/queue tree
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 max-limit=5837000 name=WAN packet-mark="" \
parent=LAN priority=1 queue=ethernet-default
#prio8
:for x from 0 to 7 do={/ip firewall mangle add action=mark-packet chain=postrouting \
comment=("dscp_" . $x ) disabled=no dscp=$x new-packet-mark=("dscp_routine") passthrough=no}
/queue tree add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 max-limit=0 \
name=("routine_WAN") packet-mark=("dscp_routine") parent=WAN priority=8 queue=ethernet-default
#prio7
:for x from 8 to 15 do={/ip firewall mangle add action=mark-packet chain=postrouting \
comment=("dscp_" . $x ) disabled=no dscp=$x new-packet-mark=("dscp_priority") passthrough=no}
/queue tree add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 max-limit=0 \
name=("priority_WAN") packet-mark=("dscp_priority") parent=WAN priority=7 queue=ethernet-default
#prio 6
:for x from 16 to 23 do={/ip firewall mangle add action=mark-packet chain=postrouting \
comment=("dscp_" . $x ) disabled=no dscp=$x new-packet-mark=("dscp_immediate") passthrough=no}
/queue tree add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 max-limit=0 \
name=("immediate_WAN") packet-mark=("dscp_immediate") parent=WAN priority=6 queue=ethernet-default
#prio 5
:for x from 24 to 31 do={/ip firewall mangle add action=mark-packet chain=postrouting \
comment=("dscp_" . $x ) disabled=no dscp=$x new-packet-mark=("dscp_flash") passthrough=no}
/queue tree add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 max-limit=0 \
name=("flash_WAN") packet-mark=("dscp_flash") parent=WAN priority=5 queue=ethernet-default
#prio 4
:for x from 32 to 39 do={/ip firewall mangle add action=mark-packet chain=postrouting \
comment=("dscp_" . $x ) disabled=no dscp=$x new-packet-mark=("dscp_flash_override") passthrough=no}
/queue tree add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 max-limit=0 \
name=("flash_override_WAN") packet-mark=("dscp_flash_override") parent=WAN priority=4 queue=ethernet-default
#prio 3
:for x from 40 to 47 do={/ip firewall mangle add action=mark-packet chain=postrouting \
comment=("dscp_" . $x ) disabled=no dscp=$x new-packet-mark=("dscp_critical") passthrough=no}
/queue tree add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 max-limit=0 \
name=("critical_WAN") packet-mark=("dscp_critical") parent=WAN priority=3 queue=ethernet-default
#prio 2
:for x from 48 to 55 do={/ip firewall mangle add action=mark-packet chain=postrouting \
comment=("dscp_" . $x ) disabled=no dscp=$x new-packet-mark=("dscp_intercon") passthrough=no}
/queue tree add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 max-limit=0 \
name=("intercon_WAN") packet-mark=("dscp_intercon") parent=WAN priority=2 queue=ethernet-default
#prio 1
:for x from 56 to 63 do={/ip firewall mangle add action=mark-packet chain=postrouting \
comment=("dscp_" . $x ) disabled=no dscp=$x new-packet-mark=("dscp_netcon") passthrough=no}
/queue tree add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 max-limit=0 \
name=("netcon_WAN") packet-mark=("dscp_netcon") parent=WAN priority=1 queue=ethernet-default
The http traffic is correctly assigned into the priority 6 immediate_WAN queue, however it never takes precedence over traffic in the priority 8 routine_WAN queue…
does anyone know why the queue’s are not prioritizing the traffic?