...
- QoS - Quality of Service.
- ACL - Access Control List, a set of switch rules used to filter network traffic based on specified criteria.
- AQM - Active Queue Management.
- DSCP - Differentiated Services Code Point, a 6-bit field in the IP header used to prioritize network traffic.
- ECN - Explicit Congestion Notification.
- PCP - Priority Code Point, a 3-bit field in the VLAN header used to prioritize traffic within a VLAN.
- PFC - Priority-based Flow Control (IEEE 802.1Qbb).
- RoCE - RDMA over Converged Ethernet.
- WRED - Weighted Random Early Detection.
/in/eth/sw/
a shortcut for/interface/ethernet/switch/
. The shortcut works in CLI, too.
...
Model | Switch Chip | QoS Profiles | QoS Maps | Tx Managers | WRED | ECN | PFC Profiles 3 | Port/Queue Usage Stats |
---|---|---|---|---|---|---|---|---|
CCR2116-12G-4S+ | 98DX3255 | 1024 | 12 | 15 | ✔ | ✔ | 8 | Unreliable 1 |
CCR2216-1G-12XS-2XQ | 98DX8525 | 1024 | 12 | 15 | ✔ | ✔ | 8 | Max fill 2 |
CRS305-1G-4S+ | 98DX3236 | 128 | 1 | 8 | - | Current values | ||
CRS309-1G-8S+ | 98DX8208 | 1024 | 12 | 15 | ✔ | ✔ | 8 | Unreliable |
CRS310-1G-5S-4S+ | 98DX226S | 128 | 1 | 8 | - | Current values | ||
CRS312-4C+8XG | 98DX8212 | 1024 | 12 | 15 | ✔ | ✔ | 8 | Unreliable |
CRS317-1G-16S+ | 98DX8216 | 1024 | 12 | 15 | ✔ | ✔ | 8 | Unreliable |
CRS318-1Fi-15Fr-2S | 98DX224S | 128 | 1 | 8 | - | Current values | ||
CRS318-16P-2S+ | 98DX226S | 128 | 1 | 8 | - | Current values | ||
CRS326-24G-2S+ | 98DX3236 | 128 | 1 | 8 | - | Current values | ||
CRS326-24S+2Q+ | 98DX8332 | 1024 | 12 | 15 | ✔ | ✔ | 8 | Unreliable |
CRS328-24P-4S+ | 98DX3236 | 128 | 1 | 8 | - | Current values | ||
CRS328-4C-20S-4S+ | 98DX3236 | 128 | 1 | 8 | - | Current values | ||
CRS354-48G-4S+2Q+ | 98DX3257 | 1024 | 12 | 15 | ✔ | ✔ | 8 | Unreliable |
CRS504-4XQ | 98DX4310 | 1024 | 12 | 15 | ✔ | ✔ | 8 | Max fill |
CRS510-8XS-2XQ | 98DX4310 | 1024 | 12 | 15 | ✔ | ✔ | 8 | Max fill |
CRS518-16XS-2XQ | 98DX8525 | 1024 | 12 | 15 | ✔ | ✔ | 8 | Max fill |
1 Due to hardware limitations, some switch chip models may break traffic flow while accessing QoS port/queue usage data.
2 The device gathers max queue fill statistics instead of displaying the current usage values. Use the reset-counters command to reset those stats.
3 The devices without PFC profiles do not support Priority-based Flow Control.
Applications and Usage Examples
...
The behavior is controlled via WRED marginsthresholds. WRED margin threshold is the distance to the queue/pool buffer limit (cap) - where a random packet drop begins. A different margin threshold can be applied to queues that use or don't use shared buffers. A queue that uses a shared pool may set a bigger WRED margin threshold due to a higher overall cap (queue buffers + shared pool). RouterOS automatically chooses the actual WRED margin threshold values according to queue or shared pool capacities. The user may shift the margins thresholds in one way or another via QoS Settings.
For example, if queue1-packet-cap=96, and WRED margin threshold is 32 32 (assuming use-shared-buffers=no), then:
...
When WRED is enabled (wred=yes), the queue cap is rounded to the applied WRED margin. In the above example, setting wred-queue-margin=64 raises queue1-packet-cap to 128. That, in turn, may lower the resources available to other queues, such as shared buffers. A much safer option is to raise wred-shared-queue-margin which may reduce the shared buffers available for the affected queue but not the shared pool itself. For example, if: "wred-shared-queue-margin=256, use-shared-buffers=yes, wred=yes, shared-pool-index=0, queue2-packet-cap=30, and shared-pool0-packet-cap=900", queue2 can use up to 768 buffers (30+900=930, rounded down by the scale of 256), and WRED starting at 512, while the other ports/queues still may use the remaining 162 buffers (30+900-768) of the shared pool.
Choosing a WRED margin threshold value is a tradeoff between congestion anticipation and burst absorption. Setting a higher WRED margin threshold may lead to earlier traffic rate throttling and, therefore, resolve congestion. On the other hand, a high margin threshold leads to packet drops in limited traffic bursts that could be absorbed by the queue buffers and transformed losslessly if WRED didn't kick in. For instance, initiating a remote database connection usually starts with heavier traffic ("packet burst") at the initialization phase; then, the traffic rate drops down to a "reasonable" level. Any packet drop during the initialization phase leads to nothing but a slower database connection due to the need for retransmission. Hence, lowering the WRED margin threshold or entirely disabling WRED on such traffic is advised. The opposite case is video streaming. Early congestion detection helps select a comfortable streaming rate without losing too much bandwidth on retransmission or/and "overshooting" by sacrificing the quality level by too much.
...
Set ecn=yes in Tx Manager to enable ECN marking. The per-queue ECN setting is unavailable due to hardware limitations. ECN and WRED share the same queue fill threshold: wred-shared-queue-marginthreshold (see QoS Settings).
Warning |
---|
ECN marking mechanism requires the respective Tx queues to use shared buffers (use-shared-buffers=yes). |
...
- The packet is either IPv4 or IPv6.
- The ECN field value in IP header is either ECT(1) or ECT(0).
- Egress port's Tx Manager has ecn=yes.
- The assigned Tx Queue uses shared buffers (use-shared-buffers=yes).
- The Tx Queue detects congestion via WRED margins threshold.
Anchor
...
pfc
pfc |
...
pfc
pfc |
...
Switch QoS settings (in addition to the existing ones).
...
Info |
---|
When you enable QoS, turning off the qos-hw-offloading setting will not completely revert to the previous functionality. It is recommended to reboot the device after disabling it. |
Port settings
...
Priority-based Flow Control (PFC)
Priority-Based Flow Control (PFC) provides lossless operation for up to eight traffic classes, so that congestion in one traffic class does not pause other traffic classes. In addition, PFC enables co-existence of loss-sensitive traffic types with loss tolerant traffic type in the same network.
PFC-capable switch chips are complaint with IEEE 802.1Qbb PFC, meaning that the respective devices are capable of generating and responding to PFC frames. On the triggering part, the PFC frame is sent by the source port and traffic class experiencing the congestion. The timer values of the generated PFC frames are 0xFFFF for pause (XOFF) and 0x0 for resume (XON), and the appropriate bit in the priority enable vector is set. On the response part, the received PFC frame pauses the specific priority queues on the port that received the PFC frame for the duration specified by the PFC frame.
In RouterOS, PFC configuration is organized in profiles, where each port can be assigned to a specific profile. A PFC profile defines the traffic classes to enable PFC on, pause/resume thresholds to send XOFF/XON PFC frames, respectively, and whenever the assigned ports should transmit or/and receive PFC frames.
While congestion occurs on egress ports, PFC is triggered on the ingress port. Shared buffers must be used to associate the amount of ingressed traffic with the respective packets waiting in Tx queues. For each PFC-enabled traffic class, set use-shared-buffers=yes to the respective Tx Queues. It is also recommended that a separate shared pool (shared-pool-index) be used for each PFC-enabled queue, especially not to mix it with PFC-disabled traffic classes.
Info |
---|
RouterOS implements 1:1 mapping between traffic classes and Tx queues. Packets with assigned traffic class 0 get enqueued in queue0, TC1 - queue1, etc., up to TC7-Q7. Hence, the terms "traffic class" and "tx queue" are used interchangeably in this text. |
When choosing pause and resume thresholds, consider a delay in transmitting a PFC frame and processing it by the other side. For example, device A experienced congestion at time T, transmitted a PFC pause frame to device B, and B processed the frame and halted transmission at time T+D. During the delta time D, device B still kept sending traffic. If device A has configured the pause threshold to 100%, it has no free buffers available, and, therefore, packets may drop, which is unacceptable for lossless traffic classes. Lowering the pause threshold, let's say, down to 80% issues a PFC pause frame while still having free memory to accumulate trafic during the delta time D. The same applies to resume threshold. Setting it to 0% keeps the device idle during the delta time, lowering the overall throughput.
Property Reference
Switch settings
Sub-menu:/interface/ethernet/switch
Switch QoS settings (in addition to the existing ones).
Property | Description |
---|---|
qos-hw-offloading (yes | no; Default: no) | Allows enabling QoS for the given switch chip (if the latter supports QoS). |
Info |
---|
When you enable QoS, turning off the qos-hw-offloading setting will not completely revert to the previous functionality. It is recommended to reboot the device after disabling it. |
Port settings
Sub-menu:/interface/ethernet/switch/qos/port
Info |
---|
Starting from RouterOS v7.13, QoS port settings moved from |
Switch port QoS settings. Assigns a QoS profile to ingress packets on the given port. The assigned profile can be changed via match rules if the port is considered trusted.
By default, ports are untrusted and receive the default QoS profile (Best-Effort, PCP=0, DSCP=0), where priority fields are cleared from the egress packets.
Property | Description |
---|---|
egress-rate-queue0 .. egress-rate-queue7 (integer: 0..18446744073709551615; Default !egress-rate-queuex) | Sets egress traffic limitation (bits per second) for specific output queue. It is possible to specify the limit using suffixes like k, M, or G to represent kbps, Mbps, or Gbps. This setting can be combined with the overall per-port limit egress-rate (see /in/eth/sw/port ). |
map (name; Default: default) | Allows user-defined QoS priority-to-profile mapping in the case of a trusted port or host (see /in/eth/sw/qos/map ). |
pfc (name; Default: disabled) | The name of the PFC profile to control ingress priority-based traffic flow (see /in/eth/sw/qos/priority-flow-control ). |
profile (name; Default: default) | The name of the QoS profile to assign to the ingress packets by default (see /in/eth/sw/qos/profile ). |
trust-l2 (ignore | trust | keep; Default: ignore) | Whenever to trust the Layer 2 headers of the incoming packets (802.1p PCP field):
|
trust-l3 (ignore | trust | keep; Default: ignore) | Whenever to trust the Layer 3 headers of the incoming packets (IP DSCP field):
|
tx-manager (name; Default: default) | The name of the Transmission Manager that is responsible for enqueuing and transmitting packets from the given port (see |
Info |
---|
L3 trust mode has higher precedence than L2 unless trust-l3=ignore or the packet does not have an IP header. |
Info |
---|
Forwarded/routed packets obtain priority field values (PCP, DSCP) from the selected QoS profile, overwriting the original values unless the respective trust mode is set to keep. |
Commands.
Command | Description |
---|---|
Print the above properties in a human-friendly format. | |
print stats | Print port statistics: total and per-queue transmitted/dropped packets/bytes. |
reset-counters | Reset all counters in port statistics to zero. |
print usage | Print queue usage/resources. |
print pfc | Pring Priority Flow Control stats |
Port Stats
Code Block | ||||
---|---|---|---|---|
| ||||
[admin@Mikrotik] /interface/ethernet/switch/qos/port> print stats where name=ether2
name: ether2
tx-packet: 2 887
tx-byte: 3 938 897
drop-packet: 1 799
drop-byte: 2 526 144
tx-queue0-packet: 50
tx-queue1-packet: 1 871
tx-queue3-packet: 774
tx-queue5-packet: 192
tx-queue0-byte: 3 924
tx-queue1-byte: 2 468 585
tx-queue3-byte: 1 174 932
tx-queue5-byte: 291 456
drop-queue1-packet: 1 799
drop-queue1-byte: 2 526 144 |
Property | Description |
---|---|
name | Port name. |
tx-packet | The total number of packets transmitted via this port. |
tx-byte | The total number of bytes transmitted via this port. |
drop-packet | The total number of packets should have been transmitted via this port but were dropped due to a lack of resources (e.g., queue buffers) or QoS Enforcement. |
drop-byte | The total number of bytes should have been transmitted via this port but were dropped. |
tx-queue0-packet .. tx-queue7-packet | The number of packets transmitted via this port from the respective queue. |
tx-queue0-byte .. tx-queue7-byte | The number of bytes transmitted via this port from the respective queue. |
drop-queue0-packet .. drop-queue7-packet | The number of packets dropped from the respective queue (or not enqueued at all due to lack of resources). |
drop-queue0-byte .. drop-queue7-byte | The number of bytes dropped from the respective queue. |
Port Resources/Usage
Warning |
---|
Due to hardware limitations, some switch chip models may break traffic flow while accessing QoS port |
Info |
---|
Starting from RouterOS v7.13, QoS port settings moved from |
Switch port QoS settings. Assigns a QoS profile to ingress packets on the given port. The assigned profile can be changed via match rules if the port is considered trusted.
By default, ports are untrusted and receive the default QoS profile (Best-Effort, PCP=0, DSCP=0), where priority fields are cleared from the egress packets.
...
Whenever to trust the Layer 2 headers of the incoming packets (802.1p PCP field):
- ignore - ignore L2 header; use the port's profile value for all incoming packets;
- trust - use PCP field of VLAN-tagged packets for QoS profile lookup in map. Untagged packets use the port's profile value. Forwarded VLAN or priority-tagged packets receive the PCP value from the selected QoS profile (overwriting the original value).
- keep - trust but keep the original PCP value in forwarded packets.
...
Whenever to trust the Layer 3 headers of the incoming packets (IP DSCP field):
- ignore - ignore L3 header; use either L2 header or the port's profile (depends on trust-l2).
- trust - use DSCP field of IP packets for QoS profile lookup in map. Forwarded/routed IP packets receive the DSCP value from the selected QoS profile (overwriting the original value).
- keep - trust but keep the original DSCP value in forwarded/routed packets.
...
The name of the Transmission Manager that is responsible for enqueuing and transmitting packets from the given port (see /in/eth/sw/qos/tx-manager
).
Info |
---|
L3 trust mode has higher precedence than L2 unless trust-l3=ignore or the packet does not have an IP header. |
Info |
---|
Forwarded/routed packets obtain priority field values (PCP, DSCP) from the selected QoS profile, overwriting the original values unless the respective trust mode is set to keep. |
Commands.
...
Code Block | ||||
---|---|---|---|---|
| ||||
[admin@Mikrotikadmin@crs326] /interface/ethernet/switch/qos/port> print statsusage where name=ether2 name: ether2 packet-cap: ether2 136 txpacket-packetuse: 2 8875 txbyte-bytecap: 35 3840 938 897 dropbyte-packetuse: 9 1 799472 queue0-packet-cap: 130 dropqueue0-packet-byteuse: 2 526 144 1 txqueue1-queue0packet-packetcap: 505 tx-queue1-packet-use: 1 8714 tx-queue3-packet-cap: 77465 txqueue3-queue5packet-packetuse: 1922 tx-queue0-byte-cap: 3 92424 576 txqueue0-queue1byte-byteuse: 2 468 585256 txqueue1-queue3byte-bytecap: 1 1747 932680 txqueue1-queue5byte-byteuse: 6 291144 456 dropqueue3-queue1byte-packetcap: 1 79914 080 dropqueue3-queue1byte-byteuse: 2 5263 144072 |
Property | Description |
---|---|
name | Port name. |
tx-packet | The total number of packets transmitted via this port. |
tx-byte | The total number of bytes transmitted via this port. |
drop-packet | The total number of packets should have been transmitted via this port but were dropped due to a lack of resources (e.g., queue buffers) or QoS Enforcement. |
drop-byte | The total number of bytes should have been transmitted via this port but were dropped. |
tx-queue0-packet .. tx-queue7-packet | The number of packets transmitted via this port from the respective queue. |
tx-queue0-byte .. tx-queue7-byte | The number of bytes transmitted via this port from the respective queue. |
drop-queue0-packet .. drop-queue7-packet | The number of packets dropped from the respective queue (or not enqueued at all due to lack of resources). |
drop-queue0-byte .. drop-queue7-byte | The number of bytes dropped from the respective queue. |
Port Resources/Usage
...
packet-cap | Port's packet capacity. The maximum number of packets that can be enqueued for transmission via the port. |
packet-use 1 | Port's packet usage. The number of packets that are currently enqueued in all port's queues. |
byte-cap | Port's byte capacity (buffer size). The maximum number of bytes that can be enqueued for transmission via the port. |
byte-use 1 | Port's byte usage. The size of hardware buffers (in bytes) that are currently allocated for packets the enqueued packets. Since the buffers are allocated by blocks (usually - 256B each), the allocated buffer size can be bigger than the actual payload. |
queue0-packet-cap .. queue7-packet-cap 2 | Queue capacity (in packets). The maximum number of packets that can be enqueued in the respective queues. |
queue0-packet-use .. queue7-packet-use 2 | Queue packet usage. The number of enqueued packets in the respective queues. |
queue0-byte-cap .. queue7-byte-cap 2 | Queue buffer capacity (in bytes). The maximum number of bytes that can be enqueued in the respective queues. Only the queues in use are printed. |
queue0-byte-use .. queue7-byte-use 2 | Queue buffer usage (in bytes). The size of hardware buffers (in bytes) that are currently allocated for packets in the respective queues. |
queue0-byte-max .. queue7-byte-max 2 | Maximum queue buffer fill level (in bytes). Available only on devices that provide the queue statistics service. Use the reset-counters command to reset values. |
1 Port's packet/byte usage can exceed the capacity if Shared Buffers are enabled.
2 Only the queues in use are printed.
Port PFC Stats
Code Block | ||||
---|---|---|---|---|
| ||||
[admin@crs326admin@crs317] /interface/ethernet/switch/qos/port> print pfc usageinterval=1 where name=ether2running name: sfp-sfpplus1 sfp-sfpplus2 name: ether2ether1 packet-cap: pfc: 136 roce disabled disabled packet-use: 5 pfc-tx: 46 byte-cap: 35 840 bytepfc-paused-usetc: 9 472 queue0-packet-cap: 3 130 queue0-packet-use: 1 queue1pfc3-packet-cappause: 1 048 576 5 queue1-packet-use: 4 queue3-packet-cap pfc3-resume: 65 queue3-packet-use:10 240 2 queue0-byte-cap: 24 576 queue0pfc3-byte-use: 256 1 075 queue1-byte-cap: 7 680 queue1-byte-use: 6 144 queue3-byte-cap: 14 080 queue3-byte-use: 3 072 |
...
1 Port's packet/byte usage can exceed the capacity if Shared Buffers are enabled.
2 Only the queues in use are printed.
QoS Menu
...
Almost the entire QoS HW configuration is located under /in/eth/sw/qos
. Such an approach allows storing all QoS-related configuration items in one place, easy monitoring and exporting (/in/eth/sw/qos/export
).
QoS entries have two major flags:
- H - Hardware-offloaded.
- I - Inactive.
...
200 |
Property | Description |
---|---|
name | Port name. |
pfc | PFC profile name. |
pfc-tx | Transmitted PFC frame count. |
pfc0-pause .. pfc7-pause | Pause thresholds of the respective traffic classes. Only PFC-enabled traffic classes are displayed. |
pfc0-resume .. pfc7-resume | Resume thresholds of the respective traffic classes. Only PFC-enabled traffic classes are displayed. |
pfc0-use .. pfc7-use | The current buffer usage of the respective traffic classes (in bytes). In other words, it is the total size of all queued packets on all ports that were received from this port. Only PFC-enabled traffic classes are displayed. |
QoS Menu
Sub-menu:/interface/ethernet/switch/qos
Almost the entire QoS HW configuration is located under /in/eth/sw/qos
. Such an approach allows storing all QoS-related configuration items in one place, easy monitoring and exporting (/in/eth/sw/qos/export
).
QoS entries have two major flags:
- H - Hardware-offloaded.
- I - Inactive.
Anchor | ||||
---|---|---|---|---|
|
Sub-menu:/interface/ethernet/switch/qos/settings
Property | Description |
---|---|
multicast-buffers (percent: 1..90; Default: 10) | Maximum amount of packet buffers for multicast/broadcast traffic (% of the total buffer memory). |
shared-buffers (percent: 0..90; Default: 40) | Maximum amount of packet buffers that are shared between ports (% of the total buffer memory). Setting it to 0 disables buffer sharing. The remaining buffer memory is split between the ports. |
shared-buffers-color (all | green-only | yellow-and-green; Default: all) | Restricts shared buffer usage for specific traffic colors only. |
shared-pool0 .. shared-pool7 (percent: 0..100; Default: auto) | If the device supports multiple shared buffer pools, these settings allows adjusting the size of each pool (% of the shared buffer memory, where 100% means all shared buffers allocated by the shared-buffers setting). For example, if shared-buffers=40 and shared-pool0=50, the shared pool #0 (the first one) receives 20% of the total buffer memory (50% of 40% or "0.5 * 0.4 = 0.2"). Auto mode tries to equally allocate available resources between pools that uses auto setting, and provides at least a minimum of 10% of the total shared buffer size if the sum of other manually configured pools are exceeded. The default setting (auto). |
treat-yellow-as (green | red; Default: red) | For devices that support only two-color traffic marking (red/green). This setting allows using the same QoS profiles for the devices with two- and three-color traffic marking. |
wred-threshold (low | medium | high; Default: medium) | A relative amount of packets below a queue cap ("queueX-packet-cap " or "queueX-byte-cap ") to start a random tail drop. This threshold is applied only to queues with enabled Weighed Random Early Detection (wred=yes) that do NOT use shared buffers (use-shared-buffers=no). The higher the queue buffer fill level, the higher the packet drop chance. The low threshold means the random tail drop starts later; the high - sooner. |
wred-shared-threshold (low | medium | high; Default: medium) | Similar to wred-queue-threshold but applies to queues that use shared buffers (use-shared-buffers=yes). Also affects ECN marking. |
QoS Monitor
Command:/interface/ethernet/switch/qos/monitor
Code Block | ||||
---|---|---|---|---|
| ||||
[admin@crs312] /interface/ethernet/switch/qos> monitor once
total-packet-cap: 11 480
total-packet-use: 454
total-byte-cap: 3072.0KiB
total-byte-use: 681.0KiB
multicast-packet-cap: 1 148
multicast-packet-use: 0
multicast-byte-cap: 307.0KiB
multicast-byte-use: 0
shared-pool0-packet-cap: 2 296
shared-pool0-packet-use: 0
shared-pool3-packet-cap: 2 296
shared-pool3-packet-use: 190
shared-pool0-byte-cap: 614.2KiB
shared-pool0-byte-use: 0
shared-pool3-byte-cap: 614.2KiB
shared-pool3-byte-use: 610.5KiB |
Monitors hardware QoS resources.
Property | Description |
---|---|
total-packet-cap (integer) | Total packet capacity. The maximum number of hardware packet descriptors that the device can store is all queues. |
total-packet-use (integer) | Total packet usage. The current number of packet descriptors residing in the hardware memory. |
total-byte-cap (byte) | Total tx memory capacity. |
total-byte-use (byte) | Total tx memory usage. The current number of bytes occupied by the packets in all tx queues. |
multicast-packet-cap (integer) | Multicast packet capacity. The maximum number of hardware packet descriptors that can be used by multicast/broadcast traffic. Depends on the multicast-buffers setting. |
multicast-packet-use (integer) | Multicast packet usage. The hardware makes a copy of the packet descriptor for each multicast destination. |
shared-packet-cap (integer) | Shared packet capacity. The maximum number of hardware packet descriptors that can be shared between ports and tx queues. Depends on the shared-buffers setting. |
shared-packet-use (integer) | Shared packet usage. The current number of shared packet descriptors used by all tx queues. |
shared-byte-cap (byte) | Shared tx memory capacity. Depends on the shared-buffers setting. |
shared-byte-use (byte) | Shared tx memory usage. The current number of shared buffers occupied by the packets in all tx queues. |
shared-pool0-packet-cap .. shared-pool7-packet-cap (integer) | Shared packet capacity of the each shared pool. Only the shared pools in use are displayed. These fields are omitted if the device does not support multiple shared pools. |
shared-pool0-packet-use .. shared-pool7-packet-use (integer) | Per-pool shared packet usage. Only the shared pools in use are displayed. These fields are omitted if the device does not support multiple shared pools. |
Anchor | ||||
---|---|---|---|---|
|
Sub-menu:/interface/ethernet/switch/qos/profile
QoS profiles determine priority field values (PCP, DSCP) for the forwarded/routed packets. Congestion avoidance/resolution is based on QoS profiles. Each packet gets a QoS profile assigned based on the ingress switch port QoS settings (see /in/eth/sw/port
).
Property | Description |
---|---|
color (green | yellow | red; Default: green) | Trafic color for color-aware drop precedence management. Leave the default value (green) for color-blind drop precedence management. |
dscp (integer: 0..63; Default: 0) | IPv4/IPv6 DSCP field value for the egress packets assigned to the QoS profile. |
name (string; Default: ) | The user-defined name of the QoS profile. |
pcp (integer: 0..7; Default: 0) | VLAN priority value (IEEE 802.1q PCP - Priority Code Point). Used only if the egress packets assigned to the QoS profile are VLAN-tagged (have the 802.1q header). The value can be further altered via the QoS Egress Map. |
traffic-class (integer: 0..7; Default: 0) | The traffic class determines the packet priority and the egress queue (see tx-manager). The queue number is usually the same as the traffic class (packets with tc0 go into queue0, tc1 - queue1, ... tc7 - queue7). Unlike pcp, where 0 means the default priority but 1 - the lowest one (and further customizable), traffic classes are strictly ordered. TC0 always selects the lowest priority, etc. |
Anchor | ||||
---|---|---|---|---|
|
Sub-menu:/interface/ethernet/switch/qos/map
Priority-to-profile mapping table(-s) for trusted packets. All switch chips have one built-in map - default. In addition, some models allow the user to define custom mapping tables and assign different maps to various switch ports via the qos-map property:
- devices based on Marvell Prestera 98DX224S, 98DX226S, or 98DX3236 switch chip models support only one map - default.
- devices based on Marvell Prestera 98DX8xxx, 98DX4xxx switch chips, or 98DX325x model devices support up to 12 maps (the default + 11 user-defined).
Property | Description |
---|---|
name (string; Default: ) | The user-defined name of the mapping table. |
VLAN Map
...
QoS Monitor
...
Code Block | ||||
---|---|---|---|---|
| ||||
[admin@CCR2216] /interface/ethernet/switch/qos monitor
total-packet-cap: 32768
total-packet-use: 0
total-buffer-cap: 32768
total-buffer-use: 0
multicast-packet-cap: 3276
multicast-packet-use: 0
multicast-buffer-cap: 3276
multicast-buffer-use: 0
shared-pool0-packet-cap: 13107
shared-pool0-packet-use: 0
shared-pool0-buffer-cap: 13107
shared-pool0-buffer-use: 0 |
Monitors hardware QoS resources.
...
Sub-menu:/interface/ethernet/switch/qos/map/profile
...
vlan
Matches VLAN priorities (802.1p PCP/DEI fields) to QoS profiles. By default, all values are matched to the default QoS profile.
Property | Description | ||
---|---|---|---|
color dei-only(green yes | yellow | redno; Default: green) | Trafic color for color-aware drop precedence management. Leave the default value (green) for color-blind drop precedence management. | no) | Map only packets with DEI (formerly CFI) bit set in the VLAN header. |
map (namedscp (integer: 0..63; Default: 0default) | IPv4/IPv6 DSCP field value for the egress packets assigned to the QoS profile. | The name of the mapping table. | |
profile (namename (string; Default: ) | The user-defined name of the QoS profile to assign to the matched packets. | ||
pcp (integer: 0..7; Default: 0) | MinimumVLAN priority value (IEEE 802.1q PCP - Priority Code Point). Used only if the egress packets assigned to the QoS profile are VLAN-tagged (have the 802.1q header). The value can be further altered via the QoS Egress Map.) value for the lookup. |
DSCP Map
Sub-menu:/interface/ethernet/switch/qos/map/ip
Matches DSCP values to QoS profiles.
Property | Description |
---|---|
dscptraffic-class (integer: 0..7.63; Default: 0) | Minimum DSCP value for the lookup. |
map (name; Default: 0 default) | The traffic class determines the packet priority and the egress queue (see tx-manager). The queue number is usually the same as the traffic class (packets with tc0 go into queue0, tc1 - queue1, ... tc7 - queue7). Unlike pcp, where 0 means the default priority but 1 - the lowest one (and further customizable), traffic classes are strictly ordered. TC0 always selects the lowest priority, etc. |
...
name of the mapping table. If not set, the standard (built-in) mapping table gets altered. | |
profile (name; Default: ) | The name of the QoS profile to assign to the matched packets. |
Anchor | ||||
---|---|---|---|---|
|
...
Sub-menu:
/interface/ethernet/switch/qos/map
Priority-to-profile mapping table(-s) for trusted packets. All switch chips have one built-in map - default. In addition, some models allow the user to define custom mapping tables and assign different maps to various switch ports via the qos-map property:
- devices based on Marvell Prestera 98DX224S, 98DX226S, or 98DX3236 switch chip models support only one map - default.
- devices based on Marvell Prestera 98DX8xxx, 98DX4xxx switch chips, or 98DX325x model devices support up to 12 maps (the default + 11 user-defined).
tx-manager
Transmission (Tx) Manager controls packet enqueuing for transmission and packet tx order. Different switch ports can be assigned to different Tx managers. The maximum number of hardware Tx managers depends on the switch chip model (usually - 8).
Property | Description |
---|---|
ecn (yes | no; Default: no) | Enables/disables ECN marking of the transmitted packets. |
name (string; Default: ) | The user-defined name |
VLAN Map
...
of the Tx Manager |
Transmission Queue Scheduler
Sub-menu:
/interface/ethernet/switch/qos/tx-manager/queue
Each port has eight Tx queues. The assigned Tx Manager controls packet enqueuing and schedules transmission orders. Each queue can have either strict priority (where packets with the highest traffic class are always transmitted first) or grouped together for a weighted round-robin tx schedule.
Creating a Tx Manager automatically creates all eight respective queue schedulers.
Warning |
---|
Changing any properties of Tx manager or queues completely halts traffic enqueueing and transmission during the offload process. Temporary packet loss is expected while the device is forwarding traffic. |
Property | Description |
---|---|
tx-manager (name; read-only) | The linked Tx Manager |
traffic-class (integer: 0..7; read-only) | The traffic class (tc0..tc7) and the respective port queue (queue0..queue7) that the scheduler controls. |
schedule (strict-priority | high-priority-group | low-priority-group ) |
|
weight (integer: 0..255; Default: 1) | The weight value for the traffic class if it is a member of a schedule group. The field is not used in the case of strict priority schedule. |
queue-buffers (integer; Default: auto) | Per-queue buffer pool. The maximum number of packets that can be assigned to the queue (per each assigned port). |
use-shared-buffers (yes | no) | Allow the queue to use the shared buffer pool when queue-buffers are full. If the queue is full and the shared buffers are disabled, the packet gets dropped. If the shared buffers are enabled, the queue may use up to shared-packet-cap or shared-poolX-packet-cap (see QoS Settings for details) packets from the shared pool. |
shared-pool-index (integer; Default: 0) | The shared pool index for the queue to use. Relevant only if use-shared-buffers=yes and the device supports multiple shared pools. |
wred(yes | no; Default: no) | Enables/disables Weighted Random Early Detection for the given queue. |
Anchor | ||||
---|---|---|---|---|
|
Sub-menu:
/interface/ethernet/switch/qos/priority-flow-control
PFC configuration is organized in profiles. Different switch ports can be assigned to different PFC profiles. The maximum number of hardware Tx managers depends on the switch chip model. The builtin profile named "disabled" cannot be changed.
Property | Description |
---|---|
name (string; Default: ) | The user-defined name of the PFC profile |
pause-threshold (percent: 0%..100% | bytes | auto; Default: auto) | Transmits a pause frame (XOFF) when the total size of enqueued packets reaches this threshold. Enqueued packets are counted per ingress port. Applies only when tx=yes. The value can be given either explicitly in bytes or percent of the respective shared pool size (shared-poolX-byte-cap). |
resume-threshold (percent: 0%..100% | bytes | auto; Default: auto) | Transmits a resume frame (XON) when the total size of enqueued packets drops down to this threshold. Enqueued packets are counted per ingress port. Applies only when tx=yes. The value can be given either explicitly in bytes or percent of the respective shared pool size (shared-poolX-byte-cap). |
rx (yes | no; Default: no) | Enables receiving of PFC frames. The received PFC frame pauses the specific priority queues on the port that received the PFC frame for the duration specified by the PFC frame. Disabling rx disables queue pausing. |
traffic-class (integer array: 0..7) | The list of PFC-enabled traffic classes. |
tx |
Matches VLAN priorities (802.1p PCP/DEI fields) to QoS profiles. By default, all values are matched to the default QoS profile.
...
DSCP Map
...
Matches DSCP values to QoS profiles.
...
Sub-menu:
/interface/ethernet/switch/qos/tx-manager
Transmission (Tx) Manager controls packet enqueuing for transmission and packet tx order. Different switch ports can be assigned to different Tx managers. The maximum number of hardware Tx managers depends on the switch chip model (usually - 8).
...
Transmission Queue Scheduler
Sub-menu:
/interface/ethernet/switch/qos/tx-manager/queue
Each port has eight Tx queues. The assigned Tx Manager controls packet enqueuing and schedules transmission orders. Each queue can have either strict priority (where packets with the highest traffic class are always transmitted first) or grouped together for a weighted round-robin tx schedule.
Creating a Tx Manager automatically creates all eight respective queue schedulers.
Warning |
---|
Changing any properties of Tx manager or queues completely halts traffic enqueueing and transmission during the offload process. Temporary packet loss is expected while the device is forwarding traffic. |
- strict-priority - packets in the respective queue are always scheduled before moving to lower traffic classes. Packets with lower traffic classes are not transmitted until the current queue is empty.
- high-priority-group - all queues in the group are scheduled together by using a weighted round-robin principle. For example, if TC5 has weight 4, TC4 - 3, and TC3 - 2, then the scheduler transmits 4 packets from queue5, 3 packets from Q4, and 2 packets from Q3 in a single round. To achieve lower latency, each round is "sliced" between all queues in the group. In other words, the packet order in each round of the above example is "Q5, Q4, Q3, Q5, Q4, Q3, Q5, Q4, Q5".
- low-priority-group - similar logic to the high-priority-group, but the low-priority-group is scheduled only when all queues in the high-priority-group are empty.
(yes | no; Default: no) | Enables |
transmition of PFC frames. |