Community discussions

MikroTik App
 
User avatar
ufm
Member Candidate
Member Candidate
Topic Author
Posts: 103
Joined: Fri Nov 15, 2013 12:02 pm
Location: Ukraine

My dispute with the Mikrotik support.

Fri Jan 23, 2015 1:16 pm

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
 
User avatar
NathanA
Forum Veteran
Forum Veteran
Posts: 829
Joined: Tue Aug 03, 2004 9:01 am

Re: My dispute with the Mikrotik support.

Fri Jan 23, 2015 1:38 pm

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
 
User avatar
macgaiver
Forum Guru
Forum Guru
Posts: 1764
Joined: Wed May 18, 2005 5:57 pm
Location: Sol III, Sol system, Sector 001, Alpha Quadrant

Re: My dispute with the Mikrotik support.

Fri Jan 23, 2015 1:51 pm

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.
 
User avatar
ufm
Member Candidate
Member Candidate
Topic Author
Posts: 103
Joined: Fri Nov 15, 2013 12:02 pm
Location: Ukraine

Re: My dispute with the Mikrotik support.

Fri Jan 23, 2015 1:55 pm

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
Support motivation:
This is not a problem or a bug. It is how queues work. Neither in simple queues or
in queue tree one traffic stream can go through only one queue. If it does, then
it does not go through another ones. If you create two client connections and want
to send traffic from one client device to another one, then it will go through
only one queue. Second one will not see it.
My opinion: it does not matter - how much queues the traffic passed before. It _should_ pass through "exit" queue.
 
User avatar
ufm
Member Candidate
Member Candidate
Topic Author
Posts: 103
Joined: Fri Nov 15, 2013 12:02 pm
Location: Ukraine

Re: My dispute with the Mikrotik support.

Fri Jan 23, 2015 2:00 pm

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.
I.e. you agree that traffic from 192.168.0.2 to 192.168.0.1 limited by 50M not 10M?
 
User avatar
macgaiver
Forum Guru
Forum Guru
Posts: 1764
Joined: Wed May 18, 2005 5:57 pm
Location: Sol III, Sol system, Sector 001, Alpha Quadrant

Re: My dispute with the Mikrotik support.

Fri Jan 23, 2015 2:06 pm

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! :)
 
User avatar
NathanA
Forum Veteran
Forum Veteran
Posts: 829
Joined: Tue Aug 03, 2004 9:01 am

Re: My dispute with the Mikrotik support.

Fri Jan 23, 2015 2:14 pm

Golden rules of queueing is that traffic can be captured only once per HTB and once per simple queue.
Ahh. That makes sense.
easy - place 50M queue before 10M queue - and it will . I promise! :)
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
 
User avatar
ufm
Member Candidate
Member Candidate
Topic Author
Posts: 103
Joined: Fri Nov 15, 2013 12:02 pm
Location: Ukraine

Re: My dispute with the Mikrotik support.

Fri Jan 23, 2015 2:18 pm

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! :)
PPPoE connection automatic add rule to simple queue and I can not have way say "Hey, always add low speed rules before high speed".
 
User avatar
macgaiver
Forum Guru
Forum Guru
Posts: 1764
Joined: Wed May 18, 2005 5:57 pm
Location: Sol III, Sol system, Sector 001, Alpha Quadrant

Re: My dispute with the Mikrotik support.

Fri Jan 23, 2015 2:20 pm

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.
 
User avatar
ufm
Member Candidate
Member Candidate
Topic Author
Posts: 103
Joined: Fri Nov 15, 2013 12:02 pm
Location: Ukraine

Re: My dispute with the Mikrotik support.

Fri Jan 23, 2015 2:25 pm

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.
 
User avatar
NathanA
Forum Veteran
Forum Veteran
Posts: 829
Joined: Tue Aug 03, 2004 9:01 am

Re: My dispute with the Mikrotik support.

Fri Jan 23, 2015 2:26 pm

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
 
User avatar
macgaiver
Forum Guru
Forum Guru
Posts: 1764
Joined: Wed May 18, 2005 5:57 pm
Location: Sol III, Sol system, Sector 001, Alpha Quadrant

Re: My dispute with the Mikrotik support.

Fri Jan 23, 2015 2:44 pm

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.
 
User avatar
ufm
Member Candidate
Member Candidate
Topic Author
Posts: 103
Joined: Fri Nov 15, 2013 12:02 pm
Location: Ukraine

Re: My dispute with the Mikrotik support.

Fri Jan 23, 2015 5:31 pm

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. :(
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?
 
User avatar
macgaiver
Forum Guru
Forum Guru
Posts: 1764
Joined: Wed May 18, 2005 5:57 pm
Location: Sol III, Sol system, Sector 001, Alpha Quadrant

Re: My dispute with the Mikrotik support.

Mon Jan 26, 2015 9:54 am

http://wiki.mikrotik.com/wiki/Manual:RA ... 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.
 
User avatar
ufm
Member Candidate
Member Candidate
Topic Author
Posts: 103
Joined: Fri Nov 15, 2013 12:02 pm
Location: Ukraine

Re: My dispute with the Mikrotik support.

Mon Jan 26, 2015 11:32 am

http://wiki.mikrotik.com/wiki/Manual:RA ... 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.
 
User avatar
macgaiver
Forum Guru
Forum Guru
Posts: 1764
Joined: Wed May 18, 2005 5:57 pm
Location: Sol III, Sol system, Sector 001, Alpha Quadrant

Re: My dispute with the Mikrotik support.

Mon Jan 26, 2015 2:08 pm

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.
 
User avatar
ufm
Member Candidate
Member Candidate
Topic Author
Posts: 103
Joined: Fri Nov 15, 2013 12:02 pm
Location: Ukraine

Re: My dispute with the Mikrotik support.

Mon Jan 26, 2015 6:51 pm

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!
 
User avatar
ufm
Member Candidate
Member Candidate
Topic Author
Posts: 103
Joined: Fri Nov 15, 2013 12:02 pm
Location: Ukraine

Re: My dispute with the Mikrotik support.

Mon Jan 26, 2015 8:16 pm

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.
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
 
User avatar
macgaiver
Forum Guru
Forum Guru
Posts: 1764
Joined: Wed May 18, 2005 5:57 pm
Location: Sol III, Sol system, Sector 001, Alpha Quadrant

Re: My dispute with the Mikrotik support.

Tue Jan 27, 2015 8:38 am

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

Who is online

Users browsing this forum: Bing [Bot], mquan1984 and 79 guests