I am trying to implement some basic QoS at some of our locations. This is complicated a bit since we are using hotspots with PCC for load balancing and redundancy on the boxes as well. Ideally I would like to have something in place much like what is outlined in this wiki.
http://wiki.mikrotik.com/wiki/Connection_Rate
I believe that I do have something worked out, and just wanted to post the configuration to see if this will accomplish what I am looking for, or if there is a better way to go about it.
For the first ISP they have a T-1, the other is a cable connection with a 30/5. So for the LAN port I put a queue on that interface and combined the two amounts of download, then for each ISP I put another queue on their interfaces. I tried putting it on the Global In and Out for their parents, but I need to keep the functionality of the simple queues going for bandwidth profiles for guests.
/ip firewall mangle
add action=jump chain=forward comment="Mangle rules for QoS" disabled=no jump-target=hotspot src-address=192.168.50.0/23
add action=jump chain=forward comment="" disabled=no dst-address=192.168.50.0/23 jump-target=QoS
add action=mark-packet chain=QoS comment="" disabled=no new-packet-mark=other_traffic passthrough=yes
add action=mark-packet chain=QoS comment="" connection-bytes=500000-0 connection-rate=200k-100M disabled=no new-packet-mark=heavy_traffic passthrough=yes protocol=tcp
add action=mark-packet chain=QoS comment="" connection-bytes=500000-0 connection-rate=200k-100M disabled=no new-packet-mark=heavy_traffic passthrough=yes protocol=udp
/queue tree
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 max-limit=31500k name="Global Download" parent="Guest Network" priority=8
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=25M max-limit=31500k name="Normal Download" packet-mark=other_traffic parent="Global Download" \
priority=1 queue=default
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=6500k max-limit=31500k name="Heavy Download" packet-mark=heavy_traffic parent="Global Download" \
priority=8 queue=default
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 max-limit=1500k name="Global Upload ISP1" parent=ether1 priority=8
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=1M max-limit=1500k name="Normal Upload ISP1" packet-mark=other_traffic parent="Global Upload ISP1" \
priority=1 queue=default
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=500k max-limit=1500k name="Heavy Upload ISP1" packet-mark=heavy_traffic parent="Global Upload ISP1" \
priority=8 queue=default
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 max-limit=5M name="Global Upload ISP2" parent=ether2 priority=8
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=4M max-limit=5M name="Normal Upload ISP2" packet-mark=other_traffic parent=\
"Global Upload ISP2" priority=1 queue=default
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=1M max-limit=5M name="Heavy Upload ISP2" packet-mark=heavy_traffic parent=\
"Global Upload ISP2" priority=8 queue=default
My main concern with this is what it will do to CPU usage. Right now most of our boxes (450 boards) rarely exceed ~20% even under full load, so I’m hopping it won’t overload anything.