ICMP download queue priority on Router OS V6

Hello Everyone,

I’ve read a lot about queues and i have tried a lot of configurations trying to achieve my goal: avoid any delay/timeout on pings made by the router itself when the link is congested by LAN traffic. Since there was a change on V6 where they remove global-in, global-out, global-total and just add “global” in a different possition i’m really confused and i’m not 100% sure if the mangle rules i’m using are correct. What i have done is this:

Mangle:

ICMP Upload: Chain output → protocol: icmp (request) → new-mark: icmp-up (also have tried with postrouting and src-address=“router address”)
ICMP Download: Chain input → protocol: icmp (reply) → new-mark: icmp-down (also tryied with prerouting dst-address=“router address”)

ALL Traffic Upload: Chain Forward → input interfacet: LAN → output interface: WAN1 → new-mark: all-up (also have tried with postrouting and src-address !=“router address”)
ALL Traffic Download: Chain Forward → input interfacet: WAN1 → output interface: LAN → new-mark: all-down (also tryied with prerouting and dst-address !=“router address”)



Queue:

Parent Download: Limit-At and Max-limit: 10 M
Child: ICMP-download, Limit-At and Max- limit 512k, Priority 1
Child2: All-Download, Limit-At 9M and Max- limit 10M, Priority 8

Parent Upload: Limit-At and Max-limit: 10 M
Child: ICMP-Upload, Limit-At and Max- limit 512k, Priority 1
Child2: All-Upload, Limit-At 9M and Max- limit 10M, Priority 8

I have tested the same rules but marking all the router traffic (BTest traffic) so when i do a bandwidth test uploading, the queue gives the priority to the router traffic even without specifying max-limit or limit-at, but when i try to do the same for download it doesn’t work. i can’t even start the Btest. So i think that’s why is also not working for icmp, the thing is that icmp traffic is so low that i need to test it with something else.

This is my test scenario

Download (Laptop1 perspective): Laptop1 (iperf Server) <----10M only link-- Mikrotik (BT client, receive) <—10M only link— Laptop2 (iperf client, BTest Server) //// BTest couldn’t start, disconnected message.

Upload (Laptop1 perspective): Laptop1 (iperf client) --10M only link–> Mikrotik (BT client, send) —10M only link–> Laptop2 (iperf server, BTest Server) ////// Works OK, BTest takes all the bandwidth even when iperf traffic was at 100% (10M, 9.7 real)

Any help will be appreciated.

I haven’t thoroughly considered your situation, but one thing that jumps off the page at me is the fact that your limit-at is set to 10M on the data download queue.
Limit-At is better thought of as “guaranteed minimum”

So if you add up the limit-at values of the child queues, and this total is larger than the max-limit on the parent queue, then things don’t work right because you’ve guaranteed more bandwidth than there is actually available to give. Suppose the parent max-limit is 10m and the sum of the child queues is 12m. The parent queue will actually allow 12m in this case because you’ve guaranteed that much. Priority only has any effect between queues which are running above their limit-at guarantee. This is most likely why your priority scheme is failing. Try reducing the limit-at value on the data queue to 9m or 8m. The queue may go faster than limit-at (up to max-limit or burst-limit if bursting is configured), but only if there is bandwidth actually available. Any queue below its limit-at value will take priority over any queue above its limit-at value, regardless of priority.

Another simple fix would be to just remove the limit-at value from the data queue entirely, leaving it only on the ICMP queue.

Thanks a lot ZeroByte, i just fixed that in the first post… it was a typing mistake i forgot to put 9M. This is the configuration i really used:

Parent Download: Limit-At and Max-limit: 10 M
Child: ICMP-download, Limit-At and Max- limit 512k, Priority 1
Child2: All-Download, Limit-At 9M and Max- limit 10M, Priority 8

Parent Upload: Limit-At and Max-limit: 10 M
Child: ICMP-Upload, Limit-At and Max- limit 512k, Priority 1
Child2: All-Upload, Limit-At 9M and Max- limit 10M, Priority 8

This config worked ok for upload but not for download. The only way i can get it work is setting All-Download Max-limit to 9M, so icmp can take the remaining bandwidth, but that is not the way it is supposed to work right?.



Thanks.

Doing download QoS on a device that’s south of the bottleneck may not always be effective because the traffic has already had to go through the bottleneck before it reaches your router for classification. Basically, the ISP has probably already discarded the ICMP due to maxed bandwidth in the other traffic going through your connection, and the ISP has no reason to prioritize any traffic such as ICMP, so it just discards packets as they exceed the bandwidth.

When you hard-set a limit on your side that is below the circuit’s capacity, then this allows you to start throttling traffic before it reaches the point where the ISP’s router will, which is why that works.