Queueing a range of IP's - sharing bandwidth

Hi All,

I am loving the simple queues - I’ve shared a 100mb fibre connection out to clients and that’s working great as they all just have 1 IP from my range.

But one customer has just paid for additional IP’s - 6 from our 14 ip range. I need to give that customer 6 IP’s, and a guaranteed 20mb connection on which to use them.

I wanted to set up a simple queue with a target of 11.11.11.230-11.11.11.235 that would share e.g. 20mb amongst all 6 IP’s in the range - I don’t care how much bandwidth any 1 IP uses, so long as they collectively don’t exceed the limit. Also I want any IP to be able to use all of the assigned bandwidth, and guarantee they will have 20mb.

Just to be clear I don’t want to create a simple queue for each IP, I want them to share.

But I can’t seem to do that, I guess I need to do something with PCQ queues? I have been searching but most people seem to want to do the opposite - tell a whole range of IP’s they can each have 1meg and its hard to try and reverse engineer what they are doing wrong into how I do it right. I’ve looked at the manual section for queues and it suggests marking all the packets, but I’ve read that this is not necessary in another post on here.

Can someone advise me on how to do this?

Thanks,

Guy

*Edited to add - This customer is however connected by their own wire. I have 5 ports on my RB1200, with a wifi AP (for all other customers) in port 1, and ports 2,3,4,5 have port 1 as their master port. This customer is plugged into port 5. Could I do an interface queue on that port 5 and limit them that way to 20mb, and that would cover all their 6 IP’s?

Change to Queue Tree

IP FIREWALL MANGLE

add action=mark-packet chain=forward comment="Download Special" dst-address=11.11.11.230-11.11.11.235 in-interface=Ether1 new-packet-mark="Download Special" passthrough=no
add action=mark-packet chain=forward comment="Download Main" dst-address=11.11.11.0/24 in-interface=Ether1 new-packet-mark="Download Main" passthrough=no
add action=mark-packet chain=forward comment="Upload Special" new-packet-mark="Upload Special" out-interface=Ether1 passthrough=no src-address=11.11.11.230-11.11.11.235
add action=mark-packet chain=forward comment="Upload Main" new-packet-mark="Upload Main" out-interface=Ether1 passthrough=no src-address=11.11.11.0/24

The section above marks traffic and those marks will later define how the traffic will be queue.

QUEUE TYPE

add kind=pcq name=“Unlimited Down” pcq-burst-time=10m pcq-classifier=dst-address pcq-dst-address6-mask=64 pcq-src-address6-mask=64
add kind=pcq name=“Unlimited Up” pcq-burst-time=10m pcq-classifier=src-address pcq-dst-address6-mask=64 pcq-src-address6-mask=64
add kind=pcq name=“Main Down” pcq-burst-rate=10M pcq-burst-threshold=4M pcq-burst-time=30s pcq-classifier=dst-address pcq-dst-address6-mask=64 pcq-rate=5M pcq-src-address6-mask=64
add kind=pcq name=“Main Up” pcq-burst-rate=5M pcq-burst-threshold=2M pcq-burst-time=30s pcq-classifier=src-address pcq-dst-address6-mask=64 pcq-rate=3M pcq-src-address6-mask=64

Above
This defines 4 different types of queues we will use in the queue tree. Your special client has each INDIVIDUAL IP UNLIMITED. While your main clients have each INDIVIDUAL IP LIMITED. Please note I just plugged in numbers for upload and download as a guess… Adjust as needed.

add burst-limit=105M burst-threshold=95M burst-time=30s max-limit=100M name="Core Download" parent=global queue="Unlimited Down"
add burst-limit=25M burst-threshold=18M burst-time=30s max-limit=20M name="Core Upload" parent=global queue="Unlimited Up"
add burst-limit=25M burst-threshold=18M burst-time=10s limit-at=10M max-limit=20M name="Special Down" packet-mark="Download Special" parent="Core Download" priority=8 queue="Unlimited Down"
add burst-limit=6M burst-threshold=4M burst-time=10s limit-at=2M max-limit=5M name="Special Upload" packet-mark="Upload Special" parent="Core Upload" priority=8 queue="Unlimited Up"
add burst-limit=105M burst-threshold=95M burst-time=10s limit-at=90M max-limit=100M name="Main Download" packet-mark="Download Main" parent="Core Download" priority=7 queue="Main Down"
add burst-limit=25M burst-threshold=18M burst-time=10s limit-at=20M max-limit=20M name="Main Upload" packet-mark="Upload Main" parent="Core Upload" priority=7 queue="Main Up"

Above
These are the queues themselves that are applied to the tagged traffic. So the 2 Global Up/Down queue and the 4 Subqueue for your Special Clients up/down as well as main clients up/down.


So first Main Clients have an individual CAP per connection.
While your special client has no individual limit.
Next you main clients as a whole can go up to the Limit of 90M Down… While the Special Client can go up to the Limit of 10M Down…
If Bandwidth is spare Main can go up to its max limit of the FULL 100M… While Special Client if bandwidth is spare can go up to 20M (For all connection)…
Naturally you could change the limits or MAX limits or even priorities to achieve different results.

This type of Queue will give you the most control over your connection.

Please see
http://wiki.mikrotik.com/wiki/Manual:Queues_-_PCQ
for more info

This is great info, I will be trying it today, thanks a lot for such a detailed post!

great

You can also use simple queue

/queue simple
add burst-limit=0/0 burst-threshold=0/0 burst-time=0s/0s direction=both \
    disabled=no interface=all limit-at=0/0 max-limit=20M/20M name=queue1 \
    packet-marks="" parent=none priority=8 queue=default-small/default-sma
    target-addresses="11.11.11.230/32,11.11.11.231/32,11.11.11.232/32,11.1
    233/32,11.11.11.234/32,11.11.11.235/32" total-queue=default-small

queue.jpg

This! More simple and u are already use simple queues

Enviado desde mi XT890 usando Tapatalk 2

These are great replies - thanks that does seem so much simpler, I will probably use that!

I will keep TWS’s reply though as I can see this info will possibly be useful for future projects.

Thanks again

I just tried this and all my queues have disappeared in the GUI? - Webfig and Winbox?!

I can see them in command line and they are still working, how can I get the GUI to show these again? Reboot?

I can’t reboot this router much as its a core router I have to arrange down time.

The unit is an RB1200 on OS 6.0