Bandwidth Limitation

Hello,
I configured a 750G to do some bandwidth limitation. Just a small overview over our scenario:
I want the 750G to limit several other routers, that are connected behind it, to limit their bandwidth. I have a 100mbit internet connection and I want to share that among these routers. Router 1 to 10 should get 10mbit, Router 11-15 1mbit.
I followed a instruction I found a few weeks ago and what I did so far is:
Setting up pcq queue types for the speeds (10mbit down, 1mbit up; 1mbit down, 0,1mbit up), setting up queue trees (total download and a subtree entry for 10mbit down, 1mbit down, total upload and a subtree entry for 1mbit up, 0,1mbit up)
After that I used address lists to mark the traffic in firewall / mangle.

The big question now is: Is each Router from 1 to 10 limited to 10mbit or do they have to share 10mbit alltogether?
I’m still not sure about that, I hope someone can help me out,
cheers

Edit:
I tried following this tutorial:
http://mum.mikrotik.com/presentations/CZ09/QoS_Megis.pdf

I’ll add two more informations:
First, it seems like I found the answer for the “big question”. I re-read the tutorial and obviously the 10mbit clients have to share the 10mbit pcq rate, not everyone getting each 10mbit. The reason is the way I use the marking in mangle: I have address lists as sources, one list for each bandwidth. That’s obviously wrong.

Second: That pops up the next question, how can I get what I want? :wink:
Since I read, that I should keep the queue trees and mangle as short as possible, I planed to use address lists. I don’t actually have to use them, but it’d be a lot easier. What I really want is bandwidth limitation per LAN IP. My LAN IP range from 192.168.0.1 to 192.168.0.255 is going to be used like the following: 192.168.0.1 up to 192.169.0.10 no limit, .11 up to .50 10mbit limit, .51 to .75 5mbit limit. I’m not actually using 255 clients (minus broadcast and router, so 253) in that network, I just want to prepare the list this way. I need to limit upload and download as well.

Here are my current settings:

/queue tree
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 max-limit=0 name=Total_download parent=ether3-LAN1-master priority=1                                                                        
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 max-limit=0 name=Total_upload parent=ether1-WAN1-Kabel100 priority=4
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 max-limit=0 name=9mbit_download packet-mark=9mbit_traffic parent=Total_download priority=1 queue=pcq_down_10000k
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 max-limit=0 name=3mbit_download packet-mark=3mbit_traffic parent=Total_download priority=1 queue=pcq_down_3000k
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 max-limit=0 name=0,5mbit_upload packet-mark=3mbit_traffic parent=Total_upload priority=1 queue=pcq_up_300k
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 max-limit=0 name=1mbit_upload packet-mark=9mbit_traffic parent=Total_upload priority=1 queue=pcq_up_1000k

/ip firewall mangle
add action=mark-connection chain=forward comment="3mbit traffic markierung" disabled=no new-connection-mark=3mbit_connections passthrough=yes src-address-list=3mbit                                                 
add action=mark-packet chain=forward comment="" connection-mark=3mbit_connections disabled=no new-packet-mark=3mbit_traffic passthrough=no
add action=mark-connection chain=forward comment="9mbit traffic markierung" disabled=no new-connection-mark=9mbit_connections passthrough=yes src-address-list=9mbit                                                 
add action=mark-packet chain=forward comment="" connection-mark=9mbit_connections disabled=no new-packet-mark=9mbit_traffic passthrough=no

Perhabs that helps to clarify my situation…

That looks about right for what you’re trying to do, as long as your queue types are configured correctly (you aren’t showing those).

Maybe an example helps. Let’s assume a WAN interface named WAN and a LAN interface named LAN. LAN carries 192.168.1.1/24. 192.168.1.0/25 should get 1m down and 512k up, and 192.168.1.128/25 should get 2m down and 768k up.

Note that there are several ways to do this. The below makes sense to me. I don’t use connection marks in simple situations like this - there’s no benefit.

/ip firewall mangle
add chain=forward dst-address=192.168.1.0/25 action=mark-packet new-packet-mark=pm-1m-down
add chain=forward dst-address=192.168.1.128/25 action=mark-packet new-packet-mark=pm-2m-down
add chain=forward src-address=192.168.1.0/25 action=mark-packet new-packet-mark=pm-512k-up
add chain=forward src-address=192.168.1.128/25 action=mark-packet new-packet-mark=pm-768k-up

