My dispute with the Mikrotik support.

Hi!

Dear community. Please, help solve who wrong - I or mikrotik support.

This configuration:

(A client) → PPPoE → MikrtoikRouter ← PPPoE ← (B client).

Client A have limitation of speed (limit-at and max-limit) - 50M
Client B have limitation of speed (limit-at and max-limit) - 10M

Client A send data to client B.

I think that the rate should be limited to 10M, because client B have limit to 10M.
Mikrotik support think - rate should be limited to 50M, because client A have limit 50M.

Who wrong?

P.S. Ticket#2015010666000658

I have to agree with you, and I am kind of surprised you received that response. Unless I am missing something, it would be expected that the queue with the most constraints wins.

Imagine instead that this were the scenario:

(A client) -> PPPoE -- [50M] -> MikroTik Router 1 --- 1Gb Ethernet --- MikroTik Router 2 <- [10M] -- PPPoE <- (B client)

…you would not expect client B to get 1Gbit/s to MikroTik Router 1, and you would not expect client A to get 1Gbit/s to MikroTik Router 2.

– Nathan

Golden rules of queueing is that traffic can be captured only once per HTB and once per simple queue.

so if you have
target=192.168.0.1/32 limit-at=10M/10M max-limit=10M/10M
target=192.168.0.2/32 limit-at=50M/50M max-limit=50M/50M

so if traffic goes between 192.168.0.1 and 192.168.0.2
all traffic will be captured by queue closest to the top - 10M upload and download passes - rest are dropped.

Swap queues and all traffic will be captured by 50M queue.

It is the way it works, and insist it must remains this way - or else it would break all my prioritization setups that is based on exclusion.

Support motivation:

My opinion: it does not matter - how much queues the traffic passed before. It should pass through “exit” queue.

I.e. you agree that traffic from 192.168.0.2 to 192.168.0.1 limited by 50M not 10M?

easy - place 50M queue before 10M queue - and it will . I promise! :slight_smile:

Ahh. That makes sense.

I am sure the problem is that these queues are being dynamically created by RADIUS response attributes. You can’t influence what order your customers are going to connect to you in.

– Nathan

PPPoE connection automatic add rule to simple queue and I can not have way say “Hey, always add low speed rules before high speed”.

Have a separate static simple queue for all local traffic target=192.168.0.0/24 dst=192.168.0.0/24 in very first position and none of local traffic will ever reach dynamic queues.
You can place any limits or queue types there you need - i have mine on SFQ with unrealistic limits of 1G, somehow it works best for me.

I have two BRAS with about 1500 PPPoE connection on each.
Your solution is not for my problem.

Was it always this way, even before “target-addresses” and “interface” were combined into “target” in ROS 6? I thought it used to be once per interface per simple queue?

– Nathan

Packet flow diagram. packet can be capture once per “box”
it is been so since 2.8 when i started to use RouterOS.

one static queue in the beginning was just an example, to suggest thinking about another approach.

there are default/automatic behaviour and then there are custom requirements, you can’t get both together.
If you need something to work other than default way - make a custom setup.

Move to Queue tree , packet-marks and dynamic address-lists from RADIUS, one address-list per connection speed, than you will be manually specify what speed is more improtant than other.

customer A - 10M/10M
customer B - 50M/50M
customer C - 100M/100M

I do not understand how to use the address-list make needed to me functionality. :frowning:
From customer “C”, for example, speed to “outside” should be 100M, to customer “B” - 50M, to customer “A” - 10M
From customer “B” - to “outside” and to “C” - 50M and 10M to “A”
Can you help to me and push me to true direction?

http://wiki.mikrotik.com/wiki/Manual:RADIUS_Client/vendor_dictionary
USE this: ATTRIBUTE Mikrotik-Address-List 19 string

Make sure that you have address lists for every speed:
USERS_100
USERS_50
USERS_10

every time user logs in Dynamic entry will appear in coresponding address lists.

Then use these address lists in mangle to mark packets both for upload and download.

Then use these marks in queue tree - use one PCQ queue for every speed.

I know how to make address list. I know how to mark packets. I do not understand how to build need rules of queue tree.

I mark packet from users_100. But packet coming to users_10. I can’t mark packet twice (as 100 and as 10). Packet can pass through queue only one time, as I understand. How to distinguish between the situation where packet coming from users_100 to users_10 and the situation where packet coming from users_100 to outside?

That’s what I do not understand.

IT depends on your policy - if 50Mbps client download from 10Mbps, should it get 10 or 50Mbps?

IF 50Mbps then mark 50Mbps client traffic before 10Mbps client traffic, this way you will be able to reach 50Mbps,
If 10Mbps then mark 50Mpbs client traffic after 10Mbps client traffic, this way this traffic will be limited to 10Mbps.

I have all the more difficult, but I get the idea. Thank you!

Hi!

Sorry, but I’m still not understand.

Example: I have 2 customers with 50M limits and 2 customers with 100M limit.

What should a tree-queue to:

  1. Traffic from/to any of 100M customer newer be greater 100M
  2. Traffic from/to any of 50M customer newer be greater 50M

Ok. I mark traffic to 50M as mark_50, and traffic to 100M as mark_100.

Now, 100M customer send packets to two 50M customers and one 100M customer.
As I understand - one packet pass through queue 50M of first customer, one packet pass through queue 50M of second customer and third packet pass through 100M of third customer. But no one packet do not pass through queue 100M of sender customer (packet pass only trough one queue). And sender will send data with 200M speed.

If I will send packets of sender first in his queue - I get situation like have now.

I’m not understand. Help me, please.

WBR,
Fyodor

There can be only one packet-mark on packet.

So you need to build your mangle in the way that there are no re-marks, if packet have a mark already, then don’t mark it again
(in simple terms all rules will have (use “no-mark” packet mark to check)

If it is done whatever will be marked first will by priority over other. So if 50Mb users will be before 10M users, traffic between them will be marked as 50M