Queue Tree - Mutiple Wan Interfaces - What Should Be The Parent - MikroTik

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 25

28/10/21 15:40 queue tree - mutiple wan interfaces - what should be the parent ?

- MikroTik

Search…

Search
Quick links
Unanswered topics
Active topics
Search
FAQ
Active topics
Active topics
Forum
Quick links
Unanswered topics
Active topics
Community discussions
Search
FAQ
Active topics
Active topics
Forum
Register
Search… Login
1. 

Announcements

RouterOS

RouterOS v7 BETA
Remember me
Search Beginner
Login Basics
General
Forwarding Protocols
Wireless Networking
Scripting
Virtualization
Useful user articles
Other topics
The Dude
RouterBOARD hardware
The User Manager
SwOS
Training
2. Home
3. Forum index
4. RouterOS
5. General

queue tree - mutiple wan interfaces - what should be the parent ?


 Post Reply

 Print view
Search this topic…


 

https://forum.mikrotik.com/viewtopic.php?t=115711 1/25
28/10/21 15:40 queue tree - mutiple wan interfaces - what should be the parent ? - MikroTik

queue tree - mutiple wan interfaces - what should be the parent ? (#p572761)
Quote (./posting.php?mode=quote&p=572761)
#1 (#p572761)
  (javascript:void(0);)
Thu Dec 15, 2016 10:57 am

ROS 6.7

I have a queue tree with wan1,wan2,wan3 interfaces with packet classifieres priority 1-8.

In my queue tree I have six top(parnet) nodes, up/down per each wanX interface with max-limit set specifically for each wanX interface,

What should be the _parent_ of these top six nodes ?

global ? or interface name, e.g, wan1 for wan1_download, wan2_upload nodes.

Top
 

Re: queue tree - mutiple wan interfaces - what should be the parent ? (#p572793)
Quote (./posting.php?mode=quote&p=572793)
#2 (#p572793)
  (javascript:void(0);)
Thu Dec 15, 2016 2:43 pm

Good question! Some problem. Wan interface for upload streams, lan interface for download stream. Global for input/output chain. But what interface we install in download stream if have
multiple wan with different bandwidth ?? We need create correct mangle for each interface! Mangle for wan1, wan2...???

Sent from my iPhone using Tapatalk

Top
 

Re: queue tree - mutiple wan interfaces - what should be the parent ? (#p572832)
Quote (./posting.php?mode=quote&p=572832)
#3 (#p572832)
  (javascript:void(0);)
Thu Dec 15, 2016 7:09 pm
I guess we have no choice,

If I set top node parent in que tree to 'wan1', the queu tree dont work, there is no average kbs, queue nodes show no averages kbs, as if nothing was going through the queue

only setting parent=global works

Top
 

Re: queue tree - mutiple wan interfaces - what should be the parent ? (#p572852)
Quote (./posting.php?mode=quote&p=572852)
#4 (#p572852)
  (javascript:void(0);)
Thu Dec 15, 2016 9:26 pm

https://forum.mikrotik.com/viewtopic.php?t=115711 2/25
28/10/21 15:40 queue tree - mutiple wan interfaces - what should be the parent ? - MikroTik
Maybe incorrect mangle? Need more info about traffic type, source and dst... You can learn a traffic flow diagram...

Sent from my iPhone using Tapatalk

Top
 

Re: queue tree - mutiple wan interfaces - what should be the parent ? (#p572854)
Quote (./posting.php?mode=quote&p=572854)
#5 (#p572854)
  (javascript:void(0);)
Thu Dec 15, 2016 9:37 pm

interfaces wan1, wan2, wan3

lan interfaces (vlan) admin => wan1, szkola => wan2, ( internat, mieszkania) => wan3

Code: Select all (#)


/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

https://forum.mikrotik.com/viewtopic.php?t=115711 3/25
28/10/21 15:40 queue tree - mutiple wan interfaces - what should be the parent ? - MikroTik
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

https://forum.mikrotik.com/viewtopic.php?t=115711 4/25
28/10/21 15:40 queue tree - mutiple wan interfaces - what should be the parent ? - MikroTik
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

https://forum.mikrotik.com/viewtopic.php?t=115711 5/25
28/10/21 15:40 queue tree - mutiple wan interfaces - what should be the parent ? - MikroTik
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" \

https://forum.mikrotik.com/viewtopic.php?t=115711 6/25
28/10/21 15:40 queue tree - mutiple wan interfaces - what should be the parent ? - MikroTik
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

Top
 

queue tree - mutiple wan interfaces - what should be the parent ? (#p573592)
Quote (./posting.php?mode=quote&p=573592)
#6 (#p573592)
  (javascript:void(0);)
Tue Dec 20, 2016 12:35 pm

Can you attach screenshots of queue tree and mangle from winbox?

Sent from my iPhone using Tapatalk

Top
 

Re: queue tree - mutiple wan interfaces - what should be the parent ? (#p573614)
Quote (./posting.php?mode=quote&p=573614)
#7 (#p573614)
  (javascript:void(0);)
Tue Dec 20, 2016 1:54 pm

Here they come

You do not have the required permissions to view the files attached to this post.

https://forum.mikrotik.com/viewtopic.php?t=115711 7/25
28/10/21 15:40 queue tree - mutiple wan interfaces - what should be the parent ? - MikroTik
Top
 

Re: queue tree - mutiple wan interfaces - what should be the parent ? (#p576694)
Quote (./posting.php?mode=quote&p=576694)
#8 (#p576694)
  (javascript:void(0);)
Mon Jan 09, 2017 3:33 pm
Colleagues, did you find the solution?

I have almost same situation

Top
 

Re: queue tree - mutiple wan interfaces - what should be the parent ? (#p576750)
Quote (./posting.php?mode=quote&p=576750)
#9 (#p576750)
  (javascript:void(0);)
Mon Jan 09, 2017 7:12 pm
> I have almost same situation

namely ?

Top
 

Re: queue tree - mutiple wan interfaces - what should be the parent ? (#p590221)
Quote (./posting.php?mode=quote&p=590221)
#10 (#p590221)
  (javascript:void(0);)
Wed Mar 22, 2017 5:49 pm

me too

Here we have link from 2 ISP

With 1 ISP I used HTB to guarantee bandwidth

Now with 2 ISP link how to make sure band when one of them fall?

Top
 

Re: queue tree - mutiple wan interfaces - what should be the parent ? (#p590225)
Quote (./posting.php?mode=quote&p=590225)
#11 (#p590225)
  (javascript:void(0);)
Wed Mar 22, 2017 5:56 pm

You have to set up a tree for each WAN interface, with each root queue's max-limit set to whatever that ISP's upstream bandwidth actually is.

You can re-use the same packet marks for each queue tree, though, so at least you shouldn't need to make the mangle table even larger.

Top
 

https://forum.mikrotik.com/viewtopic.php?t=115711 8/25
28/10/21 15:40 queue tree - mutiple wan interfaces - what should be the parent ? - MikroTik

Re: queue tree - mutiple wan interfaces - what should be the parent ? (#p611607)
Quote (./posting.php?mode=quote&p=611607)
#12 (#p611607)
  (javascript:void(0);)
Fri Aug 04, 2017 3:41 pm

Thank you for the advice.

Please can you help me with the following:

We have 2 WAN connections load balanced etc.

How do I define the different upload and download speeds for each WAN connections using the Queue Trees? - I understand how to get the Upload limit defined by setting the Interface of each
WAN as the parent of the queue tree, but how would I get the different download speeds recognised by the queue?

Thank you in advance

Top
 

Re: queue tree - mutiple wan interfaces - what should be the parent ? (#p611613)
Quote (./posting.php?mode=quote&p=611613)
#13 (#p611613)
  (javascript:void(0);)
Fri Aug 04, 2017 3:55 pm

2 wans, define 4 queues each parent of global

wan1_upload, wan1_download, wan2_upload, wan2_download

then you can control each queue wanX_down/up limits

here is sample from my 3x wan config

Code: Select all (#)


/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

https://forum.mikrotik.com/viewtopic.php?t=115711 9/25
28/10/21 15:40 queue tree - mutiple wan interfaces - what should be the parent ? - MikroTik
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=\

https://forum.mikrotik.com/viewtopic.php?t=115711 10/25
28/10/21 15:40 queue tree - mutiple wan interfaces - what should be the parent ? - MikroTik
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

Top
 

Re: queue tree - mutiple wan interfaces - what should be the parent ? (#p611691)
Quote (./posting.php?mode=quote&p=611691)
#14 (#p611691)
  (javascript:void(0);)
Sat Aug 05, 2017 8:54 am

Thank you so much


What mangle rules do I need to place?

I have prerouting in-interface=wan1 mark-packet=wan1_upload and

Postrouting in-interface=wan1 mark-packet=wan1_download

Would this be correct?

https://forum.mikrotik.com/viewtopic.php?t=115711 11/25
28/10/21 15:40 queue tree - mutiple wan interfaces - what should be the parent ? - MikroTik
Top
 

Re: queue tree - mutiple wan interfaces - what should be the parent ? (#p611696)
Quote (./posting.php?mode=quote&p=611696)
#15 (#p611696)
  (javascript:void(0);)
Sat Aug 05, 2017 10:11 am
I did mangling in Forward chain both in/out face are available in forward chain.

/ip firewall mangle chain=forward

Top
 

Re: queue tree - mutiple wan interfaces - what should be the parent ? (#p611812)
Quote (./posting.php?mode=quote&p=611812)
#16 (#p611812)
  (javascript:void(0);)
Sun Aug 06, 2017 11:42 am

Would this be right?

Mangle Rules:

Code: Select all (#)


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

https://forum.mikrotik.com/viewtopic.php?t=115711 12/25
28/10/21 15:40 queue tree - mutiple wan interfaces - what should be the parent ? - MikroTik

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

https://forum.mikrotik.com/viewtopic.php?t=115711 13/25
28/10/21 15:40 queue tree - mutiple wan interfaces - what should be the parent ? - MikroTik
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


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


log-prefix=""

https://forum.mikrotik.com/viewtopic.php?t=115711 14/25
28/10/21 15:40 queue tree - mutiple wan interfaces - what should be the parent ? - MikroTik

34 chain=prerouting action=mark-connection new-connection-mark=WAN2_conn passthrough=yes dst-address-type=!local in-interface=LAN per-connection-classifier


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=""


Queue Tree

Code: Select all (#)


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 buck

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

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 b

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

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

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-si

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

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-si

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

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-si

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-si

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-

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-si

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-

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 b

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

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-

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 bucke

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

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 b

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 buck

https://forum.mikrotik.com/viewtopic.php?t=115711 15/25
28/10/21 15:40 queue tree - mutiple wan interfaces - what should be the parent ? - MikroTik

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-si

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-si

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

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-
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-

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 bucke

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-si

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

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

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

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-

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-

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=

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 bucke

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 bucke

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 buc

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-

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=

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=
Thank you so much

Top
 

Re: queue tree - mutiple wan interfaces - what should be the parent ? (#p611860)
Quote (./posting.php?mode=quote&p=611860)
#17 (#p611860)
  (javascript:void(0);)
Sun Aug 06, 2017 8:39 pm

give it a try, I am poor in mapping export rules to behaviour

Top

https://forum.mikrotik.com/viewtopic.php?t=115711 16/25
28/10/21 15:40 queue tree - mutiple wan interfaces - what should be the parent ? - MikroTik
 

Re: queue tree - mutiple wan interfaces - what should be the parent ? (#p611950)
Quote (./posting.php?mode=quote&p=611950)
#18 (#p611950)
  (javascript:void(0);)
Mon Aug 07, 2017 8:28 am
I have run it yesterday, everything is mapped only to upload on the WAN1 queue

Top
 

Re: queue tree - mutiple wan interfaces - what should be the parent ? (#p611981)
Quote (./posting.php?mode=quote&p=611981)
#19 (#p611981)
  (javascript:void(0);)
Mon Aug 07, 2017 11:09 am
Show winbox screens as in post 7, make sure you have showing columns as in post 7.

Top
 

Re: queue tree - mutiple wan interfaces - what should be the parent ? (#p611985)
Quote (./posting.php?mode=quote&p=611985)
#20 (#p611985)
  (javascript:void(0);)
Mon Aug 07, 2017 11:18 am

Here they are, thank you

You do not have the required permissions to view the files attached to this post.
Top
 

Re: queue tree - mutiple wan interfaces - what should be the parent ? (#p611992)
Quote (./posting.php?mode=quote&p=611992)
#21 (#p611992)
  (javascript:void(0);)
Mon Aug 07, 2017 11:32 am

For now simplify, remove 3rd level of nodes (ack, dns...),

I dont think you need 3rd level, at all, see post 7

leave only two levels

In top nodes (one that is parent to global) you must specify max limit

Child nodes should have max limit < parent max limit.

what ROS version do you have ?

I am running 6.7, there were changes to packet flow between between ROS versions.

https://forum.mikrotik.com/viewtopic.php?t=115711 17/25
28/10/21 15:40 queue tree - mutiple wan interfaces - what should be the parent ? - MikroTik
Top
 

Re: queue tree - mutiple wan interfaces - what should be the parent ? (#p611994)
Quote (./posting.php?mode=quote&p=611994)
#22 (#p611994)
  (javascript:void(0);)
Mon Aug 07, 2017 11:34 am

Running V6.40.1

Top
 

Re: queue tree - mutiple wan interfaces - what should be the parent ? (#p612001)
Quote (./posting.php?mode=quote&p=612001)
#23 (#p612001)
  (javascript:void(0);)
Mon Aug 07, 2017 11:52 am

Would I have to jump in the forward chain all the 3rd level children so that the queues will pick it up properly?

Top
 

Re: queue tree - mutiple wan interfaces - what should be the parent ? (#p612004)
Quote (./posting.php?mode=quote&p=612004)
#24 (#p612004)
  (javascript:void(0);)
Mon Aug 07, 2017 11:56 am

You must not have two nodes in queue tree with the same packet mark.

When you marking packets in the mangle, make the INTERFACE (w.g, wan1,wan2), DIRECTION (up, down) part of the mark name, this way easier to catch mistakes in the queueu tree.

Top
 

Re: queue tree - mutiple wan interfaces - what should be the parent ? (#p612007)
Quote (./posting.php?mode=quote&p=612007)
#25 (#p612007)
  (javascript:void(0);)
Mon Aug 07, 2017 12:01 pm

Would I have to jump in the forward chain all the 3rd level children so that the queues will pick it up properly?

I dont understand that

For now try to simplify the rules till you get up/down rate control working, then you can fine tune with more rules/categories.

Top
 

https://forum.mikrotik.com/viewtopic.php?t=115711 18/25
28/10/21 15:40 queue tree - mutiple wan interfaces - what should be the parent ? - MikroTik

Re: queue tree - mutiple wan interfaces - what should be the parent ? (#p612009)
Quote (./posting.php?mode=quote&p=612009)
#26 (#p612009)
  (javascript:void(0);)
Mon Aug 07, 2017 12:13 pm

Like this?

You do not have the required permissions to view the files attached to this post.
Top
 

Re: queue tree - mutiple wan interfaces - what should be the parent ? (#p612020)
Quote (./posting.php?mode=quote&p=612020)
#27 (#p612020)
  (javascript:void(0);)
Mon Aug 07, 2017 1:42 pm

I suspect the new flows will only work with Postrouting and input chains?

You do not have the required permissions to view the files attached to this post.
Top
 

Re: queue tree - mutiple wan interfaces - what should be the parent ? (#p612029)
Quote (./posting.php?mode=quote&p=612029)
#28 (#p612029)
  (javascript:void(0);)
Mon Aug 07, 2017 2:07 pm
flow you quoted is for bridged mode, you are using routed mode (lan + wan(s))

In case of UDP download (VOIP video streams) you cannot control anything, even if you reject the UDP packet the bandwidth is already wasted, the sender will not slow down the rate of UDP
packets (as it would in case of TCP stream) because there is no ACKs and sliding window in UDP.

that is why you must count UDP downloads (wan1_download_udp) with priority 1 and assign it a max download value for the interface.

Top
 

Re: queue tree - mutiple wan interfaces - what should be the parent ? (#p612048)
Quote (./posting.php?mode=quote&p=612048)
#29 (#p612048)
  (javascript:void(0);)
Mon Aug 07, 2017 3:39 pm

I think I have it sorted.

I set this up on my spare router and the queues seem to be working now based on the Interface.

ether1 is the new WAN interface

You do not have the required permissions to view the files attached to this post.
Top

https://forum.mikrotik.com/viewtopic.php?t=115711 19/25
28/10/21 15:40 queue tree - mutiple wan interfaces - what should be the parent ? - MikroTik
 

Re: queue tree - mutiple wan interfaces - what should be the parent ? (#p612061)
Quote (./posting.php?mode=quote&p=612061)
#30 (#p612061)
  (javascript:void(0);)
Mon Aug 07, 2017 4:05 pm

You must not have two nodes in queue tree with the same packet mark.

say mark "DNS", if QT sees "DNS" mark, how will it decide if it belongs to master UP or Down queue ?

Top
 

Re: queue tree - mutiple wan interfaces - what should be the parent ? (#p612064)
Quote (./posting.php?mode=quote&p=612064)
#31 (#p612064)
  (javascript:void(0);)
Mon Aug 07, 2017 4:08 pm

You must not have two nodes in queue tree with the same packet mark.

say mark "DNS", if QT sees "DNS" mark, how will it decide if it belongs to master UP or Down queue ?

I have changed it to DNS-WAN1-Down and then DNS-WAN1-Up

Thank you

Top
 

Re: queue tree - mutiple wan interfaces - what should be the parent ? (#p612067)
Quote (./posting.php?mode=quote&p=612067)
#32 (#p612067)
  (javascript:void(0);)
Mon Aug 07, 2017 4:23 pm

This is how I achieved this:

Mangle Rules:

Code: Select all (#)


/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=\

https://forum.mikrotik.com/viewtopic.php?t=115711 20/25
28/10/21 15:40 queue tree - mutiple wan interfaces - what should be the parent ? - MikroTik
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=\

https://forum.mikrotik.com/viewtopic.php?t=115711 21/25
28/10/21 15:40 queue tree - mutiple wan interfaces - what should be the parent ? - MikroTik
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

https://forum.mikrotik.com/viewtopic.php?t=115711 22/25
28/10/21 15:40 queue tree - mutiple wan interfaces - what should be the parent ? - MikroTik

Queue Tree:

Code: Select all (#)


/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 \

https://forum.mikrotik.com/viewtopic.php?t=115711 23/25
28/10/21 15:40 queue tree - mutiple wan interfaces - what should be the parent ? - MikroTik
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


Thank you for all your assistance !

Top
 

Re: queue tree - mutiple wan interfaces - what should be the parent ? (#p612069)
Quote (./posting.php?mode=quote&p=612069)
#33 (#p612069)
  (javascript:void(0);)
Mon Aug 07, 2017 4:29 pm

Post #28 viewtopic.php?f=2&t=115711&p=612064#p612029 (https://forum.mikrotik.com/viewtopic.php?f=2&t=115711&p=612064#p612029)

you cannot throttle UDP packets in download direction !!!!

once they (UDP download packets) get to the router they have already consumed the bandwidth !!!,

even if you DROP them in firewall rules they will keep consuming the download bandwidth !

The only way to throttle them so they dont consume your download bandwith is to throttle at ISP router, imposibility in almost all cases.

throwing them out is useless and corrupts correct download queue average, makes qt think there is more bandwidth available than really is becuase if it throws out those UDP packets it thinks
that the bandwidth by those packets was not consumed, but it was !!!

mark/mangle all download UDP packets with wan1_udp_down

https://forum.mikrotik.com/viewtopic.php?t=115711 24/25
28/10/21 15:40 queue tree - mutiple wan interfaces - what should be the parent ? - MikroTik
and make these packets top priority node with max limit equal to that of the parent max limit.

for example,

say download on wan1 is 500kbs, a remote computer sends 500kbs UDP packets to your router (voice stream),

there is no way in QT to lower the priority of these UDP packets to slow down the rate they arrive to your router, so they arrive after high priority packets, the UDP incoming stream of packets
competes with other packets (tcp, icmp, ...), at your ISP router, all you can do is to keep track of how much bandwith they (UDP packets) consume so the QT can control remaining (TCP
streams) using remaining bandwith

Top
Display posts from previous: All posts All posts
Sort by Post time Post time Ascending Ascending

 Post Reply

 Print view

 Who is online
Users browsing this forum: Ahrefs [Bot], Baidu [Spider], Bing [Bot], flapviv, jaxed8, Majestic-12 [Bot], steen and 32 guests
1. 
Announcements
RouterOS
RouterOS v7 BETA
Beginner Basics
General
Forwarding Protocols
Wireless Networking
Scripting
Virtualization
Useful user articles
Other topics
The Dude
RouterBOARD hardware
The User Manager
SwOS
Training
2. Home
3. Forum index
4. RouterOS
5. General
 Delete cookies
 Delete cookies
Powered by phpBB® Forum Software © phpBB Limited
Design by SlickThemes
 

 
×


https://forum.mikrotik.com/viewtopic.php?t=115711 25/25

You might also like