/queue type 
add kind=pcq name=pcq-1m-down pcq-classifier=dst-address pcq-limit=50 pcq-rate=1000000 pcq-total-limit=2000
add kind=pcq name=pcq-2m-down pcq-classifier=dst-address pcq-limit=50 pcq-rate=2000000 pcq-total-limit=2000
add kind=pcq name=pcq-512k-up pcq-classifier=src-address pcq-limit=50 pcq-rate=512000 pcq-total-limit=2000
add kind=pcq name=pcq-768k-up pcq-classifier=src-address pcq-limit=50 pcq-rate=768000 pcq-total-limit=2000

/queue tree
add name=download parent=LAN
add name=1m-down parent=download limit-at=50m max-limit=100m packet-mark=pm-1m-down queue=pcq-1m-down
add name=2m-down parent=download limit-at=50m max-limit=100m packet-mark=pm-2m-down queue=pcq-2m-down
add name=upload parent=WAN
add name=512k-up parent=upload limit-at=50m max-limit=100m packet-mark=pm-512k-up queue=pcq-512k-up
add name=768k-up parent=upload limit-at=50m max-limit=100m packet-mark=pm-768k-up queue=pcq-768k-up

If you fill out limit-at and max-limit you can use priorities. In that case both types would be guaranteed up to 50m, and based on priority (not set in the example) would get to go to max-limit before the other type. That allows you to prefer certain routers when you’re oversubscribed.

just to reassure:
your sample config gives 1mbit each and everyone out of 192.168.1.0/25? and 2mbit each in 192.168.1.128/25?
If that is the case, then I don’t know, what I did wrong. The only difference I see is that I use address-lists instead of dst-address in mangle.

Here are my queue types:

/queue type
set default kind=pfifo name=default pfifo-limit=50                                                                                                                                                                   
set ethernet-default kind=pfifo name=ethernet-default pfifo-limit=50
set wireless-default kind=sfq name=wireless-default sfq-allot=1514 sfq-perturb=5
set synchronous-default kind=red name=synchronous-default red-avg-packet=1000 red-burst=20 red-limit=60 red-max-threshold=50 red-min-threshold=10
set hotspot-default kind=sfq name=hotspot-default sfq-allot=1514 sfq-perturb=5
add kind=pcq name=pcq_down_3000k pcq-classifier=dst-address pcq-limit=50 pcq-rate=3000000 pcq-total-limit=2000
add kind=pcq name=pcq_down_10000k pcq-classifier=dst-address pcq-limit=50 pcq-rate=10000000 pcq-total-limit=2000
add kind=pcq name=pcq_up_300k pcq-classifier=src-address pcq-limit=50 pcq-rate=300000 pcq-total-limit=2000
add kind=pcq name=pcq_up_1000k pcq-classifier=src-address pcq-limit=50 pcq-rate=1000000 pcq-total-limit=2000

btw: what are the settings above the “add” part? I had it as default settings, didn’t change anything there.

No one who can acknowledge my interpretation of fewis post?

Edit:
I think I found my mistake: I used src-address-list in /ip firewall mangle instead of dst-address-list. Might that be the reason why my badwidth-limitation didn’t really work?

Yes, my example is for per user rate limits due to the PCQ configuration. I don’t know what you did wrong. You didn’t post your address lists so it’s impossible to day. Ore importantly: is it working now?

The settings in queue types that have set instead of add commands are just that, default settings for queues used for other purposes. I’m not sure if hotspot queues are there by default or only when you have configured and active Hotspots. Do you run Hotspots while trying to overlay PCQ? If so none of this will work and you will have to try an entirely different approach.

No, I’m not running any hotspots.
My address-lists are pretty simple:

add address=192.168.88.253 comment="" disabled=no list=5mbit                                                                                                                                                         
add address=192.168.88.254 comment="" disabled=no list=5mbit
add address=192.168.88.252 comment="" disabled=no list=5mbit

That example is of another router actually, but I still think that was not the problem. As I mentioned earlier, I think mixing src-address-list and dst-address-list in the mangle rule was the problem. My test-setup was working fine after changing that.

add action=mark-packet chain=forward comment="" disabled=no new-packet-mark=5mbit_traffic passthrough=yes src-address-list=5mbit

instead of:

add action=mark-packet chain=forward comment="" disabled=no dst-address-list=5mbit new-packet-mark=5mbit_traffic passthrough=yes