/interface/ethernet/switch/port> print stats
name: sfp-sfpplus1 sfp-sfpplus2 sfp-sfpplus3 sfp-sfpplus4 sfp-sfpplus5 sfp-sfpplus6 sfp-sfpplus7 sfp-sfpplus8 ether1 switch1-cpu
driver-rx-byte: 0 452 976 691 0 0 0 0 0 1 086 224 642 130 375
driver-rx-packet: 0 773 965 0 0 0 0 0 945 811 689
driver-tx-byte: 0 1 188 556 474 0 0 0 0 0 453 023 932 39 675
driver-tx-packet: 0 1 055 283 0 0 0 0 0 675 260 214
rx-bytes: 0 527 365 820 0 0 0 0 0 1 369 898 664 137 181 0
rx-too-short: 0 0 0 0 0 0 0 0 0 0
rx-too-long: 0 0 0 0 0 0 0 0 0 0
rx-unicast: 0 912 412 0 0 0 0 0 1 185 318 7 0
rx-broadcast: 0 1 120 0 0 0 0 0 1 218 209 0
rx-pause: 0 0 0 0 0 0 0 0 0 0
rx-multicast: 0 7 748 0 0 0 0 0 1 908 518 0
rx-error-events: 0 0 0 0 0 0 0 0 0 0
rx-fcs-error: 0 0 0 0 0 0 0 0 0 0
rx-fragment: 0 0 0 0 0 0 0 0 0 0
rx-overflow: 0 0 0 0 0 0 0 0 0 0
rx-jabber: 0 0 0 0 0 0 0 0 0 0
tx-bytes: 0 1 473 609 464 0 0 0 0 0 523 059 415 40 531 0
tx-unicast: 0 1 295 077 0 0 0 0 0 818 688 12 0
tx-broadcast: 0 115 0 0 0 0 0 3 99 0
tx-pause: 0 0 0 0 0 0 0 0 0 0
tx-multicast: 0 1 967 0 0 0 0 0 2 103 0
tx-underrun: 0 0 0 0 0 0 0 0 0 0
tx-collision: 0 0 0 0 0 0 0 0 0 0
tx-late-collision: 0 0 0 0 0 0 0 0 0 0
tx-drop: 0 0 0 0 0 0 0 0 0 0
tx-rx-64: 0 39 293 0 0 0 0 0 101 104 63 0
tx-rx-65-127: 0 714 147 0 0 0 0 0 432 308 101 0
tx-rx-128-255: 0 71 389 0 0 0 0 0 152 504 647 0
tx-rx-256-511: 0 29 741 0 0 0 0 0 23 809 137 0
tx-rx-512-1023: 0 26 816 0 0 0 0 0 19 827 0 0
tx-rx-1024-max: 0 1 337 053 0 0 0 0 0 1 277 585 0 0
tx-queue0-packet: 0 1 297 159 0 0 0 0 0 807 319 214 0
tx-queue1-packet: 0 0 0 0 0 0 0 11 374 0 0
tx-queue2-packet: 0 0 0 0 0 0 0 0 0 0
tx-queue3-packet: 0 0 0 0 0 0 0 0 0 0
tx-queue4-packet: 0 0 0 0 0 0 0 0 0 0
tx-queue5-packet: 0 0 0 0 0 0 0 0 0 0
tx-queue6-packet: 0 0 0 0 0 0 0 0 0 0
tx-queue7-packet: 0 0 0 0 0 0 0 0 0 0
i was tracking that for a while, now we know this is realI noticed the CRS309 has 8 hardware TX queues (tx-queue0-packet) but I didn't see how to classify traffic to use each queue.
The current implementation is for QoS Phase 1 - QoS Marking (introduced in RouterOS v7.10).
Greetings, fellow community members!
We are glad to announce the beginning of a new project - Quality of Service Hardware Offloading (QoS-HW), introduced in RouterOS v7.10. The goal of the project is to perform QoS packet marking (VLAN PCP, IP DSCP, and in the future - MPLS EXP), traffic shaping, congestion avoidance/resolution, lossless forwarding, etc. - on the hardware level, which, in turn, means near-to-wire-speed performance.
Documentation: https://help.mikrotik.com/docs/pages/vi ... =189497483
The target devices are those based on Marvell Prestera® DX switch chips: MikroTik CRS3xx, CRS5xx series, CCR2116, and CCR2216. In other words, the devices that support L3HW will eventually support QoS-HW.
We are currently at the beginning of the project: RouterOS v7.10 can perform QoS packet marking on the hardware level. Other QoS features are still in development. The documentation will be available shortly. I'll put the link here once ready.
Your feedback is more than welcome! Please share your vision of QoS enforcement in RouterOS, use-cases, and setups. While the project is in the Beta phase, it is very flexible to adjust to community demand. Also, our QA engineers would like to perform QoS testing based on real setups rather than artificial test cases.
This topic will be updated with recent info regarding QoS HW.
/interface ethernet switch qos map
add name=classify
/interface ethernet switch qos profile
add dscp=8 name=scavanger
add name=best-effort priority=1
add name=class1 priority=1
add name=class2 priority=2
add name=class3 priority=3
add name=class4 priority=4
add name=class5 priority=5
add name=class6 priority=6
add name=class7 priority=7
/interface ethernet switch qos map vlan
add qos-map=classify qos-profile=scavanger
add priority=1 qos-map=classify qos-profile=class1
add priority=2 qos-map=classify qos-profile=class2
add priority=3 qos-map=classify qos-profile=class3
add priority=4 qos-map=classify qos-profile=class4
add priority=5 qos-map=classify qos-profile=class5
add priority=6 qos-map=classify qos-profile=class6
add priority=7 qos-map=classify qos-profile=class7
/interface ethernet switch qos map ip
add dscp=0 qos-map=classify qos-profile=best-effort
add dscp=2 qos-map=classify qos-profile=class1
add dscp=4 qos-map=classify qos-profile=class1
add dscp=6 qos-map=classify qos-profile=class1
add dscp=8 qos-map=classify qos-profile=scavanger
add dscp=10 qos-map=classify qos-profile=scavanger
add dscp=12 qos-map=classify qos-profile=class1
add dscp=14 qos-map=classify qos-profile=class1
add dscp=16 qos-map=classify qos-profile=class1
add dscp=18 qos-map=classify qos-profile=class2
add dscp=20 qos-map=classify qos-profile=class2
add dscp=22 qos-map=classify qos-profile=class2
add dscp=24 qos-map=classify qos-profile=class2
add dscp=26 qos-map=classify qos-profile=class3
add dscp=28 qos-map=classify qos-profile=class3
add dscp=30 qos-map=classify qos-profile=class3
add dscp=32 qos-map=classify qos-profile=class3
add dscp=34 qos-map=classify qos-profile=class3
add dscp=36 qos-map=classify qos-profile=class4
add dscp=38 qos-map=classify qos-profile=class4
add dscp=40 qos-map=classify qos-profile=class4
add dscp=42 qos-map=classify qos-profile=class4
add dscp=44 qos-map=classify qos-profile=class4
add dscp=46 qos-map=classify qos-profile=class5
add dscp=48 qos-map=classify qos-profile=class5
add dscp=50 qos-map=classify qos-profile=class5
add dscp=52 qos-map=classify qos-profile=class5
add dscp=54 qos-map=classify qos-profile=class5
add dscp=56 qos-map=classify qos-profile=class6
add dscp=58 qos-map=classify qos-profile=class7
add dscp=60 qos-map=classify qos-profile=class7
add dscp=62 qos-map=classify qos-profile=class7
/interface/ethernet/switch
port/set sfp-sfpplus1 qos-map=classify qos-trust-l2=keep qos-trust-l3=keep
port/set sfp-sfpplus2 qos-map=classify qos-trust-l2=keep qos-trust-l3=keep
...
Hello, this is interesting news. Are there plans to use the new feature for dynamic queues, e.g. with a PPPoE server on a CCR2216?
Thanks
Hello,Hello, this is interesting news. Are there plans to use the new feature for dynamic queues, e.g. with a PPPoE server on a CCR2216?
Thanks
Maybe not this hardware, but actually some of the SoC do implement PPPoE hardware offloading, as it is a common use case for consumer routers.aditionally i am not sure PPPoE Server can benefit of L3 Hardware Offload at all
If only MikroTik would do that themselves. I.e. finish the unfinished features in v7 before starting a new one.P.S. Please stay on the topic!
that's great news. Thanks for the information.Using hardware QoS for bandwidth limitation is a natural next step for the project, so the feature will likely be implemented in the future. However, the current goals must be met first. The main goal of QoS HW is to provide lossless audio/video switching and (together with L3HW) routing at near-to-wire-speed rates. However, we want to think "out of the box" and make QoS HW as flexible as possible to cover a wider range of possible usage scenarios.
don't know if this could be supported but it would be great if we could prioritize traffic based on TCP/UDP port.
# NOT IMPLEMENTED YET! IT MAY BE A SUBJECT TO CHANGE.
/interface/ethernet/switch/rule add protocol=tcp dst-port=1337 qos-profile=my-prioritized-traffic
Is this for thePort settings
...
By default, ports are untrusted and receive the lowest (0, best-effort) priority, where priority fields are cleared from the egress packets.
dscp
priority
dscp=8
refer to the PCP value or the priority (as unlike higher values in the case of the first two PCP values of 0 and 1 these don't match)?QoS Profile
...
priority (integer: 0..7; Default: 0) - VLAN priority value (IEEE 802.1q PCP - Priority Code Point). ...
First of all thanks for the documentation @raimondsp . Upon checking it I have come across a thing that would be great if clarified:
inIs this for thePort settings
...
By default, ports are untrusted and receive the lowest (0, best-effort) priority, where priority fields are cleared from the egress packets.or theCode: Select alldscp
parameter? As in neither case marks 0 the lowest priority since in case of RFC4594 DiffServ Service Classes (DSCP)Code: Select allpriority
should mark the lowest priority (CS1 Low-Priority Data which is below DF (CS0) Standard in the pecking order). In case of Priority Code Point (PCP) governed by 802.1Q-2022 (IEEE Standard for Local and Metropolitan Area Networks--Bridges and Bridged Networks) currently the lowest priority 0 (for background traffic) has PCP value 1 and the default PCP value 0 is for the one notch higher (priority 1) best effort traffic. So is the above quoted part of the documentation refers to PCP or DSCP?Code: Select alldscp=8
If the above refers to PCP, than PCP value or PCP defined priority as it does make difference since PCP value 0 has priority 1, while PCP value 1 has priority 0.
If the above refers to DSCP, than the same question rises: does it refer to the value, in which case 0 has higher priority (DF (CS0)) than 8 (CS1)?
While we are at it in the same documentation regarding the PCP values therefer to the PCP value or the priority (as unlike higher values in the case of the first two PCP values of 0 and 1 these don't match)?QoS Profile
...
priority (integer: 0..7; Default: 0) - VLAN priority value (IEEE 802.1q PCP - Priority Code Point). ...
Thanks in advance for the explanation (and for clearing this up in the documentation).
/interface/ethernet/switch/qos/profile add name=lowest-priority priority=1 dscp=8
/interface/ethernet/switch/port set ether1 qos-profile=lowest-priority
/interface/ethernet/switch/print
Columns: NAME, TYPE, L3-HW-OFFLOADING, QOS-HW-OFFLOADING
# NAME TYPE L3-HW-OFFLOADING QOS-HW-OFFLOADING
0 switch1 Marvell-98DX3255 no no
[admin@router1] > /interface/ethernet/switch/print detail
Flags: I - invalid
0 name="switch1" type=Marvell-98DX3255 mirror-source=none mirror-target=none mirror-egress-target=none l3-hw-offloading=no qos-hw-offloading=no
[admin@router1] > /interface/ethernet/switch/port print detail
Flags: I - invalid
0 name="sfp1.lan" switch=switch1 storm-rate=100 limit-unknown-unicasts=no limit-unknown-multicasts=no limit-broadcasts=yes l3-hw-offloading=yes qos-profile=default qos-map=default qos-trust-l2=ignore qos-trust-l3=ignore
1 name="sfp2.wan1" switch=switch1 storm-rate=100 limit-unknown-unicasts=no limit-unknown-multicasts=no limit-broadcasts=yes l3-hw-offloading=yes qos-profile=default qos-map=default qos-trust-l2=ignore qos-trust-l3=ignore
2 name="sfp-sfpplus3" switch=switch1 storm-rate=100 limit-unknown-unicasts=no limit-unknown-multicasts=no limit-broadcasts=yes l3-hw-offloading=yes qos-profile=default qos-map=default qos-trust-l2=ignore qos-trust-l3=ignore
3 name="sfp-sfpplus4" switch=switch1 storm-rate=100 limit-unknown-unicasts=no limit-unknown-multicasts=no limit-broadcasts=yes l3-hw-offloading=yes qos-profile=default qos-map=default qos-trust-l2=ignore qos-trust-l3=ignore
4 name="ether1.wan2" switch=switch1 storm-rate=100 limit-unknown-unicasts=no limit-unknown-multicasts=no limit-broadcasts=yes l3-hw-offloading=yes qos-profile=default qos-map=default qos-trust-l2=ignore qos-trust-l3=ignore
5 name="ether2" switch=switch1 storm-rate=100 limit-unknown-unicasts=no limit-unknown-multicasts=no limit-broadcasts=yes l3-hw-offloading=yes qos-profile=default qos-map=default qos-trust-l2=ignore qos-trust-l3=ignore
6 name="ether3" switch=switch1 storm-rate=100 limit-unknown-unicasts=no limit-unknown-multicasts=no limit-broadcasts=yes l3-hw-offloading=yes qos-profile=default qos-map=default qos-trust-l2=ignore qos-trust-l3=ignore
7 name="ether4" switch=switch1 storm-rate=100 limit-unknown-unicasts=no limit-unknown-multicasts=no limit-broadcasts=yes l3-hw-offloading=yes qos-profile=default qos-map=default qos-trust-l2=ignore qos-trust-l3=ignore
8 name="ether5" switch=switch1 storm-rate=100 limit-unknown-unicasts=no limit-unknown-multicasts=no limit-broadcasts=yes l3-hw-offloading=yes qos-profile=default qos-map=default qos-trust-l2=ignore qos-trust-l3=ignore
9 name="ether6" switch=switch1 storm-rate=100 limit-unknown-unicasts=no limit-unknown-multicasts=no limit-broadcasts=yes l3-hw-offloading=yes qos-profile=default qos-map=default qos-trust-l2=ignore qos-trust-l3=ignore
10 name="ether7" switch=switch1 storm-rate=100 limit-unknown-unicasts=no limit-unknown-multicasts=no limit-broadcasts=yes l3-hw-offloading=yes qos-profile=default qos-map=default qos-trust-l2=ignore qos-trust-l3=ignore
11 name="ether8" switch=switch1 storm-rate=100 limit-unknown-unicasts=no limit-unknown-multicasts=no limit-broadcasts=yes l3-hw-offloading=yes qos-profile=default qos-map=default qos-trust-l2=ignore qos-trust-l3=ignore
12 name="ether9" switch=switch1 storm-rate=100 limit-unknown-unicasts=no limit-unknown-multicasts=no limit-broadcasts=yes l3-hw-offloading=yes qos-profile=default qos-map=default qos-trust-l2=ignore qos-trust-l3=ignore
13 name="ether10" switch=switch1 storm-rate=100 limit-unknown-unicasts=no limit-unknown-multicasts=no limit-broadcasts=yes l3-hw-offloading=yes qos-profile=default qos-map=default qos-trust-l2=ignore qos-trust-l3=ignore
14 name="ether11" switch=switch1 storm-rate=100 limit-unknown-unicasts=no limit-unknown-multicasts=no limit-broadcasts=yes l3-hw-offloading=yes qos-profile=default qos-map=default qos-trust-l2=ignore qos-trust-l3=ignore
15 name="ether12" switch=switch1 storm-rate=100 limit-unknown-unicasts=no limit-unknown-multicasts=no limit-broadcasts=yes l3-hw-offloading=yes qos-profile=default qos-map=default qos-trust-l2=ignore qos-trust-l3=ignore
16 name="switch1-cpu" switch=switch1 storm-rate=100 limit-unknown-unicasts=no limit-unknown-multicasts=no limit-broadcasts=yes
/interface/ethernet/switch/rule/print detail
Flags: X - disabled, I - invalid; D - dynamic
0 X ;;; orange dhcp4 COS6
switch=switch1 ports=sfp2.wan1 mac-protocol=ip vlan-id=832 protocol=udp dst-port=67 copy-to-cpu=no redirect-to-cpu=no mirror=no new-vlan-priority=6
1 X ;;; orange dhcp6 COS6
switch=switch1 ports=sfp2.wan1 mac-protocol=ipv6 vlan-id=832 protocol=udp dst-port=547 copy-to-cpu=no redirect-to-cpu=no mirror=no new-vlan-priority=6
2 X ;;; orange icmp6 COS6 (fe00::/7 = fe80::/10 + ff02::/16)
switch=switch1 ports=sfp2.wan1 mac-protocol=ipv6 vlan-id=832 protocol=icmp dst-address6=fe00::/7 copy-to-cpu=no redirect-to-cpu=no mirror=no new-vlan-priority=6
3 X ;;; orange arp COS6
switch=switch1 ports=sfp2.wan1 mac-protocol=arp vlan-id=832 copy-to-cpu=no redirect-to-cpu=no mirror=no new-vlan-priority=6
Thanks.
Do i need to enable on the switch ?
/interface/ethernet/switch/set l3-hw-offloading=yes
Does my current switch rules will work or do i need to rewrite them ?
thanks
I am interested to know this too.is a little off topic but i have the following question:
is MikroTik considering in the long term to have some Eggress ACL (switch rules) support on CRS Switches ?
NoI'm wondering as well, does this QoS-HW mean fq-codel traffic shaping in hardware as opposed to a CPU only thing?
Cheers
Paul
In general I prefer bql + cake split evenly between all hardware tx queues vs QoS & diffserv applied this way because it leverages the scarcest resource, CPU. diffserv is a fiddly distraction compared to aqm and fq in the first place. A little diffserv on top of that can help, but first you gotta keep the queues short and the packets well mixed.QoS-HW is compatible with L3HW. You can use both features together.
Every supported device has 8 TX queues per port, and users will be able to assign QoS profiles to TX queues: either grant a QoS profile exclusive access to a queue or share a queue (or group of queues) between multiple profiles. The feature is still in development and not available yet. Meanwhile, all QoS profiles share all TX queues, i.e., there is no QoS enforcement yet.
It never worked.Hello,
I don't know if it related or not. Sorry if i made a mistake to post here.
I am currently using switch rules on a CRS305 in front of CCR2116 tp change COS on DHCP (ipv6 ipv4) requests. These DHCP requests with COS 6 are a requirement to authenticate to my ISP.
I decided to remove the CRS305 and use only the CCR2116. Of course i moved the switch rules from the CRS305 to the CCR.
But the rules do not work at all. Switch rules to change COS are never applied.
I am not sure, but i think i have understand that the switch are applied to ingress traffic, not egress. I my case, the DHCP client requests are of course egress from the CCR to my ISP.
Am i right or i make a mistake ?
Is there a workaround to change COS for DHCP egress requests ?
thanks.