QOS by generic Active host name?

All,

I am curious if there is anyway to prioritize by a generic active host name, the reason would be I have a bunch of polycom phones using skype for business, each phone appears as Polycom_macaddress. I am hoping there is a way to QOS via Polycom or Polycom_ using this part of the active host name.

Any thoughts?

Dscp value may be an option. Vlan also would likely work.

Doing research now, many of these devices are on different software versions which may yield different dscp values.

Thanks!

For now I ended up using DCSP: https://wiki.mikrotik.com/wiki/DSCP_based_QoS_with_HTB

I then manually created a Queue tree and set priorities, will give this a test and see how well it works.

From that link:

/ip firewall mangle add action=mark-packet chain=postrouting comment=dscp.0 disabled=no
dscp=0 new-packet-mark=dscp.0 passthrough=no
/ip firewall mangle add action=mark-packet chain=postrouting comment=dscp.46 disabled=no
dscp=46 new-packet-mark=dscp.46 passthrough=no
/ip firewall mangle add action=mark-packet chain=postrouting comment=dscp.48 disabled=no
dscp=48 new-packet-mark=dscp.48 passthrough=no
:for x from 1 to 45 do={/ip firewall mangle add action=mark-packet chain=postrouting
comment=dscp.1-45 disabled=no dscp=$x new-packet-mark=dscp.other passthrough=no}
/ip firewall mangle add action=mark-packet chain=postrouting comment=dscp.47 disabled=no
dscp=47 new-packet-mark=dscp.other passthrough=no
:for x from 49 to 63 do={/ip firewall mangle add action=mark-packet chain=postrouting
comment=dscp.49-63 disabled=no dscp=$x new-packet-mark=dscp.other passthrough=no}

This basically gives you four markings:

dscp.0 for packets that have no DSCP tags
dscp.46 for EF packets (my VoIP traffic)
dscp.48 for routing updates
dscp.other for all other DSCP values

I am then able to assemble a queue tree where unmarked packets have the lowest priority, followed by dscp.other, dscp.46 and dscp.48, under the philosophy that routing updates should always be prioritized highest - without them, nothing works, then VoIP, other prioritized packets and lowest of all, non-marked packets.

It normally is sufficient to set the priority from the top 3 bits of the DSCP and then use 8 queues based on priority.
That way you don’t need that long list of mangling rules that could consume quite some processing power.

/ip firewall mangle
add action=set-priority chain=postrouting comment="From dscp high 3 bits" \
    new-priority=from-dscp-high-3-bits passthrough=yes
add action=mark-packet chain=postrouting comment="Priority 0" \
    new-packet-mark=prio0 passthrough=yes priority=0
add action=mark-packet chain=postrouting comment="Priority 1" \
    new-packet-mark=prio1 passthrough=yes priority=1
add action=mark-packet chain=postrouting comment="Priority 2" \
    new-packet-mark=prio2 passthrough=yes priority=2
add action=mark-packet chain=postrouting comment="Priority 3" \
    new-packet-mark=prio3 passthrough=yes priority=3
add action=mark-packet chain=postrouting comment="Priority 4" \
    new-packet-mark=prio4 passthrough=yes priority=4
add action=mark-packet chain=postrouting comment="Priority 5" \
    new-packet-mark=prio5 passthrough=yes priority=5
add action=mark-packet chain=postrouting comment="Priority 6" \
    new-packet-mark=prio6 passthrough=yes priority=6
add action=mark-packet chain=postrouting comment="Priority 7" \
    new-packet-mark=prio7 passthrough=yes priority=7
/queue tree
add limit-at=19M max-limit=19M name=queue-vlan58 \
    parent=ether1.vlan58 queue=default
add limit-at=4M max-limit=18M name=queue-vlan58-p1 packet-mark=prio7 parent=\
    queue-vlan58 priority=1 queue=default
add limit-at=4M max-limit=18M name=queue-vlan58-p2 packet-mark=prio6 parent=\
    queue-vlan58 priority=2 queue=default
add limit-at=4M max-limit=18M name=queue-vlan58-p3 packet-mark=prio5 parent=\
    queue-vlan58 priority=3 queue=default
add limit-at=4M max-limit=18M name=queue-vlan58-p4 packet-mark=prio4 parent=\
    queue-vlan58 priority=4 queue=default
add limit-at=4M max-limit=18M name=queue-vlan58-p5 packet-mark=prio3 parent=\
    queue-vlan58 priority=5 queue=default
add limit-at=4M max-limit=18M name=queue-vlan58-p6 packet-mark=prio0 parent=\
    queue-vlan58 priority=6 queue=default
add limit-at=4M max-limit=18M name=queue-vlan58-p7 packet-mark=prio2 parent=\
    queue-vlan58 priority=7 queue=default
add limit-at=4M max-limit=18M name=queue-vlan58-p8 packet-mark=prio1 parent=\
    queue-vlan58 queue=default

Note that prio1 and prio2 are actually lower priority than prio0, for historical reasons.

Thanks! I will give both a try, I did see that updated list at the top of the link I posted. So far my cpu usage is hovering between 17%-35%. I will try with the new set you suggested in a few days after some confirmation of better Skype for Business calls.

@pe1chl

Could you give an example of what type of queue tree numbers to change if my bandwidth is currently 20mbps full duplex (up and down). And possibly a second example at 100mbps full duplex?

I am a bit of a noob with all of this.

Much appreciated!

The numbers are good for 20 Mbit/s, they were actually generated for 19.4 Mbit/s.
For 100 Mbit/s do everything times 5.
The queue tree only shapes in the uplink direction, for best results the shaping on the other side should be done at the other side.
(of course you should not just paste in this queue tree example, the queue name and parent interface have to be adjusted, in this case
it is from a router where this queue is on VLAN 58 on ether1. the mangle rules are OK to just cut and paste)

This may seem like a dumb question but, is it necessary to use limits with regard to bandwidth at all in the queues? Is the prioritization enough? This should be my last question. Truly appreciated.

The limiting is there to prevent that a higher-priority queue can completely block all the lower ones.
When you don’t do this it may happen that someone “discovers” that using DSCP 63 he can always get the highest priority and all others get nothing.

Thanks for the clarification. Have a great rest of the day!