Question about simple queues

Hello
This is my scenario.

RB750GL 5.21 with two interfaces, say WAN and LAN.

WAN: 172.16.0.0/23
LAN: 172.16.10.0/24
I have a lot of simple queue with target addess ex.

172.16.10.1 4M/4M
172.16.10.2 4M/256k etc

These queues work as expected.

I would like to create a TOP queue that doesnt limit traffic from a specific subnet to the “LAN” side, ignoring the specified queue.

Example:

traffic FROM 1.1.1.1/24 to 172.16.10.0/24 should be UNLIMITED
traffic from !1.1.1.1/24 to 172.16.10.0/24 should be limited by the specified queue (a queue for each ip address)

How can I achieve this?

thank you

You have to use mangle in firewall. Mark packets in mangle, and then use that packet-mark in the simple queue.

add a simple queue with destination address of 1.1.1.1

/queue simple
add dst-address=1.1.1.0/24 name="example" priority=1 queue=default/default total-queue=default

Hello.
It doesnt work as expected.

I have a list of simple queues,
Dest address 192.168.10.5 (example). limited to 256K/2M
they have default priority of 8

I have created a new simple queue:
priority 1
dest address 172.16.0.0/23 (wan side of network)
unlimited

I made a transfer from 192.168.10.5 to 172.16.0.200/23 and
the traffic is currently limited at the vaules of simple queue to 192.168.10.5

Use mangle facility in ROS. Mark the connection:

/ip firewall mangle
add chain=forward src-addres=192.168.10.5 dst-address=172.16.0.0/23 action=mark-packet new-packet-mark=whatever

Then use the packet mark in the queue. Also, keep in mind that simple queues are executed in their order, so the queue for this particular connection should be in top of the queue that is already limiting 192.168.10.5

Hello.
Thank you for your answer.
I really like to understand better the queues.

My target is to have all the LAN subnet 192.168.10.0/24 to be unlimited in traffic to/from 172.16.0.0/23 (wan side of the router) but limitet do any other destination (internet access).

What do you mean on top of the queue?

I have a bunch of simple queues:
ex.

192.168.10.1 limit to 256k/2M
192.168.10.2 limit to 256k/1M and so on

In that case you just substitute the ip 192.168.10.5 with 192.168.10.0/24 in the example I gave previously.
Simple queues do have a number, you can see that number in terminal or winbox as well. This number indicates their order in the simple queue table. Packets are run through each simple queue until it finds the one that deals with it, and after that leaves the queues. So, the queue that is not limiting the specific traffic from 192.168.10.0/24 to 172.16.0.0/23 must have a lower number than the queue that limits 192.168.10.5 (on top of it, or before it)

Check this for more http://wiki.mikrotik.com/wiki/Manual:Queue#Simple_Queues

wowowow it works!
I didnt consider the position on queue.

THANK YOU A LOT! :smiley: