both methods are working(only set the passthrough to no in 2nd line in the connection-mark example and you don’t have to specify interface in 1st line)
but the only packet mark without connection mark is faster for me, maybe some Guru knows the truth
I’m migrating shapers from linux to ROS and what I did, is that I rewrited my system to support mikrotik API, but the shaping algorithm remained same.
more friendly schema how I do the shaping, it’s on routers with nat
first dividing used custommers to subnets, now for /24, will make better tree in future, so every packet should pass max 10 rules.
..
…
chain=forward action=jump jump-target=FORWARD_25
src-address=10.108.25.0/24 out-interface=ether1
chain=postrouting action=jump jump-target=POSTROUTING_25
dst-address=10.108.25.0/24 out-interface=ether2
chain=forward action=jump jump-target=FORWARD_5
src-address=10.108.5.0/24 out-interface=ether1
chain=postrouting action=jump jump-target=POSTROUTING_5
dst-address=10.108.5.0/24 out-interface=ether2
…
..
and now mark concrete ips
..
…
chain=POSTROUTING_25 action=mark-packet new-packet-mark=in25.83
passthrough=no dst-address=10.108.25.83
chain=FORWARD_25 action=mark-packet new-packet-mark=out25.83
passthrough=no src-address=10.108.25.83
chain=POSTROUTING_5 action=mark-packet new-packet-mark=in5.51
passthrough=no dst-address=10.108.5.51
chain=FORWARD_5 action=mark-packet new-packet-mark=out5.51 passthrough=no
src-address=10.108.5.51
…
..
and then ordinary queue trees for shaping