Quantcast
Channel: MikroTik
Viewing all articles
Browse latest Browse all 22571

General • Re: QoS Hardware Offloading (QoS-HW)

$
0
0
Hi,

Can you tell me shortly, If in Ros 7.15 on ccr2116, it is possible to have per ip down/up shaper in hardware?
for example
1000 subscribers on 10mb/s down/up
800 subscribers on 20mb/s
2000 subscribers on 30mb/s?

Hi, the short answer is - yes, it is possible. But I guess there will be a follow-up question "how?" - that I'll answer a bit later.

Starting from v7.15, RouterOS allows setting per-queue shaper. One option to assign traffic to a queue is by setting a QoS Profile via a Switch Rule.

For simplicity, let's imagine that all clients are connected to sfp-sfpplus1, forwarding all traffic to sfp-sfpplus2. Feel free to expand the example based on your needs.
  1. Create QoS profiles. We can leave the default profile for 10M subscribers, but redirect 20M and 30M subscribers to queue2 and queue3, respectively.
    Code:
    /interface/ethernet/switch/qos/profileadd comment="20M subs" name=tc2 traffic-class=2add comment="30M subs" name=tc3 traffic-class=3
  2. I guess we don't want 30M traffic to completely block 20M and 10M subscribers, so let's schedule all three traffic classes under the same priority group, adjusting the weight based on speed:
    Code:
    /interface/ethernet/switch/qos/tx-manager/queueset [find where traffic-class=1] schedule=low-priority-group weight=1set [find where traffic-class=2] schedule=low-priority-group weight=2set [find where traffic-class=3] schedule=low-priority-group weight=3
  3. Limit egress rate of the respective queues:
    Code:
    /interface/ethernet/switch/qos/portset sfp-sfpplus1,sfp-sfpplus2 egress-rate-queue1=10Mset sfp-sfpplus1,sfp-sfpplus2 egress-rate-queue2=20Mset sfp-sfpplus1,sfp-sfpplus2 egress-rate-queue3=30M
  4. Define ACL rules to match traffic by IP. For example, if all 20M subs are in 192.168.24.0/21subnet, and 30M - 192.168.32.0/21:
    Code:
    /interface/ethernet/switch/ruleadd new-qos-profile=tc2 ports=sfp-sfpplus1 src-address=192.168.24.0/21 switch=switch1add new-qos-profile=tc2 ports=sfp-sfpplus2 dst-address=192.168.24.0/21 switch=switch1add new-qos-profile=tc3 ports=sfp-sfpplus1 src-address=192.168.32.0/21 switch=switch1add new-qos-profile=tc3 ports=sfp-sfpplus2 dst-address=192.168.32.0/21 switch=switch1

Here is the print output for reference:
Code:
[admin@MikroTik] /interface/ethernet/switch/qos/profile> print Flags: H - HW-OFFLOADEDColumns: NAME, PCP, DSCP, TRAFFIC-CLASS, COLOR#   NAME     PCP  DSCP  TRAFFIC-CLASS  COLOR;;; default QoS profile0 H default    0     0              1  green;;; 20M subs1 H tc2        0     0              2  green;;; 30M subs2 H tc3        0     0              3  green[admin@MikroTik] /interface/ethernet/switch/qos/tx-manager/queue> print where hw-offloaded Flags: H - HW-OFFLOADEDColumns: TX-MANAGER, TRAFFIC-CLASS, SCHEDULE, WEIGHT, QUEUE-BUFFERS, USE-SHARED-BUFFERS, SHARED-POOL-INDEX#   TX-MANAGER  TRAFFIC-CLASS  SCHEDULE            WEIGHT  QUEUE-BUFFERS  USE-SHARED-BUFFERS  SHARED-POOL-INDEX1 H default                 1  low-priority-group       1  auto           yes                                 02 H default                 2  low-priority-group       2  auto           yes                                 03 H default                 3  low-priority-group       3  auto           yes                                 0[admin@MikroTik] /interface/ethernet/switch/qos/port> print proplist=name,egress-rate-queue1,egress-rate-queue2,egress-rate-queue3 where name=sfp-sfpplus1 or name=sfp-sfpplus2Columns: NAME, EGRESS-RATE-QUEUE1, EGRESS-RATE-QUEUE2, EGRESS-RATE-QUEUE3# NAME          EGRESS-RATE-QUEUE1  EGRESS-RATE-QUEUE2  EGRESS-RATE-QUEUE30 sfp-sfpplus1  10.0Mbps            20.0Mbps            30.0Mbps          1 sfp-sfpplus2  10.0Mbps            20.0Mbps            30.0Mbps   [admin@MikroTik] /interface/ethernet/switch/rule> print Flags: X - disabled, I - invalid; D - dynamic  0    switch=switch1 ports=sfp-sfpplus1 src-address=192.168.2.0/24 copy-to-cpu=no redirect-to-cpu=no mirror=no       new-qos-profile=tc2 keep-qos-fields=no  1    switch=switch1 ports=sfp-sfpplus2 dst-address=192.168.2.0/24 copy-to-cpu=no redirect-to-cpu=no mirror=no       new-qos-profile=tc2 keep-qos-fields=no  2    switch=switch1 ports=sfp-sfpplus1 src-address=192.168.3.0/24 copy-to-cpu=no redirect-to-cpu=no mirror=no       new-qos-profile=tc3 keep-qos-fields=no  3    switch=switch1 ports=sfp-sfpplus2 dst-address=192.168.3.0/24 copy-to-cpu=no redirect-to-cpu=no mirror=no       new-qos-profile=tc3 keep-qos-fields=no 

P.S. We'll add "/in/eth/sw/qos/port print rates" for more convenient output in RouterOS v7.16.

Statistics: Posted by raimondsp — Mon Jun 03, 2024 1:29 pm



Viewing all articles
Browse latest Browse all 22571

Trending Articles