Traffic shaping

Hello. I need help with dynamic bandwidth setting. I have three networks and I need dynamic balance 3Mbit traffic between, if there is no load on network, 3Mbit can be granted to one network, but if there is more active networks, minimal bandwidth (fifty fifty) will be granted, so no one network can eat all bandwidth, if there is another active network. So minimal rate per network will be guaranteed 1Mbit, maximal rate will be 3MBit on network, when other two will not be downloading. When two networks will be downloading, they get 1.5MBit (3 divide by 2) every. Next I have one cable with internet where ISP router is connected. Actually this three cables are connected over switch. I have one Mikrotik router special only for traffic shaping, so I want connect this three cables:

Ether 1: cable with Internet, gateway A.A.A.249 and B.B.B.1
Ether 2: cable with A.A.A.248/29
Ether 3: cable with B.B.B.2/32 and B.B.B.3/32

I need do shaping between A.A.A.248/29 and B.B.B.2/32 and B.B.B.3/32.

My idea is follow (I need help if it is right):

Do bridge on Ether2 and Ether3, default route to Ether1. (Or I can bridge ALL ports without routing? I read it is not possible do dynamic shaping if I use switch mode)
Mark packets with prerouting and src and dst addresses.
Create queue tree with 3Mbit max limit, and 3 threes with 1Mibt max limit (Or can I do with simple queues?)

Thank you for help, if my procedure is right.

Hello, I did some experiments and I did some test setup for two networks (one is public IP address and second is public subnet, I want balance subnet as unit, not per IP in subnet).
What I need is - IP vs whole subnet is fifty fifty balanced if both will use bandwidth.

  1. Please can you verify if my setup is right?
  2. Please can you specify if RB750G is enought hardware? There will be 20 rows in queue tree in final (10 downloads, 10 uploads) and there is 60 users hidden behind this 10 networks. I don’t want balance single users hidden after IP or subnet, but there is 60 users, and I need know if it affects hardware requirements.
    Thank you very much for help.
/queue type
add kind=pcq name="PCQ Download" pcq-classifier=dst-address
add kind=pcq name="PCQ Upload" pcq-classifier=src-address

/queue tree
add max-limit=7M name=Download parent=global queue=default
add name="51dn" packet-mark=51dn parent=Download queue="PCQ Download"
add name="52dn" packet-mark=52dn parent=Download queue="PCQ Download"

add max-limit=7M name=Upload parent=global queue=default
add name="51up" packet-mark=51up parent=Upload queue="PCQ Upload"
add name="52up" packet-mark=52up parent=Upload queue="PCQ Upload"

/ip firewall mangle
add action=mark-packet chain=prerouting dst-address=1.1.1.1 new-packet-mark=51dn passthrough=no
add action=mark-packet chain=prerouting dst-address=2.2.2.2/24 new-packet-mark=52dn passthrough=no

add action=mark-packet chain=prerouting src-address=1.1.1.1 new-packet-mark=51up passthrough=no
add action=mark-packet chain=prerouting src-address=2.2.2.2/24 new-packet-mark=52up passthrough=no

Hi all, when one line of PCQ tree is under fully load, and I’m connected over second line of PCQ tree, my internet connection is slower, delayed etc. so it’s not perfect balanced. What parameter can I adjust to get fluent connection on my tree line although another PCQ line is under heavy load? Thank you.