/ip firewall mangle
add chain=forward comment="local net => local net" dst-address-list=local-net \
src-address-list=local-net
add action=mark-connection chain=forward comment="big downloads tcp" \
connection-bytes=3000000-0 connection-mark=!p8 new-connection-mark=p8 \
protocol=tcp
add action=mark-connection chain=forward comment="big downloads udp" \
connection-bytes=3000000-0 connection-mark=!p8 new-connection-mark=p8 \
protocol=udp
add action=mark-connection chain=forward comment="new dns UDP" \
connection-mark=no-mark connection-state=new dst-port=53 \
new-connection-mark=p1 protocol=udp
add action=mark-connection chain=forward comment="new ICMP" connection-mark=\
no-mark connection-state=new new-connection-mark=p1 protocol=icmp
add action=mark-connection chain=forward comment="new admin lan" \
connection-mark=no-mark connection-state=new in-interface=admin \
new-connection-mark=p4
add action=mark-connection chain=forward comment="new szkola lan" \
connection-mark=no-mark connection-state=new in-interface=szkola \
new-connection-mark=p5
add action=mark-connection chain=forward comment="new szkola lan" \
connection-mark=no-mark connection-state=new in-interface=mieszkania \
new-connection-mark=p5
add action=mark-connection chain=forward comment="new internat lan" \
connection-mark=no-mark connection-state=new in-interface=internat \
new-connection-mark=p7
add action=jump chain=forward comment="wan3 down" in-interface=wan3 \
jump-target=w3_d
add action=jump chain=forward comment="wan3 up" jump-target=w3_u \
out-interface=wan3
add action=jump chain=forward comment="wan1 down" in-interface=wan1 \
jump-target=w1_d
add action=jump chain=forward comment="wan1 up" jump-target=w1_u \
out-interface=wan1
add action=jump chain=forward comment="wan2 down" in-interface=wan2 \
jump-target=w2_d
add action=jump chain=forward comment="wan2 up" jump-target=w2_u \
out-interface=wan2
add chain=forward comment="unmarked VPN i<=> int"
add action=mark-connection chain=output comment=\
"out wan1 => mark connection router_wan1" connection-state=new \
new-connection-mark=router_wan1 out-interface=wan1
add action=mark-routing chain=output comment="route to wan1 if input wan1" \
connection-mark=router_wan1 new-routing-mark=wan1
add action=mark-packet chain=output comment="router => wan1 => w1_u_p1" \
connection-mark=router_wan1 new-packet-mark=w1_u_p1 passthrough=no
add action=mark-connection chain=output comment=\
"out wan2 => mark connection router_wan2" connection-state=new \
new-connection-mark=router_wan2 out-interface=wan2
add action=mark-routing chain=output comment="route to wan2 if input wan2" \
connection-mark=router_wan2 new-routing-mark=wan2
add action=mark-packet chain=output comment="router => wan2 => w2_u_p1" \
connection-mark=router_wan2 new-packet-mark=w2_u_p1 passthrough=no
add action=mark-connection chain=output comment=\
"out wan3 => mark connection router_wan3" connection-state=new \
new-connection-mark=router_wan3 out-interface=wan3
add action=mark-routing chain=output comment="route to wan3 if input wan3" \
connection-mark=router_wan3 new-routing-mark=wan3
add action=mark-connection chain=input comment="new-con-mark=router_wan1" \
connection-state=new in-interface=wan1 new-connection-mark=router_wan1
add action=mark-packet chain=input comment="wan1 => router => w1_d_p1" \
in-interface=wan1 new-packet-mark=w1_d_p1 passthrough=no
add action=mark-connection chain=input comment="new-con-mark=router_wan2" \
connection-state=new in-interface=wan2 new-connection-mark=router_wan2
add action=mark-packet chain=input comment="wan2 => router => w2_d_p1" \
in-interface=wan2 new-packet-mark=w2_d_p1 passthrough=no
add action=mark-packet chain=w1_d comment="pmark p8" connection-mark=p8 \
new-packet-mark=w1_d_p8 passthrough=no
add action=mark-packet chain=w1_d comment="pmark p1" connection-mark=p1 \
new-packet-mark=w1_d_p1 passthrough=no
add action=mark-packet chain=w1_d comment="pmark p2" connection-mark=p2 \
new-packet-mark=w1_d_p2 passthrough=no
add action=mark-packet chain=w1_d comment="pmark p3" connection-mark=p3 \
new-packet-mark=w1_d_p3 passthrough=no
add action=mark-packet chain=w1_d comment="pmark p4" connection-mark=p4 \
new-packet-mark=w1_d_p4 passthrough=no
add action=mark-packet chain=w1_d comment="pmark p5" connection-mark=p5 \
new-packet-mark=w1_d_p5 passthrough=no
add action=mark-packet chain=w1_d comment="pmark p6" connection-mark=p6 \
new-packet-mark=w1_d_p6 passthrough=no
add action=mark-packet chain=w1_u comment="pmark p8" connection-mark=p8 \
new-packet-mark=w1_u_p8 passthrough=no
add action=mark-packet chain=w1_u comment="pmark p1" connection-mark=p1 \
new-packet-mark=w1_u_p1 passthrough=no
add action=mark-packet chain=w1_u comment="pmark p2" connection-mark=p2 \
new-packet-mark=w1_u_p2 passthrough=no
add action=mark-packet chain=w1_u comment="pmark p3" connection-mark=p3 \
new-packet-mark=w1_u_p3 passthrough=no
add action=mark-packet chain=w1_u comment="pmark p4" connection-mark=p4 \
new-packet-mark=w1_u_p4 passthrough=no
add action=mark-packet chain=w1_u comment="pmark p5" connection-mark=p5 \
new-packet-mark=w1_u_p5 passthrough=no
add action=mark-packet chain=w1_u comment="pmark p6" connection-mark=p6 \
new-packet-mark=w1_u_p6 passthrough=no
add action=mark-packet chain=w1_u comment="pmark p7" connection-mark=p7 \
new-packet-mark=w1_u_p7 passthrough=no
add action=mark-packet chain=w1_u comment="pmark p8 default" new-packet-mark=\
w1_u_p8 passthrough=no
add action=mark-packet chain=w2_d comment="pmark p8" connection-mark=p8 \
new-packet-mark=w2_d_p8 passthrough=no
add action=mark-packet chain=w2_d comment="pmark p1" connection-mark=p1 \
new-packet-mark=w2_d_p1 passthrough=no
add action=mark-packet chain=w2_d comment="pmark p2" connection-mark=p2 \
new-packet-mark=w2_d_p2 passthrough=no
add action=mark-packet chain=w2_d comment="pmark p3" connection-mark=p3 \
new-packet-mark=w2_d_p3 passthrough=no
add action=mark-packet chain=w2_d comment="pmark p4" connection-mark=p4 \
new-packet-mark=w2_d_p4 passthrough=no
add action=mark-packet chain=w2_u comment="pmark p8" connection-mark=p8 \
new-packet-mark=w2_u_p8 passthrough=no
add action=mark-packet chain=w2_u comment="pmark p1" connection-mark=p1 \
new-packet-mark=w2_u_p1 passthrough=no
add action=mark-packet chain=w2_u comment="pmark p2" connection-mark=p2 \
new-packet-mark=w2_u_p2 passthrough=no
add action=mark-packet chain=w2_u comment="pmark p3" connection-mark=p3 \
new-packet-mark=w2_u_p3 passthrough=no
add action=mark-packet chain=w2_u comment="pmark p4" connection-mark=p4 \
new-packet-mark=w2_u_p4 passthrough=no
add action=mark-packet chain=w2_u comment="pmark p5" connection-mark=p5 \
new-packet-mark=w2_u_p5 passthrough=no
add action=mark-packet chain=w2_u comment="pmark p6" connection-mark=p6 \
new-packet-mark=w2_u_p6 passthrough=no
add action=mark-packet chain=w2_u comment="pmark p7" connection-mark=p7 \
new-packet-mark=w2_u_p7 passthrough=no
add action=mark-packet chain=w2_u comment="pmark p8 default" new-packet-mark=\
w2_u_p8 passthrough=no
add action=mark-packet chain=w3_d comment="pmark p8" connection-mark=p8 \
new-packet-mark=w3_d_p8 passthrough=no
add action=mark-packet chain=w3_d comment="pmark p7" connection-mark=p7 \
new-packet-mark=w3_d_p7 passthrough=no
add action=mark-packet chain=w3_d comment="pmark p1" connection-mark=p1 \
new-packet-mark=w3_d_p1 passthrough=no
add action=mark-packet chain=w3_d comment="pmark p2" connection-mark=p2 \
new-packet-mark=w3_d_p2 passthrough=no
add action=mark-packet chain=w3_d comment="pmark p3" connection-mark=p3 \
new-packet-mark=w3_d_p3 passthrough=no
add action=mark-packet chain=w3_d comment="pmark p4" connection-mark=p4 \
new-packet-mark=w3_d_p4 passthrough=no
add action=mark-packet chain=w3_d comment="pmark p5" connection-mark=p5 \
new-packet-mark=w3_d_p5 passthrough=no
add action=mark-packet chain=w3_d comment="pmark p6" connection-mark=p6 \
new-packet-mark=w3_d_p6 passthrough=no
add action=mark-packet chain=w3_u comment="pmark p8" connection-mark=p8 \
new-packet-mark=w3_u_p8 passthrough=no
add action=mark-packet chain=w3_u comment="pmark p7" connection-mark=p7 \
new-packet-mark=w3_u_p7 passthrough=no
add action=mark-packet chain=w3_u comment="pmark p1" connection-mark=p1 \
new-packet-mark=w3_u_p1 passthrough=no
add action=mark-packet chain=w3_u comment="pmark p2" connection-mark=p2 \
new-packet-mark=w3_u_p2 passthrough=no
add action=mark-packet chain=w3_u comment="pmark p3" connection-mark=p3 \
new-packet-mark=w3_u_p3 passthrough=no
add action=mark-packet chain=w3_u comment="pmark p4" connection-mark=p4 \
new-packet-mark=w3_u_p4 passthrough=no
add action=mark-packet chain=w3_u comment="pmark p5" connection-mark=p5 \
new-packet-mark=w3_u_p5 passthrough=no
add action=mark-packet chain=w3_u comment="pmark p6" connection-mark=p6 \
new-packet-mark=w3_u_p6 passthrough=no
add action=mark-packet chain=w3_u comment="pmark p8 default" new-packet-mark=\
w3_u_p8 passthrough=no
add chain=prerouting comment="local net => local net" dst-address-list=\
local-net src-address-list=local-net
add action=mark-routing chain=prerouting comment="DNS queries przez wan1" \
dst-port=53 new-routing-mark=wan1 passthrough=no protocol=udp
add action=mark-routing chain=prerouting comment="DNS queries przez wan1" \
dst-port=53 new-routing-mark=wan1 passthrough=no protocol=tcp
add action=mark-routing chain=prerouting comment="zspserwer przez wan1-3" \
disabled=yes new-routing-mark=wan2 passthrough=no src-address=\
10.172.88.10
add action=mark-routing chain=prerouting comment="svr1.int.zsp przez wan1-3" \
disabled=yes new-routing-mark=wan1 passthrough=no src-address=10.177.88.3
add action=mark-routing chain=prerouting comment=\
"route internat via wan3 id=route-internat" dst-address-list=!local-net \
in-interface=internat new-routing-mark=wan_all passthrough=no
add action=mark-packet chain=w1_d comment="pmark p7" connection-mark=p7 \
new-packet-mark=w1_d_p7 passthrough=no
add action=mark-packet chain=w1_d comment="pmark p8 default" new-packet-mark=\
w1_d_p8 passthrough=no
add action=mark-packet chain=w3_d comment="pmark p8 default" new-packet-mark=\
w3_d_p8 passthrough=no
add action=log chain=postrouting comment="debug NAT logging" disabled=yes \
dst-address=8.8.4.4 dst-address-list="" log-prefix=POSTROUTE protocol=\
icmp
add action=mark-connection chain=input comment="new-con-mark=router_wan3" \
connection-state=new in-interface=wan3 new-connection-mark=router_wan3
add action=mark-packet chain=input comment="wan3 => router => w3_d_p1" \
in-interface=wan3 new-packet-mark=w3_d_p1 passthrough=no
add action=mark-packet chain=output comment="router => wan3 => w3_u_p1" \
connection-mark=router_wan3 new-packet-mark=w3_u_p1 passthrough=no
add action=mark-routing chain=prerouting comment=\
"route szkola via wan2 id=route-szkola" dst-address-list=!local-net \
dst-address-type="" in-interface=szkola new-routing-mark=wan2 \
passthrough=no
add action=mark-routing chain=prerouting comment=\
"route admin via wan2 id=route-admin" dst-address-list=!local-net \
dst-address-type="" in-interface=admin new-routing-mark=wan1 passthrough=\
no
add action=mark-routing chain=prerouting comment=\
"route admin via wan2 id=route-mieszkania" dst-address-list=!local-net \
dst-address-type="" in-interface=mieszkania new-routing-mark=wan_all \
passthrough=no
add action=mark-packet chain=w2_d comment="pmark p5" connection-mark=p5 \
new-packet-mark=w2_d_p5 passthrough=no
add action=mark-packet chain=w2_d comment="pmark p6" connection-mark=p6 \
new-packet-mark=w2_d_p6 passthrough=no
add action=mark-packet chain=w2_d comment="pmark p7" connection-mark=p7 \
new-packet-mark=w2_d_p7 passthrough=no
add action=mark-packet chain=w2_d comment="pmark p8 default" new-packet-mark=\
w2_d_p8 passthrough=no
/queue tree
add max-limit=20M name=w3_d parent=global queue=default
add comment=w3_d_p1 limit-at=15M max-limit=20M name=w3_d_p1 packet-mark=\
w3_d_p1 parent=w3_d priority=1 queue=pcq-download
add comment=w3_d_p2 limit-at=10M max-limit=20M name=w3_d_p2 packet-mark=\
w3_d_p2 parent=w3_d priority=2 queue=pcq-download
add comment=w3_d_p3 max-limit=20M name=w3_d_p3 packet-mark=w3_d_p3 parent=\
w3_d priority=3 queue=pcq-download
add comment=w3_d_p4 limit-at=10M max-limit=20M name=w3_d_p4 packet-mark=\
w3_d_p4 parent=w3_d priority=4 queue=pcq-download
add comment=w3_d_p5 limit-at=10M max-limit=20M name=w3_d_p5 packet-mark=\
w3_d_p5 parent=w3_d priority=5 queue=pcq-download
add comment=w3_d_p6 max-limit=20M name=w3_d_p6 packet-mark=w3_d_p6 parent=\
w3_d priority=6 queue=pcq-download
add comment=w3_d_p7 limit-at=10M max-limit=20M name=w3_d_p7 packet-mark=\
w3_d_p7 parent=w3_d priority=7 queue=pcq-download
add comment=w3_d_p8 limit-at=10M max-limit=15M name=w3_d_p8 packet-mark=\
w3_d_p8 parent=w3_d queue=pcq-download
add max-limit=1550k name=w3_u parent=global queue=default
add comment=w3_u_p1 limit-at=900k max-limit=1550k name=w3_u_p1 packet-mark=\
w3_u_p1 parent=w3_u priority=1 queue=pcq-upload
add comment=w3_u_p2 limit-at=900k max-limit=1550k name=w3_u_p2 packet-mark=\
w3_u_p2 parent=w3_u priority=2 queue=pcq-upload
add comment=w3_u_p3 max-limit=1550k name=w3_u_p3 packet-mark=w3_u_p3 parent=\
w3_u priority=3 queue=pcq-upload
add comment=w3_u_p4 limit-at=600k max-limit=1550k name=w3_u_p4 packet-mark=\
w3_u_p4 parent=w3_u priority=4 queue=pcq-upload
add comment=w3_u_p5 limit-at=600k max-limit=1550k name=w3_u_p5 packet-mark=\
w3_u_p5 parent=w3_u priority=5 queue=pcq-upload
add comment=w3_u_p6 max-limit=1550k name=w3_u_p6 packet-mark=w3_u_p6 parent=\
w3_u priority=6 queue=pcq-upload
add comment=w3_u_p7 limit-at=600k max-limit=1550k name=w3_u_p7 packet-mark=\
w3_u_p7 parent=w3_u priority=7 queue=pcq-upload
add comment=w3_u_p8 limit-at=600k max-limit=1M name=w3_u_p8 packet-mark=\
w3_u_p8 parent=w3_u queue=pcq-upload
add max-limit=29M name=w2_d parent=global queue=default
add comment=w2_d_p1 limit-at=20M max-limit=29M name=w2_d_p1 packet-mark=\
w2_d_p1 parent=w2_d priority=1 queue=pcq-download
add comment=w2_d_p2 limit-at=20M max-limit=29M name=w2_d_p2 packet-mark=\
w2_d_p2 parent=w2_d priority=2 queue=pcq-download
add comment=w2_d_p3 max-limit=29M name=w2_d_p3 packet-mark=w2_d_p3 parent=\
w2_d priority=3 queue=pcq-download
add comment=w2_d_p4 limit-at=15M max-limit=29M name=w2_d_p4 packet-mark=\
w2_d_p4 parent=w2_d priority=4 queue=pcq-download
add comment=w2_d_p5 limit-at=15M max-limit=25M name=w2_d_p5 packet-mark=\
w2_d_p5 parent=w2_d priority=5 queue=pcq-download
add comment=w2_d_p6 max-limit=29M name=w2_d_p6 packet-mark=w2_d_p6 parent=\
w2_d priority=6 queue=pcq-download
add comment=w2_d_p7 limit-at=15M max-limit=29M name=w2_d_p7 packet-mark=\
w2_d_p7 parent=w2_d priority=7 queue=pcq-download
add comment=w2_d_p8 limit-at=10M max-limit=25M name=w2_d_p8 packet-mark=\
w2_d_p8 parent=w2_d queue=pcq-download
add max-limit=14M name=w2_u parent=global queue=default
add comment=w2_u_p1 limit-at=10M max-limit=14M name=w2_u_p1 packet-mark=\
w2_u_p1 parent=w2_u priority=1 queue=pcq-upload
add comment=w2_u_p2 limit-at=10M max-limit=14M name=w2_u_p2 packet-mark=\
w2_u_p2 parent=w2_u priority=2 queue=pcq-upload
add comment=w2_u_p3 max-limit=14M name=w2_u_p3 packet-mark=w2_u_p3 parent=\
w2_u priority=3 queue=pcq-upload
add comment=w2_u_p4 limit-at=10M max-limit=14M name=w2_u_p4 packet-mark=\
w2_u_p4 parent=w2_u priority=4 queue=pcq-upload
add comment=w2_u_p5 limit-at=10M max-limit=14M name=w2_u_p5 packet-mark=\
w2_u_p5 parent=w2_u priority=5 queue=pcq-upload
add comment=w2_u_p6 max-limit=14M name=w2_u_p6 packet-mark=w2_u_p6 parent=\
w2_u priority=6 queue=pcq-upload
add comment=w2_u_p7 limit-at=10M max-limit=14M name=w2_u_p7 packet-mark=\
w2_u_p7 parent=w2_u priority=7 queue=pcq-upload
add comment=w2_u_p8 limit-at=6M max-limit=10M name=w2_u_p8 packet-mark=\
w2_u_p8 parent=w2_u queue=pcq-upload
add max-limit=20M name=w1_d parent=global queue=default
add comment=w1_d_p1 limit-at=8M max-limit=20M name=w1_d_p1 packet-mark=\
w1_d_p1 parent=w1_d priority=1 queue=pcq-download
add comment=w1_d_p2 limit-at=3M max-limit=20M name=w1_d_p2 packet-mark=\
w1_d_p2 parent=w1_d priority=2 queue=pcq-download
add comment=w1_d_p3 max-limit=20M name=w1_d_p3 packet-mark=w1_d_p3 parent=\
w1_d priority=3 queue=pcq-download
add comment=w1_d_p4 limit-at=9M max-limit=20M name=w1_d_p4 packet-mark=\
w1_d_p4 parent=w1_d priority=4 queue=pcq-download
add comment=w1_d_p5 limit-at=4M max-limit=20M name=w1_d_p5 packet-mark=\
w1_d_p5 parent=w1_d priority=5 queue=pcq-download
add comment=w1_d_p6 max-limit=20M name=w1_d_p6 packet-mark=w1_d_p6 parent=\
w1_d priority=6 queue=pcq-download
add comment=w1_d_p7 limit-at=10M max-limit=20M name=w1_d_p7 packet-mark=\
w1_d_p7 parent=w1_d priority=7 queue=pcq-download
add comment=w1_d_p8 limit-at=8M max-limit=12M name=w1_d_p8 packet-mark=\
w1_d_p8 parent=w1_d queue=pcq-download
add max-limit=1550k name=w1_u parent=global queue=default
add comment=w1_u_p1 limit-at=900k max-limit=1550k name=w1_u_p1 packet-mark=\
w1_u_p1 parent=w1_u priority=1 queue=pcq-upload
add comment=w1_u_p2 limit-at=900k max-limit=1550k name=w1_u_p2 packet-mark=\
w1_u_p2 parent=w1_u priority=2 queue=pcq-upload
add comment=w1_u_p3 max-limit=1550k name=w1_u_p3 packet-mark=w1_u_p3 parent=\
w1_u priority=3 queue=pcq-upload
add comment=w1_u_p4 limit-at=600k max-limit=1550k name=w1_u_p4 packet-mark=\
w1_u_p4 parent=w1_u priority=4 queue=pcq-upload
add comment=w1_u_p5 limit-at=600k max-limit=1550k name=w1_u_p5 packet-mark=\
w1_u_p5 parent=w1_u priority=5 queue=pcq-upload
add comment=w1_u_p6 max-limit=1550k name=w1_u_p6 packet-mark=w1_u_p6 parent=\
w1_u priority=6 queue=pcq-upload
add comment=w1_u_p7 limit-at=600k max-limit=1550k name=w1_u_p7 packet-mark=\
w1_u_p7 parent=w1_u priority=7 queue=pcq-upload
add comment=w1_u_p8 limit-at=600k max-limit=1M name=w1_u_p8 packet-mark=\
w1_u_p8 parent=w1_u queue=pcq-upload
0 chain=forward action=mark-packet new-packet-mark=W1_Upload passthrough=no in-interface=ether1 log=no log-prefix=""
1 chain=forward action=mark-packet new-packet-mark=W1_Download passthrough=no out-interface=ether1 log=no log-prefix=""
2 chain=forward action=mark-packet new-packet-mark=W2_Upload passthrough=no in-interface=ether5 log=no log-prefix=""
3 chain=forward action=mark-packet new-packet-mark=W2_Download passthrough=no out-interface=ether5 log=no log-prefix=""
4 ;;; DNS
chain=prerouting action=mark-connection new-connection-mark=DNS passthrough=yes connection-state=new protocol=udp port=53
5 chain=postrouting action=mark-connection new-connection-mark=DNS passthrough=yes connection-state=new protocol=udp port=53
6 chain=postrouting action=mark-packet new-packet-mark=DNS passthrough=no connection-mark=DNS
7 ;;; VOIP
chain=prerouting action=mark-connection new-connection-mark=VOIP-TCP passthrough=yes protocol=tcp dscp=46
8 chain=prerouting action=mark-connection new-connection-mark=VOIP-UDP passthrough=yes protocol=udp dscp=46
9 chain=prerouting action=mark-connection new-connection-mark=VOIP-UDP passthrough=yes protocol=udp port=16000-17023,5060 log=no log-prefix=""
10 chain=prerouting action=mark-connection new-connection-mark=VOIP-TCP passthrough=yes protocol=tcp dscp=26
11 chain=prerouting action=mark-connection new-connection-mark=VOIP-UDP passthrough=yes protocol=udp dscp=26
12 chain=prerouting action=mark-packet new-packet-mark=VOIP-TCP passthrough=no connection-mark=VOIP-TCP
13 chain=prerouting action=mark-packet new-packet-mark=VOIP-UDP passthrough=no connection-mark=VOIP-UDP
14 ;;; UDP
chain=prerouting action=mark-connection new-connection-mark=UDP passthrough=yes connection-state=new protocol=udp
15 chain=prerouting action=mark-packet new-packet-mark=UDP passthrough=no connection-mark=UDP
16 ;;; ICMP
chain=prerouting action=mark-connection new-connection-mark=ICMP passthrough=yes connection-state=new protocol=icmp
17 chain=postrouting action=mark-connection new-connection-mark=ICMP passthrough=yes connection-state=new protocol=icmp
18 chain=postrouting action=mark-packet new-packet-mark=ICMP passthrough=no connection-mark=ICMP
19 ;;; ACK
chain=postrouting action=mark-packet new-packet-mark=ACK passthrough=no tcp-flags=ack protocol=tcp packet-size=0-123
20 chain=prerouting action=mark-packet new-packet-mark=ACK passthrough=no tcp-flags=ack protocol=tcp packet-size=0-123
21 ;;; HTTP
chain=prerouting action=mark-connection new-connection-mark=HTTP passthrough=yes connection-state=new protocol=tcp port=80,443,8080
0 chain=forward action=mark-packet new-packet-mark=W1_Upload passthrough=no in-interface=ether1 log=no log-prefix=""
1 chain=forward action=mark-packet new-packet-mark=W1_Download passthrough=no out-interface=ether1 log=no log-prefix=""
2 chain=forward action=mark-packet new-packet-mark=W2_Upload passthrough=no in-interface=ether5 log=no log-prefix=""
3 chain=forward action=mark-packet new-packet-mark=W2_Download passthrough=no out-interface=ether5 log=no log-prefix=""
4 ;;; DNS
chain=prerouting action=mark-connection new-connection-mark=DNS passthrough=yes connection-state=new protocol=udp port=53
5 chain=postrouting action=mark-connection new-connection-mark=DNS passthrough=yes connection-state=new protocol=udp port=53
6 chain=postrouting action=mark-packet new-packet-mark=DNS passthrough=no connection-mark=DNS
7 ;;; VOIP
chain=prerouting action=mark-connection new-connection-mark=VOIP-TCP passthrough=yes protocol=tcp dscp=46
8 chain=prerouting action=mark-connection new-connection-mark=VOIP-UDP passthrough=yes protocol=udp dscp=46
9 chain=prerouting action=mark-connection new-connection-mark=VOIP-UDP passthrough=yes protocol=udp port=16000-17023,5060 log=no log-prefix=""
10 chain=prerouting action=mark-connection new-connection-mark=VOIP-TCP passthrough=yes protocol=tcp dscp=26
11 chain=prerouting action=mark-connection new-connection-mark=VOIP-UDP passthrough=yes protocol=udp dscp=26
12 chain=prerouting action=mark-packet new-packet-mark=VOIP-TCP passthrough=no connection-mark=VOIP-TCP
13 chain=prerouting action=mark-packet new-packet-mark=VOIP-UDP passthrough=no connection-mark=VOIP-UDP
14 ;;; UDP
chain=prerouting action=mark-connection new-connection-mark=UDP passthrough=yes connection-state=new protocol=udp
15 chain=prerouting action=mark-packet new-packet-mark=UDP passthrough=no connection-mark=UDP
16 ;;; ICMP
chain=prerouting action=mark-connection new-connection-mark=ICMP passthrough=yes connection-state=new protocol=icmp
17 chain=postrouting action=mark-connection new-connection-mark=ICMP passthrough=yes connection-state=new protocol=icmp
18 chain=postrouting action=mark-packet new-packet-mark=ICMP passthrough=no connection-mark=ICMP
19 ;;; ACK
chain=postrouting action=mark-packet new-packet-mark=ACK passthrough=no tcp-flags=ack protocol=tcp packet-size=0-123
20 chain=prerouting action=mark-packet new-packet-mark=ACK passthrough=no tcp-flags=ack protocol=tcp packet-size=0-123
21 ;;; HTTP
chain=prerouting action=mark-connection new-connection-mark=HTTP passthrough=yes connection-state=new protocol=tcp port=80,443,8080
22 chain=prerouting action=mark-connection new-connection-mark=HTTP_BIG passthrough=yes protocol=tcp connection-mark=HTTP connection-bytes=500000-0
23 chain=prerouting action=mark-packet new-packet-mark=HTTP passthrough=no connection-mark=HTTP
24 chain=prerouting action=mark-packet new-packet-mark=HTTP_BIG passthrough=no connection-mark=HTTP_BIG
25 ;;; OTHER
chain=prerouting action=mark-connection new-connection-mark=OTHER passthrough=yes connection-mark=no-mark
26 chain=prerouting action=mark-packet new-packet-mark=OTHER passthrough=no connection-mark=OTHER log=no log-prefix=""
27 ;;; Beginning Load Balancing
chain=input action=mark-connection new-connection-mark=WAN1_conn passthrough=yes in-interface=ether1 log=no log-prefix=""
28 chain=input action=mark-connection new-connection-mark=WAN2_conn passthrough=yes in-interface=ether5 log=no log-prefix=""
29 chain=output action=mark-routing new-routing-mark=to_WAN1 passthrough=yes connection-mark=WAN1_conn log=no log-prefix=""
30 chain=output action=mark-routing new-routing-mark=to_WAN2 passthrough=yes connection-mark=WAN2_conn log=no log-prefix=""
31 chain=prerouting action=accept dst-address=10.0.0.0/24 in-interface=LAN log=no log-prefix=""
32 chain=prerouting action=mark-connection new-connection-mark=WAN1_conn passthrough=yes dst-address-type=!local in-interface=LAN per-connection-classifier=both-addresses-and-ports:2/0 log=no
log-prefix=""
33 chain=prerouting action=mark-connection new-connection-mark=WAN1_conn passthrough=yes dst-address-type=!local in-interface=LAN per-connection-classifier=both-addresses-and-ports:2/1 log=no
log-prefix=""
34 chain=prerouting action=mark-connection new-connection-mark=WAN2_conn passthrough=yes dst-address-type=!local in-interface=LAN per-connection-classifier=both-addresses-and-ports:2/2 log=no
log-prefix=""
35 chain=prerouting action=mark-routing new-routing-mark=to_WAN1 passthrough=yes connection-mark=WAN1_conn in-interface=LAN log=no log-prefix=""
36 chain=prerouting action=mark-routing new-routing-mark=to_WAN2 passthrough=yes connection-mark=WAN2_conn in-interface=LAN log=no log-prefix=""
0 name="MASTER_UP" parent=global packet-mark=W1_Upload limit-at=0 queue=default priority=8 max-limit=10M burst-limit=0 burst-threshold=0 burst-time=0s bucket-size=0.1
1 name="MASTER_DOWN" parent=global packet-mark=W1_Download limit-at=0 queue=default priority=8 max-limit=10M burst-limit=0 burst-threshold=0 burst-time=0s bucket-size=0.1
2 name="VOIP-TCP_U" parent=MASTER_UP packet-mark=VOIP-TCP limit-at=0 queue=default priority=1 max-limit=10M burst-limit=0 burst-threshold=0 burst-time=0s bucket-size=0.1
3 name="VOIP-TCP_D" parent=MASTER_DOWN packet-mark=VOIP-TCP limit-at=0 queue=default priority=1 max-limit=10M burst-limit=0 burst-threshold=0 burst-time=0s bucket-size=0.1
4 name="ACK_U" parent=MASTER_UP packet-mark=ACK limit-at=6M queue=default priority=2 max-limit=9M burst-limit=0 burst-threshold=0 burst-time=0s bucket-size=0.1
5 name="ACK_D" parent=MASTER_DOWN packet-mark=ACK limit-at=6M queue=default priority=2 max-limit=9M burst-limit=0 burst-threshold=0 burst-time=0s bucket-size=0.1
6 name="DNS_U" parent=MASTER_UP packet-mark=DNS limit-at=6M queue=default priority=3 max-limit=9M burst-limit=0 burst-threshold=0 burst-time=0s bucket-size=0.1
7 name="DNS_D" parent=MASTER_DOWN packet-mark=DNS limit-at=6M queue=default priority=3 max-limit=9M burst-limit=0 burst-threshold=0 burst-time=0s bucket-size=0.1
8 name="UDP_U" parent=MASTER_UP packet-mark=UDP limit-at=6M queue=default priority=4 max-limit=9M burst-limit=0 burst-threshold=0 burst-time=0s bucket-size=0.1
9 name="UDP_D" parent=MASTER_DOWN packet-mark=UDP limit-at=6M queue=default priority=4 max-limit=9M burst-limit=0 burst-threshold=0 burst-time=0s bucket-size=0.1
10 name="ICMP_U" parent=MASTER_UP packet-mark=ICMP limit-at=6M queue=default priority=5 max-limit=9M burst-limit=0 burst-threshold=0 burst-time=0s bucket-size=0.1
11 name="ICMP_D" parent=MASTER_DOWN packet-mark=ICMP limit-at=6M queue=default priority=5 max-limit=9M burst-limit=0 burst-threshold=0 burst-time=0s bucket-size=0.1
12 name="HTTP_U" parent=MASTER_UP packet-mark=HTTP limit-at=6M queue=default priority=6 max-limit=9M burst-limit=0 burst-threshold=0 burst-time=0s bucket-size=0.1
13 name="HTTP_D" parent=MASTER_DOWN packet-mark=HTTP limit-at=6M queue=default priority=6 max-limit=9M burst-limit=0 burst-threshold=0 burst-time=0s bucket-size=0.1
14 name="HTTP_BIG_U" parent=MASTER_UP packet-mark=HTTP_BIG limit-at=6M queue=default priority=7 max-limit=9M burst-limit=0 burst-threshold=0 burst-time=0s bucket-size=0.1
15 name="HTTP_BIG_D" parent=MASTER_DOWN packet-mark=HTTP_BIG limit-at=6M queue=default priority=7 max-limit=9M burst-limit=0 burst-threshold=0 burst-time=0s bucket-size=0.1
16 name="OTHER_U" parent=MASTER_UP packet-mark=OTHER limit-at=6M queue=default priority=8 max-limit=9M burst-limit=0 burst-threshold=0 burst-time=0s bucket-size=0.1
17 name="OTHER_D" parent=MASTER_DOWN packet-mark=OTHER limit-at=6M queue=default priority=8 max-limit=9M burst-limit=0 burst-threshold=0 burst-time=0s bucket-size=0.1
18 name="VOIP-UDP_D" parent=MASTER_DOWN packet-mark=VOIP-UDP limit-at=0 queue=default priority=1 max-limit=10M burst-limit=0 burst-threshold=0 burst-time=0s bucket-size=0.1
19 name="VOIP-UDP_U" parent=MASTER_UP packet-mark=VOIP-UDP limit-at=0 queue=default priority=1 max-limit=10M burst-limit=0 burst-threshold=0 burst-time=0s bucket-size=0.1
20 name="MASTER_UP2" parent=global packet-mark=W2_Upload limit-at=0 queue=default priority=8 max-limit=4M burst-limit=0 burst-threshold=0 burst-time=0s bucket-size=0.1
21 name="ACK_U2" parent=MASTER_UP2 packet-mark=ACK limit-at=2M queue=default priority=2 max-limit=4M burst-limit=0 burst-threshold=0 burst-time=0s bucket-size=0.1
22 name="DNS_U2" parent=MASTER_UP2 packet-mark=DNS limit-at=2M queue=default priority=3 max-limit=4M burst-limit=0 burst-threshold=0 burst-time=0s bucket-size=0.1
23 name="HTTP_BIG_U2" parent=MASTER_UP2 packet-mark=HTTP_BIG limit-at=2M queue=default priority=7 max-limit=4M burst-limit=0 burst-threshold=0 burst-time=0s bucket-size=0.1
24 name="HTTP_U2" parent=MASTER_UP2 packet-mark=HTTP limit-at=2M queue=default priority=6 max-limit=4M burst-limit=0 burst-threshold=0 burst-time=0s bucket-size=0.1
25 name="ICMP_U2" parent=MASTER_UP2 packet-mark=ICMP limit-at=2M queue=default priority=5 max-limit=4M burst-limit=0 burst-threshold=0 burst-time=0s bucket-size=0.1
26 name="OTHER_U2" parent=MASTER_UP2 packet-mark=OTHER limit-at=2M queue=default priority=8 max-limit=4M burst-limit=0 burst-threshold=0 burst-time=0s bucket-size=0.1
27 name="UDP_U2" parent=MASTER_UP2 packet-mark=UDP limit-at=2M queue=default priority=4 max-limit=4M burst-limit=0 burst-threshold=0 burst-time=0s bucket-size=0.1
28 name="VOIP-TCP_U2" parent=MASTER_UP2 packet-mark=VOIP-TCP limit-at=0 queue=default priority=1 max-limit=4M burst-limit=0 burst-threshold=0 burst-time=0s bucket-size=0.1
29 name="VOIP-UDP_U2" parent=MASTER_UP2 packet-mark=VOIP-UDP limit-at=0 queue=default priority=1 max-limit=4M burst-limit=0 burst-threshold=0 burst-time=0s bucket-size=0.1
30 name="MASTER_DOWN2" parent=global packet-mark=W2_Download limit-at=0 queue=default priority=8 max-limit=10M burst-limit=0 burst-threshold=0 burst-time=0s bucket-size=0.1
31 name="ACK_D2" parent=MASTER_DOWN2 packet-mark=ACK limit-at=6M queue=default priority=2 max-limit=9M burst-limit=0 burst-threshold=0 burst-time=0s bucket-size=0.1
32 name="DNS_D2" parent=MASTER_DOWN2 packet-mark=DNS limit-at=6M queue=default priority=3 max-limit=9M burst-limit=0 burst-threshold=0 burst-time=0s bucket-size=0.1
33 name="HTTP_BIG_D2" parent=MASTER_DOWN2 packet-mark=HTTP_BIG limit-at=6M queue=default priority=7 max-limit=9M burst-limit=0 burst-threshold=0 burst-time=0s bucket-size=0.1
34 name="HTTP_D2" parent=MASTER_DOWN2 packet-mark=HTTP limit-at=6M queue=default priority=6 max-limit=9M burst-limit=0 burst-threshold=0 burst-time=0s bucket-size=0.1
35 name="ICMP_D2" parent=MASTER_DOWN2 packet-mark=ICMP limit-at=6M queue=default priority=5 max-limit=9M burst-limit=0 burst-threshold=0 burst-time=0s bucket-size=0.1
36 name="OTHER_D2" parent=MASTER_DOWN2 packet-mark=OTHER limit-at=6M queue=default priority=8 max-limit=9M burst-limit=0 burst-threshold=0 burst-time=0s bucket-size=0.1
37 name="UDP_D2" parent=MASTER_DOWN2 packet-mark=UDP limit-at=6M queue=default priority=4 max-limit=9M burst-limit=0 burst-threshold=0 burst-time=0s bucket-size=0.1
38 name="VOIP-TCP_D2" parent=MASTER_DOWN2 packet-mark=VOIP-TCP limit-at=0 queue=default priority=1 max-limit=10M burst-limit=0 burst-threshold=0 burst-time=0s bucket-size=0.1
39 name="VOIP-UDP_D2" parent=MASTER_DOWN2 packet-mark=VOIP-UDP limit-at=0 queue=default priority=1 max-limit=10M burst-limit=0 burst-threshold=0 burst-time=0s bucket-size=0.1
I dont understand thatWould I have to jump in the forward chain all the 3rd level children so that the queues will pick it up properly?
say mark "DNS", if QT sees "DNS" mark, how will it decide if it belongs to master UP or Down queue ?You must not have two nodes in queue tree with the same packet mark.
I have changed it to DNS-WAN1-Down and then DNS-WAN1-Upsay mark "DNS", if QT sees "DNS" mark, how will it decide if it belongs to master UP or Down queue ?You must not have two nodes in queue tree with the same packet mark.
/ip firewall mangle
add action=mark-connection chain=prerouting comment=DNS-WAN1 \
connection-state=new new-connection-mark=DNS passthrough=yes port=53 \
protocol=udp
add action=mark-connection chain=postrouting connection-state=new \
new-connection-mark=DNS passthrough=yes port=53 protocol=udp
add action=mark-packet chain=prerouting connection-mark=DNS in-interface=\
ether1 new-packet-mark=DNS-WAN1-In passthrough=no
add action=mark-packet chain=postrouting connection-mark=DNS new-packet-mark=\
DNS-WAN1-Out out-interface=ether1 passthrough=no
add action=mark-packet chain=prerouting comment=DNS-WAN2 connection-mark=DNS \
in-interface=ether1 new-packet-mark=DNS-WAN2-In passthrough=no
add action=mark-packet chain=postrouting comment=DNS-WAN2 connection-mark=DNS \
new-packet-mark=DNS-WAN2-Out out-interface=ether5 passthrough=no
add action=mark-connection chain=prerouting comment=VOIP-WAN1 dscp=46 \
new-connection-mark=VOIP-TCP passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting dscp=46 new-connection-mark=\
VOIP-UDP passthrough=yes protocol=udp
add action=mark-connection chain=prerouting new-connection-mark=VOIP-UDP \
passthrough=yes port=4500 protocol=udp
add action=mark-connection chain=prerouting dscp=26 new-connection-mark=\
VOIP-TCP passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting dscp=26 new-connection-mark=\
VOIP-UDP passthrough=yes protocol=udp
add action=mark-packet chain=prerouting connection-mark=VOIP-TCP \
in-interface=ether1 new-packet-mark=VOIP-TCP-WAN1-In passthrough=no
add action=mark-packet chain=postrouting connection-mark=VOIP-TCP \
new-packet-mark=VOIP-TCP-WAN1-Out out-interface=ether1 passthrough=no
add action=mark-packet chain=prerouting connection-mark=VOIP-UDP \
in-interface=ether1 new-packet-mark=VOIP-UDP-WAN1-In passthrough=no
add action=mark-packet chain=postrouting connection-mark=VOIP-UDP \
new-packet-mark=VOIP-UDP-WAN1-Out out-interface=ether1 passthrough=no
add action=mark-packet chain=prerouting comment=VOIP-WAN2 connection-mark=\
VOIP-TCP in-interface=ether5 new-packet-mark=VOIP-TCP-WAN2-In \
passthrough=no
add action=mark-packet chain=postrouting connection-mark=VOIP-TCP \
new-packet-mark=VOIP-TCP-WAN2-Out out-interface=ether5 passthrough=no
add action=mark-packet chain=prerouting connection-mark=VOIP-UDP \
in-interface=ether5 new-packet-mark=VOIP-UDP-WAN2-In passthrough=no
add action=mark-packet chain=postrouting connection-mark=VOIP-UDP \
new-packet-mark=VOIP-UDP-WAN2-Out out-interface=ether5 passthrough=no
add action=mark-connection chain=prerouting comment=UDP-WAN1 \
connection-state=new new-connection-mark=UDP passthrough=yes protocol=udp
add action=mark-packet chain=prerouting connection-mark=UDP in-interface=\
ether1 new-packet-mark=UDP-WAN1-IN passthrough=no
add action=mark-packet chain=postrouting connection-mark=UDP new-packet-mark=\
UDP-WAN1-Out out-interface=ether1 passthrough=no
add action=mark-packet chain=prerouting comment=UDP-WAN2 connection-mark=UDP \
in-interface=ether5 new-packet-mark=UDP-WAN2-IN passthrough=no
add action=mark-packet chain=postrouting connection-mark=UDP new-packet-mark=\
UDP-WAN2-Out out-interface=ether5 passthrough=no
add action=mark-connection chain=prerouting comment=ICMP-WAN1 \
connection-state=new new-connection-mark=ICMP passthrough=yes protocol=\
icmp
add action=mark-connection chain=postrouting connection-state=new \
new-connection-mark=ICMP passthrough=yes protocol=icmp
add action=mark-packet chain=prerouting connection-mark=ICMP in-interface=\
ether1 new-packet-mark=ICMP-WAN1-In passthrough=no
add action=mark-packet chain=postrouting connection-mark=ICMP \
new-packet-mark=ICMP-WAN1-Out out-interface=ether1 passthrough=no
add action=mark-packet chain=prerouting connection-mark=ICMP in-interface=\
ether5 new-packet-mark=ICMP-WAN2-In passthrough=no
add action=mark-packet chain=postrouting comment=ICMP-WAN2 connection-mark=\
ICMP new-packet-mark=ICMP-WAN2-Out out-interface=ether5 passthrough=no
add action=mark-packet chain=postrouting comment=ACK-WAN1 new-packet-mark=\
ACK-WAN1-Out out-interface=ether1 packet-size=0-123 passthrough=no \
protocol=tcp tcp-flags=ack
add action=mark-packet chain=prerouting in-interface=ether1 new-packet-mark=\
ACK-WAN1-In packet-size=0-123 passthrough=no protocol=tcp tcp-flags=ack
add action=mark-packet chain=postrouting comment=ACK-WAN2 new-packet-mark=\
ACK-WAN2-In out-interface=ether5 packet-size=0-123 passthrough=no \
protocol=tcp tcp-flags=ack
add action=mark-packet chain=prerouting in-interface=ether5 new-packet-mark=\
ACK-WAN2-Out packet-size=0-123 passthrough=no protocol=tcp tcp-flags=ack
add action=mark-connection chain=prerouting comment=HTTP-WAN1 dst-port=\
80,443,8080 new-connection-mark=HTTP passthrough=yes protocol=tcp \
src-address-list=internal-nets
add action=mark-connection chain=prerouting connection-bytes=500000-0 \
connection-mark=HTTP new-connection-mark=HTTP_BIG passthrough=yes \
protocol=tcp
add action=mark-packet chain=prerouting connection-mark=HTTP in-interface=\
ether1 new-packet-mark=HTTP-WAN1-In passthrough=no
add action=mark-packet chain=postrouting connection-mark=HTTP \
new-packet-mark=HTTP-WAN1-Out out-interface=ether1 passthrough=no
add action=mark-packet chain=prerouting connection-mark=HTTP_BIG \
in-interface=ether1 new-packet-mark=HTTP_BIG-WAN1-In passthrough=no
add action=mark-packet chain=postrouting connection-mark=HTTP_BIG \
new-packet-mark=HTTP_BIG-WAN1-Out out-interface=ether1 passthrough=no
add action=mark-packet chain=prerouting comment=HTTP-WAN2 connection-mark=\
HTTP in-interface=ether5 new-packet-mark=HTTP-WAN2-In passthrough=no
add action=mark-packet chain=postrouting connection-mark=HTTP \
new-packet-mark=HTTP-WAN2-Out out-interface=ether5 passthrough=no
add action=mark-packet chain=prerouting connection-mark=HTTP_BIG \
in-interface=ether5 new-packet-mark=HTTP_BIG-WAN2-In passthrough=no
add action=mark-packet chain=postrouting connection-mark=HTTP_BIG \
new-packet-mark=HTTP_BIG-WAN2-Out out-interface=ether5 passthrough=no
add action=mark-connection chain=prerouting comment=OTHER-WAN1 \
connection-mark=no-mark new-connection-mark=OTHER passthrough=yes
add action=mark-packet chain=prerouting connection-mark=OTHER in-interface=\
ether1 new-packet-mark=OTHER-WAN1-In passthrough=no
add action=mark-packet chain=postrouting connection-mark=OTHER \
new-packet-mark=OTHER-WAN1-Out out-interface=ether1 passthrough=no
add action=mark-packet chain=prerouting comment=Other-WAN2 connection-mark=\
OTHER in-interface=ether5 new-packet-mark=OTHER-WAN2-In passthrough=no
add action=mark-packet chain=postrouting connection-mark=OTHER \
new-packet-mark=OTHER-WAN2-Out out-interface=ether5 passthrough=no
/queue tree
add max-limit=512k name=MASTER_DOWN parent=global queue=default
add max-limit=512k name=VOIP-TCP_D packet-mark=VOIP-TCP-WAN1-In parent=\
MASTER_DOWN priority=1 queue=default
add max-limit=128k name=ACK_D packet-mark=ACK-WAN1-In parent=MASTER_DOWN \
priority=2 queue=default
add max-limit=128k name=DNS_D packet-mark=DNS-WAN1-In parent=MASTER_DOWN \
priority=3 queue=default
add max-limit=128k name=UDP_D packet-mark=UDP-WAN1-IN parent=MASTER_DOWN \
priority=4 queue=default
add max-limit=128k name=ICMP_D packet-mark=ICMP-WAN1-In parent=MASTER_DOWN \
priority=5 queue=default
add max-limit=128k name=HTTP_D packet-mark=HTTP-WAN1-In parent=MASTER_DOWN \
priority=6 queue=default
add max-limit=128k name=HTTP_BIG_D packet-mark=HTTP_BIG-WAN1-In parent=\
MASTER_DOWN priority=7 queue=default
add max-limit=128k name=OTHER_D packet-mark=OTHER-WAN1-In parent=MASTER_DOWN \
queue=default
add max-limit=512k name=VOIP-UDP_D packet-mark=VOIP-UDP-WAN1-In parent=\
MASTER_DOWN priority=1 queue=default
add max-limit=128k name=MASTER_UP parent=global queue=default
add max-limit=128k name=VOIP-TCP_U packet-mark=VOIP-TCP-WAN1-Out parent=\
MASTER_UP priority=1 queue=default
add max-limit=64k name=ACK_U packet-mark=ACK-WAN1-Out parent=MASTER_UP \
priority=2 queue=default
add max-limit=64k name=DNS_U packet-mark=DNS-WAN1-Out parent=MASTER_UP \
priority=3 queue=default
add max-limit=64k name=UDP_U packet-mark=UDP-WAN1-Out parent=MASTER_UP \
priority=4 queue=default
add max-limit=64k name=ICMP_U packet-mark=ICMP-WAN1-Out parent=MASTER_UP \
priority=5 queue=default
add max-limit=64k name=HTTP_U packet-mark=HTTP-WAN1-Out parent=MASTER_UP \
priority=6 queue=default
add max-limit=64k name=HTTP_BIG_U packet-mark=HTTP_BIG-WAN1-Out parent=\
MASTER_UP priority=7 queue=default
add max-limit=64k name=OTHER_U packet-mark=OTHER-WAN1-Out parent=MASTER_UP \
queue=default
add max-limit=128k name=VOIP-UDP_U packet-mark=VOIP-UDP-WAN1-Out parent=\
MASTER_UP priority=1 queue=default
add max-limit=512k name=MASTER_DOWN2 parent=global queue=default
add max-limit=128k name=ACK_D2 packet-mark=ACK-WAN2-In parent=MASTER_DOWN2 \
priority=2 queue=default
add max-limit=128k name=DNS_D2 packet-mark=DNS-WAN2-In parent=MASTER_DOWN2 \
priority=3 queue=default
add max-limit=128k name=HTTP_BIG_D2 packet-mark=HTTP_BIG-WAN2-In parent=\
MASTER_DOWN2 priority=7 queue=default
add max-limit=128k name=HTTP_D2 packet-mark=HTTP-WAN2-In parent=MASTER_DOWN2 \
priority=6 queue=default
add max-limit=128k name=ICMP_D2 packet-mark=ICMP-WAN2-In parent=MASTER_DOWN2 \
priority=5 queue=default
add max-limit=128k name=OTHER_D2 packet-mark=OTHER-WAN2-In parent=\
MASTER_DOWN2 queue=default
add max-limit=128k name=UDP_D2 packet-mark=UDP-WAN2-IN parent=MASTER_DOWN2 \
priority=4 queue=default
add max-limit=512k name=VOIP-TCP_D2 packet-mark=VOIP-TCP-WAN2-In parent=\
MASTER_DOWN2 priority=1 queue=default
add max-limit=512k name=VOIP-UDP_D2 packet-mark=VOIP-UDP-WAN2-In parent=\
MASTER_DOWN2 priority=1 queue=default
add max-limit=128k name=MASTER_UP2 parent=global queue=default
add max-limit=64k name=ACK_U2 packet-mark=ACK-WAN2-Out parent=MASTER_UP2 \
priority=2 queue=default
add max-limit=64k name=DNS_U2 packet-mark=DNS-WAN2-Out parent=MASTER_UP2 \
priority=3 queue=default
add max-limit=64k name=HTTP_BIG_U2 packet-mark=HTTP_BIG-WAN2-Out parent=\
MASTER_UP2 priority=7 queue=default
add max-limit=64k name=HTTP_U2 packet-mark=HTTP-WAN2-Out parent=MASTER_UP2 \
priority=6 queue=default
add max-limit=64k name=ICMP_U2 packet-mark=ICMP-WAN2-Out parent=MASTER_UP2 \
priority=5 queue=default
add max-limit=64k name=OTHER_U2 packet-mark=OTHER-WAN2-Out parent=MASTER_UP2 \
queue=default
add max-limit=64k name=UDP_U2 packet-mark=UDP-WAN2-Out parent=MASTER_UP2 \
priority=4 queue=default
add max-limit=128k name=VOIP-TCP_U2 packet-mark=VOIP-TCP-WAN2-Out parent=\
MASTER_UP2 priority=1 queue=default
add max-limit=128k name=VOIP-UDP_U2 packet-mark=VOIP-UDP-WAN2-Out parent=\
MASTER_UP2 priority=1 queue=default