Help how to write heavy traffic queue

Hi can some one pleasse help im going crazy with this.
At the moment i am using this script below (Script named number 1 from wiki) to mark other traffic so i can limit p2p with queues. This is working perfect.

Then i tryed using another script to mark heavy connections so i can control http downloads (script named number2 below from wiki)
the problem is script 2 changes the names of my connectios to all_conn so my queues dont work any more for script 1.

If some one can help what i would like to be able to do is just use script one as its good for me and have a firewall mangle that just shows heavy traffic when there is heavy traffic and not change the names of m my connections just change the name heavy traffic so i can control other connections with a simple queue and control heavy traffic with another queue

Ive read all the wikis but can not get my head round it im sure its a simple rule just can not figure it out.

SCRIPT 1
/ ip firewall mangle
add chain=prerouting protocol=tcp dst-port=80 action=mark-connection
new-connection-mark=http_conn passthrough=yes
add chain=prerouting connection-mark=http_conn action=mark-packet
new-packet-mark=http passthrough=no
add chain=prerouting p2p=all-p2p action=mark-connection
new-connection-mark=p2p_conn passthrough=yes
add chain=prerouting connection-mark=p2p_conn action=mark-packet
new-packet-mark=p2p passthrough=no
add chain=prerouting action=mark-connection new-connection-mark=other_conn
passthrough=yes
add chain=prerouting connection-mark=other_conn action=mark-packet
new-packet-mark=other passthrough=no

/ queue simple
add name=“main” target-addresses=10.0.0.12/32 max-limit=256000/512000
add name=“http” parent=main packet-marks=http max-limit=240000/500000 priority=1
add name=“p2p” parent=main packet-marks=p2p max-limit=64000/64000 priority=8
add name=“other” parent=main packet-marks=other max-limit=128000/128000 priority=4




SCRIPT 2

/ip firewall mangle
add chain=forward action=mark-connection connection-mark=!heavy_traffic_conn
new-connection-mark=all_conn
add chain=forward action=mark-connection connection-bytes=500000-0
connection-mark=all_conn connection-rate=200k-100M
new-connection-mark=heavy_traffic_conn protocol=tcp
add chain=forward action=mark-connection connection-bytes=500000-0
connection-mark=all_conn connection-rate=200k-100M
new-connection-mark=heavy_traffic_conn protocol=udp
add chain=forward action=mark-packet connection-mark=heavy_traffic_conn
new-packet-mark=heavy_traffic passthrough=no
add chain=forward action=mark-packet connection-mark=all_conn
new-packet-mark=other_traffic passthrough=no

/queue tree
add name=upload parent=public max-limit=6M
add name=other_upload parent=upload limit-at=4M max-limit=6M
packet-mark=other_traffic priority=1
add name=heavy_upload parent=upload limit-at=2M max-limit=6M
packet-mark=heavy_traffic priority=8
add name=download parent=local max-limit=6M
add name=other_download parent=download limit-at=4M max-limit=6M
packet-mark=other_traffic priority=1
add name=heavy_download parent=download limit-at=2M max-limit=6M
packet-mark=heavy_traffic priority=8

you should check what exactly you are limiting. script 1 already marks http traffic, so use that in second part. Also, you are trying to use queue-tree and simple queues, that complicates things a lot, so Look up topics on how you can use these both together.

There is nothing simple about simple queues :slight_smile: since there are added several places (instead of one). It is simple for the user. If you want to combine them with queue tree, you have to know precisely what and where is added.

best advice ATM - go to tiktube.com and check presentations about queues and see how different techniques are implemented and see what fits you best.