VoIP QoS queueing

At the moment, I have this:


/queue tree
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0
max-limit=0 name=Outgoing parent=ether1-gateway priority=8
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0
max-limit=0 name=VoIP packet-mark=voip parent=Outgoing priority=2 queue=
default
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0
max-limit=0 name=“Not VoIP” packet-mark=no-mark parent=Outgoing priority=8
queue=default

I have mangle rules to add the packet mark. I’m using source MAC address, and that appears to be working, going by the traffic stats I can see.

I used to merely have a single entry which was more like

/queue tree
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0
max-limit=0 name=VoIP packet-mark=voip parent=ether1-gateway priority=2

but I was not convinced that it was doing the right thing (though to be fair, I had no concrete evidence it wasn’t).

All I am really trying to achieve is letting the voip tagged packets cut to the front of the line - that is, they should always be transmitted first ahead of any other traffic (I don’t have any priority=1 queues, but am reserving that for the future, if required). I don’t really care about prioritizing the incoming packets - the WAN connection is the choke point, so once they’re past that they’ll all make it to the voip devices.

I could set max-limit to something like 90% of my WAN connection uplink speed to insure that the cable modem isn’t forced to make any packet dropping decisions (because it won’t do so with cognizance of the packet marking / prioritization), but again, I’m not 100% sure about doing so for a couple reasons - one is that I’d not actually achieve maximal throughput (though that would be by design), and the other is that I have the impression that cable modem uplink bandwidth is not always guaranteed to be maximal. That is, despite setting an uplink bandwidth cap, the cable modem might still wind up throwing packets away.

Anyone have any thoughts?

you must set a max-limit on the connection. Without it, the QoS does not know when it is time to intervene and start queueing packets appropriately. I would suggest setting “outgoing” to 95%-100% of your total upload bandwidth, then setting “Not VoIP” to 90%-95% of your total. This gives the VoIP traffic a small buffer before the QoS really has to kick in.

Thanks. I’ve gone ahead and done that.