I am working on a Mikrotik 2.9 box where we are trying to set up traffic shaping and graphing using the mangle table and simple queues. The mangle table is required because the queues deal with IP ranges which don’t fall neatly into cidr blocks and may be non-contiguous (eg, a customer may have 20-25 and 35-40), so address lists are used to mark the packets. The rules look similar to the following:
mangle:
chain=prerouting src-address-list=customer1 action=mark-packet new-packet-mark=customer1 passthrough=no
chain=prerouting dst-address-list=customer1 action=mark-packet new-packet-mark=customer1 passthrough=no
simple queue:
name=“customer1” interface=all direction=both packet-marks=customer1
What we see is that the In and Out are nearly identical, which seems unlikely. Additionally, if max-limit is set to 4MB/2MB, the In will be limited to 3MB, while the Out can be higher, though I haven’t seen it get higher than 4MB.
The goal is to be able to see both In and Out for a given customer on a single graph. The available interfaces are all, ether1, ether2, and bridge0. bridge0 uses ether1 and ether2.
I’ve noticed that the only way to get both directions graphed at all is that the mangle rule must be in the prerouting chain, and the the queue must use interface=all.