Layer-3 Class of Service (CoS)
Juniper Cloud-Native Router supports Layer 3 Class of Service (CoS), also known as L3 Quality of Service (QoS). This topic provides an overview of the supports CoS mechanisms followed by configuration and verification examples.
L3 CoS Overview
When a network experiences congestion and delay, some packets must be prioritized to avoid random loss of data. Class of service (CoS), also known as Quality of Service (QoS) accomplishes this prioritization by dividing similar types of traffic, such as e-mail, streaming video, voice, large document file transfer, into classes. You then apply different levels of priority, such as those for throughput and packet loss, to each group, and thereby control traffic behavior. Juniper Cloud-Native Router supports CoS, enabling it to differentiate or classify traffic. It can either drop traffic or lower the priority of the traffic as per the rules configured. You can read more about Class of Service in the Junos documentation.
The Cloud-Native Router CoS application supports DiffServ, which uses a 6-bit differentiated services code point (DSCP) in the differentiated services field of the IPv4 and IPv6 packet header. For IPv6, DSCP is referred to as traffic class. The configuration uses DSCP values to decide the CoS treatment for the incoming packet. The DSCP field is also used to notify the modified priority of a packet to the next hop.
Cloud-Native Router Supported CoS Mechanisms
Cloud-Native Router supports Classifier, Policer and Rewrite/Marker CoS mechanisms. Let us look at the Cloud-Native Router CoS implementations in detail in the sections below.
- Forwarding Classes and Loss Priority
- Classifiers
- Policers
- Rewrite/Marker
- Scheduler
- Supported Interfaces
Forwarding Classes and Loss Priority
The forwarding classes affect the forwarding and marking policies applied to packets as they transit JCNR. By default Cloud-Native Router has no forwarding classes defined. You can define up to 16 custom forwarding classes mapped to 8 queues.
In Cloud-Native Router CoS implementation forwarding class along with the loss priority is used for rewrite rules and policer. Loss priority is set by the classifier as low, medium low, medium high and high. Here are some of the ways loss priority is used in the Cloud-Native Router CoS implementation:
QoS Block |
How Loss priority is used |
---|---|
Classifier |
Forwarding class and loss priority are set by the classifier. |
Rewrite |
Loss priority is used as an index along with the Traffic Class (Forwarding Class) to obtain a new DSCP value. |
Policer |
Only color aware policer uses loss priority. Loss priority maps to traffic colors as follows:
|
Scheduler | Forwarding class and loss priority are inputs to the scheduler for queuing the traffic based on strict priority. |
Classifiers
Packet classification refers to the examination of an incoming packet. This function associates the packet with a particular CoS servicing level. Classifiers associate incoming packets with a forwarding class and loss priority and, based on the associated forwarding class, assign packets to output queues. Two general types of classifiers are supported:
-
Behavior Aggregate Classifier—Behavior aggregate (BA) is a method of classification that operates on a packet as it enters JCNR. The CoS value in the packet header is examined, and this single field determines the CoS settings applied to the packet. BA classifiers allow you to set the forwarding class and loss priority of a packet based on the Differentiated Services code point (DSCP) value and DSCP IPv6 value. BA classifier is configured at the interface level. You can read more about Behavior Aggregate Classifer in the Junos documentation.
-
Multifield Traffic Classifier—A multifield (MF) classifier can examine multiple fields in the packet, such as the source and destination address of the packet as well as the source and destination port numbers. With multifield classifiers, you set the forwarding class and loss priority of a packet based on firewall filter (ACL) rules. If a packet matches both BA and MF classifiers, MF classifier takes precedence. You can read more about the Multified Traffic Classifier in the Junos documentation.
Policers
Policers allow you to limit traffic of a certain class to a specified bandwidth and burst size. Policer meters (measures) each packet against traffic rates and burst sizes configured. It then passes the packet and the metering result to the marker (rewrite rules), which assigns a packet loss priority that corresponds to the metering result. Based on the particular set of traffic limits configured, a policer identifies a traffic flow as belonging to one of either two or three categories that are similar to the colors of a traffic light used to control automobile traffic. Policers can be applied per packet or per traffic class. Cloud-Native Router CoS implementation supports 16 policer profiles. You can read more about Policer Implementation in Junos documentation. In Cloud-Native Router CoS implementation policers work in Single-rate three color marker (srTCM) or Two-rate three-color marker (trTCM) mode. Policers can perform traffic color marking in color aware or color blind modes. In color aware mode, the policer considers the packet’s color as derived by classifier as additional input. In color blind mode the policer does not take into consideration packet’s color while determining the new color. We will look at the different considerations for each of the modes in the tables provided hereafter.
-
Single-rate three-color—A Single Rate Three Color Marker (srTCM) meters traffic based on the configured committed information rate (CIR), committed burst size (CBS), and the peak burst size (PBS). A single-rate three-color policer is most useful when a service is structured according to packet length and not peak arrival rate. Traffic is marked as belonging to one of three categories—green, yellow, or red based on the following considerations:
Table 2: Color Aware srTCM Incoming Color Packet Metered Against
Possible Cases
New Color
Action on the packet
Green
CIR, CBS, PBS
Below CBS
Green
Not dropped
Above CBS but below PBS
Yellow Change the traffic class using the rewrite rules.
Above PBS
Red
Discard
Yellow
PBS
Below PBS
Yellow
Change the traffic class using the rewrite rules.
Above PBS
Red
Discard Red Not metered NA Red Discard Table 3: Color Blind srTCM Packet Metered Against
Possible Cases
New Color
Action on the packet
CIR, CBS, PBS
Below CBS
Green
Not dropped
Above CBS but below PBS
Yellow Change the traffic class using the rewrite rules.
Above PBS
Red
Discard
-
Two-rate three-color—A Two Rate Three Color Marker (trTCM) meters traffic based on the configured CIR and peak information rate (PIR). A two-rate three-color policer is most useful when a service is structured according to arrival rates and not necessarily packet length. Traffic is marked as belonging to one of three categories based on the following considerations:
Table 4: Color Aware trTCM Incoming Color Packet Metered Against
Possible Cases
New Color
Action on the packet
Green
CIR, PIR
Below CIR
Green
Not dropped
Above CIR but below PIR
Yellow Change the traffic class using the rewrite rules.
Above PIR
Red
Discard
Yellow
PIR
Below PIR
Yellow
Change the traffic class using the rewrite rules.
Above PIR
Red
Discard Red Not metered NA Red Discard Table 5: Color Blind trTCM Packet Metered Against
Possible Cases
New Color
Action on the packet
CIR, PIR
Below CIR
Green
Not dropped
Above CIR but below PIR
Yellow Change the traffic class using the rewrite rules.
Above PIR
Red
Discard
The colors marked by Policer are mapped to loss priority as follows:
Color |
Loss Priority |
---|---|
Green |
Low |
Yellow |
Medium-Low (Medium-High is not used while mapping color to loss priority) |
Red |
High |
Rewrite/Marker
A rewrite rule or marker sets the appropriate CoS bits in the outgoing packet. This allows the next downstream routing device to classify the packet into the appropriate service group. Rewriting, or marking, outbound packets is useful when the routing device is at the border of a network and must alter the CoS values to meet the policies of the targeted peer. A rewrite profile is applied to the interface and is based on the forwarding class and loss priority derived by the classifier and/or the metering results of the policer. Cloud-Native Router rewrite rules supports copying outer IPv4/IPv6 DSCP marking to inner IP header DSCP field as well as MPLS EXP bit marking. Cloud-Native Router supports 16 rewrite profiles. You can read more about Rewrite rules in Junos documentation.
Cloud-Native Router CoS implementation does not support implicit best effort treatment for traffic that does not match any CoS block. An explicit catch-all rule must be configured for best effort treatment.
Cloud-Native Router CoS implementation modifies the DSCP value of the outer IP header only for tunneled packets (MPLSoUDP and VXLAN).
Scheduler
Scheduler is the last block in Cloud-Native Router's CoS implementation and computes the priority of the packets. Cloud-Native Router implements a strict priority 8-queue scheduler, with priority order high to low. The forwarding class is directly mapped to scheduler priority. The Cloud-Native Router supports a maximum of 4 scheduler profiles in the deployment helm chart and a maximum of 16 scheduler maps and forwarding classes. You can read more about Scheduler in Junos documentation. You can configure a scheduler with one of 8 priorities as provided in the below table. Note that the scheduler priorities are already mapped to interface queues (8 queues).
Priority |
Scheduling Priority (Queue) |
---|---|
high |
Scheduling priority 1 |
low |
Scheduling priority 7 (Least) |
low-high |
Scheduling priority 5 |
low-latency |
Scheduling priority 4 |
low-medium |
Scheduling priority 6 |
medium-high |
Scheduling priority 2 |
medium-low |
Scheduling priority 3 |
strict-high |
Scheduling priority 0 (Highest) |
Supported Interfaces
Cloud-Native Router supports the following interfaces for CoS implementation:
CoS Component/Interface Type |
Pod Interface |
Fabric Interface |
IRB Interface |
---|---|---|---|
Classifier |
Supported |
Supported |
Supported |
Policer |
Supported |
Supported |
Supported |
Marker |
Supported |
Supported |
Supported |
Scheduler | Not Supported | Supported | Not Supported |
L3 CoS Configuration
- Configure Forwarding Classes
- Configure Classifiers
- Configure Policers
- Configure Rewrite/Marker
- Configure Schedulers
Configure Forwarding Classes
Cloud-Native Router does not have any forwarding classes configured by default. You can configure upto 16 forwarding classes, mapped to 8 queues. The user-defined queue mapping is ignored since queue numbers are derived from the priority defined in the scheduler configuration, mapped one-on-one with the queue number:
apiVersion: configplane.juniper.net/v1 kind: Configlet metadata: name: configlet-sample namespace: jcnr spec: config: |- set class-of-service forwarding-classes class af11 queue-num 3 set class-of-service forwarding-classes class af12 queue-num 3 set class-of-service forwarding-classes class af13 queue-num 3 set class-of-service forwarding-classes class af21 queue-num 4 set class-of-service forwarding-classes class af22 queue-num 4 set class-of-service forwarding-classes class af23 queue-num 4 set class-of-service forwarding-classes class af31 queue-num 5 set class-of-service forwarding-classes class af32 queue-num 5 set class-of-service forwarding-classes class af33 queue-num 5 set class-of-service forwarding-classes class cs1 queue-num 6 set class-of-service forwarding-classes class cs2 queue-num 6 set class-of-service forwarding-classes class cs3 queue-num 7 set class-of-service forwarding-classes class cs4 queue-num 7 set class-of-service forwarding-classes class ef queue-num 1 set class-of-service forwarding-classes class nc1 queue-num 0 set class-of-service forwarding-classes class nc2 queue-num 0 crpdSelector: matchLabels: node: worker
Configure Classifiers
You can configure a BA classifier and apply it on an interface:
apiVersion: configplane.juniper.net/v1 kind: Configlet metadata: name: configlet-sample namespace: jcnr spec: config: |- set class-of-service classifiers dscp BA_1 forwarding-class af11 loss-priority high code-points 000001 set class-of-service classifiers dscp BA_1 forwarding-class af11 loss-priority low code-points 001010 set class-of-service classifiers dscp BA_1 forwarding-class af11 loss-priority medium-high code-points 001110 set class-of-service classifiers dscp BA_1 forwarding-class af11 loss-priority medium-low code-points 001100 set class-of-service classifiers dscp BA_1 forwarding-class ef loss-priority low code-points 101111 set class-of-service classifiers dscp BA_1 forwarding-class nc1 loss-priority low code-points 110000 set class-of-service classifiers dscp BA_1 forwarding-class nc1 loss-priority low code-points 111000 set class-of-service classifiers dscp-ipv6 BA6_1 forwarding-class ef loss-priority low code-points 101111 set class-of-service classifiers dscp-ipv6 BA6_1 forwarding-class nc2 loss-priority high code-points 111000 set class-of-service interfaces eno2 unit 0 classifiers dscp BA_1 set class-of-service interfaces eno2 unit 0 classifiers dscp-ipv6 BA6_1 crpdSelector: matchLabels: node: worker
You can configure MF classifier as a firewall filter:
apiVersion: configplane.juniper.net/v1 kind: Configlet metadata: name: configlet-sample namespace: jcnr spec: config: |- set firewall family inet filter MCFF_1 term 1 from source-port 1001 set firewall family inet filter MCFF_1 term 1 then forwarding-class af11 set firewall family inet filter MCFF_1 term 1 then loss-priority medium-low set firewall family inet filter MCFF_1 term 2 from icmp-type echo-request set firewall family inet filter MCFF_1 term 2 then forwarding-class af31 set firewall family inet filter MCFF_1 term 2 then loss-priority medium-low set firewall family inet filter MCFF_1 term 3 then accept set firewall family inet6 filter MCFF6_1 term 1 from source-port 1001 set firewall family inet6 filter MCFF6_1 term 1 then forwarding-class af11 set firewall family inet6 filter MCFF6_1 term 1 then loss-priority low set firewall family inet6 filter MCFF6_1 term 2 then accept set interfaces eno2 unit 0 family inet filter input MCFF_1 set interfaces eno2 unit 0 family inet6 filter input MCFF6_1 crpdSelector: matchLabels: node: worker
Configure Policers
You can configure the policer with the action type three-color-policer
as follows:
Single Rate Three Color Meter (srTCM) Policer:
apiVersion: configplane.juniper.net/v1 kind: Configlet metadata: name: configlet-sample namespace: jcnr spec: config: |- set firewall three-color-policer srTCM_1 action loss-priority high then discard set firewall three-color-policer srTCM_1 single-rate color-aware set firewall three-color-policer srTCM_1 single-rate committed-information-rate 500m set firewall three-color-policer srTCM_1 single-rate committed-burst-size 20k set firewall three-color-policer srTCM_1 single-rate excess-burst-size 20k set firewall family inet filter FF_1 term 1 then three-color-policer single-rate srTCM_1 set firewall family inet6 filter FF6_1 term 1 then three-color-policer single-rate srTCM_1 crpdSelector: matchLabels: node: worker
Two Rate Three Color Meter (trTCM) Policer:
apiVersion: configplane.juniper.net/v1 kind: Configlet metadata: name: configlet-sample namespace: jcnr spec: config: |- set firewall three-color-policer trTCM_1 action loss-priority high then discard set firewall three-color-policer trTCM_1 two-rate color-aware set firewall three-color-policer trTCM_1 two-rate committed-information-rate 100m set firewall three-color-policer trTCM_1 two-rate committed-burst-size 2048 set firewall three-color-policer trTCM_1 two-rate peak-information-rate 200m set firewall three-color-policer trTCM_1 two-rate peak-burst-size 2048 set firewall family inet filter FF_1 term 1 from forwarding-class af11 set firewall family inet filter FF_1 term 1 then three-color-policer two-rate trTCM_1 set firewall family inet6 filter FF6_1 term 1 from forwarding-class af11 set firewall family inet6 filter FF6_1 term 1 then three-color-policer two-rate trTCM_1 crpdSelector: matchLabels: node: worker
You can configure classifiers with policers.
BA classifier with policer:
apiVersion: configplane.juniper.net/v1 kind: Configlet metadata: name: configlet-sample namespace: jcnr spec: config: |- set firewall family inet filter FF_1 term 1 from forwarding-class af11 set firewall family inet filter FF_1 term 1 then three-color-policer single-rate srTCM_1 set firewall family inet6 filter FF6_1 term 1 from forwarding-class af11 set firewall family inet6 filter FF6_1 term 1 then three-color-policer single-rate srTCM_1 set class-of-service interfaces eno2 unit 0 classifiers dscp BA_1 set class-of-service interfaces eno2 unit 0 classifiers dscp-ipv6 BA6_1 set interfaces eno2 unit 0 family inet filter input FF_1 set interfaces eno2 unit 0 family inet6 filter input FF6_1 crpdSelector: matchLabels: node: worker
MF classifier as a firewall filter with policer:
apiVersion: configplane.juniper.net/v1 kind: Configlet metadata: name: configlet-sample namespace: jcnr spec: config: |- set firewall family inet filter MCFF_1 term 1 from source-port 1001 set firewall family inet filter MCFF_1 term 1 then forwarding-class af11 set firewall family inet filter MCFF_1 term 1 then three-color-policer single-rate srTCM_1 set firewall family inet filter MCFF_1 term 2 from icmp-type echo-request set firewall family inet filter MCFF_1 term 2 then forwarding-class af31 set firewall family inet filter MCFF_1 term 2 then three-color-policer single-rate srTCM_1 set firewall family inet filter MCFF_1 term 3 then accept set firewall family inet6 filter MCFF6_1 term 1 from source-port 1001 set firewall family inet6 filter MCFF6_1 term 1 then forwarding-class af11 set firewall family inet6 filter MCFF6_1 term 1 then three-color-policer single-rate srTCM_1 set firewall family inet6 filter MCFF6_1 term 2 then accept set interfaces eno2 unit 0 family inet filter input MCFF_1 set interfaces eno2 unit 0 family inet6 filter input MCFF6_1
Configure Rewrite/Marker
You can configure the rewrite/marker as follows:
apiVersion: configplane.juniper.net/v1 kind: Configlet metadata: name: configlet-sample namespace: jcnr spec: config: |- set class-of-service rewrite-rules dscp RE_1 forwarding-class af11 loss-priority high code-point 010010 set class-of-service rewrite-rules dscp RE_1 forwarding-class af11 loss-priority low code-point 001100 set class-of-service rewrite-rules dscp RE_1 forwarding-class af11 loss-priority medium-high code-point 000001 set class-of-service rewrite-rules dscp RE_1 forwarding-class af11 loss-priority medium-low code-point 001110 set class-of-service rewrite-rules dscp RE_1 forwarding-class ef loss-priority low code-point 001010 set class-of-service rewrite-rules dscp RE_1 forwarding-class ef loss-priority medium-high code-point 001001 set class-of-service rewrite-rules dscp-ipv6 RE6_1 forwarding-class af11 loss-priority high code-point 010010 set class-of-service rewrite-rules dscp-ipv6 RE6_1 forwarding-class af11 loss-priority low code-point 001100 set class-of-service rewrite-rules dscp-ipv6 RE6_1 forwarding-class af11 loss-priority medium-high code-point 000001 set class-of-service rewrite-rules dscp-ipv6 RE6_1 forwarding-class af11 loss-priority medium-low code-point 001110 set class-of-service rewrite-rules dscp-ipv6 RE6_1 forwarding-class ef loss-priority low code-point 001001 set class-of-service interfaces eno3 unit 0 rewrite-rules dscp RE_1 set class-of-service interfaces eno3 unit 0 rewrite-rules dscp-ipv6 RE6_1 crpdSelector: matchLabels: node: worker
MPLS Exp Rewrite for tunnel packets:
apiVersion: configplane.juniper.net/v1 kind: Configlet metadata: name: configlet-sample namespace: jcnr spec: config: |- set class-of-service rewrite-rules exp RE_3 forwarding-class af11 loss-priority low code-point 111 set class-of-service rewrite-rules exp RE_3 forwarding-class af11 loss-priority medium-high code-point 101 set class-of-service rewrite-rules exp RE_3 forwarding-class af11 loss-priority medium-low code-point 110 set class-of-service interfaces eno3 unit 0 rewrite-rules exp RE_3 crpdSelector: matchLabels: node: worker
Configure Schedulers
You can configure the schedulers to one of 8 priorities. The scheduler map configures the forwarding class to scheduler mapping and is applied at the interface level.
apiVersion: configplane.juniper.net/v1 kind: Configlet metadata: name: configlet-sample namespace: jcnr spec: config: |- set class-of-service schedulers S1 priority medium-high set class-of-service schedulers S2 priority strict-high set class-of-service schedulers S3 priority high set class-of-service schedulers S4 priority low set class-of-service scheduler-maps VOICE-SCHED-MAP forwarding-class af11 scheduler S1 set class-of-service scheduler-maps VOICE-SCHED-MAP forwarding-class af12 scheduler S2 set class-of-service scheduler-maps VOICE-SCHED-MAP forwarding-class ef scheduler S3 set class-of-service scheduler-maps VOICE-SCHED-MAP forwarding-class nc1 scheduler S4 set class-of-service interfaces eno2 scheduler-map VOICE-SCHED-MAP crpdSelector: matchLabels: node: worker
qos-scheduler-profile
in the helm chart. The scheduler
profile must be configured with CPU and bandwidth allocation. Please see Helm Chart
customization for more details. L3 CoS Verification
CLI commands to verify L3 CoS configuration
- Verify Classifier Configuration on cRPD
- Verify CoS Classifiers on vRouter
- Verify Rewrite Rules
- Verify ACLs for MF Classifier
- Verify Policer Statistics
- Verify Scheduler Statistics
- Verify CoS Features Applied on an Interface
Verify Classifier Configuration on cRPD
You can verify the L3 CoS configuration using the following commands on the cRPD shell:
- Verify the classifier configuration using the
show class-of-service classifier
command. An example output is provided below:user@host> show class-of-service classifier Classifier: BA_1, Code point type: dscp Code point Forwarding class Loss priority 000001 af11 high 001000 cs1 medium-high 001010 af11 low 001100 af11 medium-low 001110 af11 medium-high 010000 cs1 medium-high 010010 af21 medium-low 010100 af22 medium-high 010110 af23 high 011100 af32 high 101111 ef low 110000 nc1 low 111000 nc1 low 111010 af31 low Classifier: BA6_1, Code point type: dscp-ipv6 Code point Forwarding class Loss priority 001010 af33 low 010000 cs2 medium-high 011000 cs3 medium-low 101111 ef low 110000 cs4 medium-low 111000 nc2 high
- Verify the code-point-alisases configuration using the
show class-of-service code-point-aliases
command. An example output is provided below:user@host> show class-of-service code-point-aliases Code point type: dscp Alias Bit pattern af11 001010 af12 001100 af13 001110 af21 010010 af22 010100 af23 010110 af31 011010 af32 011100 af33 011110 af41 100010 af42 100100 af43 100110 be 000000 cs1 001000 cs2 010000 cs3 011000 cs4 100000 cs5 101000 cs6 110000 cs7 111000 ef 101110 nc1 110000 nc2 111000 Code point type: dscp-ipv6 Alias Bit pattern af11 001010 af12 001100 af13 001110 af21 010010 af22 010100 af23 010110 af31 011010 af32 011100 af33 011110 af41 100010 af42 100100 af43 100110 be 000000 cs1 001000 cs2 010000 cs3 011000 cs4 100000 cs5 101000 cs6 110000 cs7 111000 ef 101110 nc1 110000 nc2 111000
- Verify the CoS configuration on an interface using the
show class-of-service interface
command. An example output is provided below:user@host> show class-of-service interface eno2 Physical interface: eno2 Maximum usable queues: 8, Queues in use: 8 Logical interface: eno2.0 Object Name Type Classifier BA_1 dscp Classifier BA6_1 dscp-ipv6
- Verify the rewrite rule configuration using the
show class-of-service rewrite-rule
command. Example outputs are provided below:user@host> show class-of-service rewrite-rule Rewrite rule: RE_1, Code point type: dscp Forwarding class Loss priority Code point ef low 100001 af11 low 000010 af11 high 000101 af11 medium-low 000011 af11 medium-high 000100 af21 medium-low 000110 af22 medium-high 000111 af23 high 001000 af31 low 001111 af32 high 001010 cs1 medium-high 001011 nc1 low 001101 Rewrite rule: RE6_1, Code point type: dscp-ipv6 Forwarding class Loss priority Code point ef low 000001 af33 low 001110 cs2 medium-high 010011 cs3 medium-low 101010 cs4 medium-low 111111 nc2 high 111100 Rewrite rule: RE_3, Code point type: exp Forwarding class Loss priority Code point af11 low 111 af11 medium-low 110 af11 medium-high 101
Verify CoS Classifiers on vRouter
bash-5.1# qosdpdk --list cla Classifer name: BA_1 Traffic-class: dscp =============================================================== code-points loss priority forwarding-class-id =============================================================== 000000(0) n/a n/a 000001(1) high 65 000010(2) n/a n/a 000011(3) n/a n/a 000100(4) n/a n/a 000101(5) n/a n/a 000110(6) n/a n/a 000111(7) n/a n/a 001000(8) medium-high 74 001001(9) n/a n/a 001010(10) low 65 001011(11) n/a n/a 001100(12) medium-low 65 001101(13) n/a n/a 001110(14) medium-high 65 001111(15) n/a n/a 010000(16) medium-high 74 010001(17) n/a n/a 010010(18) medium-low 68 010011(19) n/a n/a 010100(20) medium-high 69 010101(21) n/a n/a 010110(22) high 70 010111(23) n/a n/a 011000(24) n/a n/a 011001(25) n/a n/a 011010(26) n/a n/a 011011(27) n/a n/a 011100(28) high 72 011101(29) n/a n/a 011110(30) n/a n/a 011111(31) n/a n/a ====================================================================== Classifer name: BA6_1 Traffic-class: dscpv6 =============================================================== code-points loss priority forwarding-class-id =============================================================== 000000(0) n/a n/a 000001(1) n/a n/a 000010(2) n/a n/a 000011(3) n/a n/a 000100(4) n/a n/a 000101(5) n/a n/a 000110(6) n/a n/a 000111(7) n/a n/a 001000(8) n/a n/a 001001(9) n/a n/a 001010(10) low 73 001011(11) n/a n/a 001100(12) n/a n/a 001101(13) n/a n/a 001110(14) n/a n/a 001111(15) n/a n/a 010000(16) medium-high 75 010001(17) n/a n/a 010010(18) n/a n/a 010011(19) n/a n/a 010100(20) n/a n/a 010101(21) n/a n/a 010110(22) n/a n/a 010111(23) n/a n/a 011000(24) medium-low 76 011001(25) n/a n/a 011010(26) n/a n/a 011011(27) n/a n/a 011100(28) n/a n/a 011101(29) n/a n/a 011110(30) n/a n/a 011111(31) n/a n/a ======================================================================
Verify Rewrite Rules
bash-5.1# qosdpdk --list re-write Re-Write name: RE_1 Traffic-class: dscp ====================================================================== loss priority Forwarding-class re-write prio ====================================================================== low 0 001100(12) low 1 n/a low 2 n/a low 3 101111(47) low 4 001010(10) low 5 010100(20) low 6 111010(58) low 7 011100(28) low 8 n/a low 9 n/a low 10 010000(16) low 11 n/a low 12 n/a low 13 n/a low 14 n/a low 15 111100(60) high 0 010010(18) high 1 n/a high 2 n/a high 3 n/a high 4 n/a high 5 n/a high 6 n/a high 7 n/a high 8 n/a high 9 n/a high 10 n/a high 11 n/a high 12 n/a high 13 n/a high 14 n/a high 15 n/a medium-low 0 001110(14) medium-low 1 110000(48) medium-low 2 010110(22) medium-low 3 100000(32) medium-low 4 n/a medium-low 5 n/a medium-low 6 n/a medium-low 7 n/a medium-low 8 n/a medium-low 9 n/a medium-low 10 n/a medium-low 11 n/a medium-low 12 n/a medium-low 13 n/a medium-low 14 n/a medium-low 15 n/a medium-high 0 000001(1) medium-high 1 n/a medium-high 2 n/a medium-high 3 n/a medium-high 4 001001(9) medium-high 5 n/a medium-high 6 n/a medium-high 7 n/a medium-high 8 n/a medium-high 9 n/a medium-high 10 n/a medium-high 11 n/a medium-high 12 n/a medium-high 13 n/a medium-high 14 n/a medium-high 15 n/a ====================================================================== Re-Write name: RE6_1 Traffic-class: dscpv6 ====================================================================== loss priority Forwarding-class re-write prio ====================================================================== low 0 001100(12) low 1 n/a low 2 n/a low 3 101111(47) low 4 001001(9) low 5 010100(20) low 6 111010(58) low 7 011100(28) low 8 n/a low 9 n/a low 10 010000(16) low 11 n/a low 12 n/a low 13 n/a low 14 n/a low 15 111100(60) high 0 010010(18) high 1 n/a high 2 n/a high 3 n/a high 4 n/a high 5 n/a high 6 n/a high 7 n/a high 8 n/a high 9 n/a high 10 n/a high 11 n/a high 12 n/a high 13 n/a high 14 n/a high 15 n/a medium-low 0 001110(14) medium-low 1 110000(48) medium-low 2 010110(22) medium-low 3 100000(32) medium-low 4 n/a medium-low 5 n/a medium-low 6 n/a medium-low 7 n/a medium-low 8 n/a medium-low 9 n/a medium-low 10 n/a medium-low 11 n/a medium-low 12 n/a medium-low 13 n/a medium-low 14 n/a medium-low 15 n/a medium-high 0 000001(1) medium-high 1 n/a medium-high 2 n/a medium-high 3 n/a medium-high 4 n/a medium-high 5 n/a medium-high 6 n/a medium-high 7 n/a medium-high 8 n/a medium-high 9 n/a medium-high 10 n/a medium-high 11 n/a medium-high 12 n/a medium-high 13 n/a medium-high 14 n/a medium-high 15 n/a ======================================================================
Verify ACLs for MF Classifier
bash-5.1# acl --list-filters --family inet ======================================= Filter: MCFF_3 ======================================= Term: 1 ----- Priority: 256 Src ports: [1005 - 1005] POLICER Id: 0 Action: policer (V4MCFF_31trTCM_2) Action: fc (af11) ======================================= ======================================= Filter: MCFF_3 ======================================= Term: 2 ----- Priority: 255 ICMP Type: 8 POLICER Id: 1 Action: policer (V4MCFF_32trTCM_2) Action: fc (af31) ======================================= ======================================= Filter: MCFF_3 ======================================= Term: 3 ----- Priority: 254 Action: accept (n/a) ======================================= bash-5.1# bash-5.1# acl --list-filters --family inet6 ======================================= Filter: MCFF6_3 ======================================= Term: 1 ----- Priority: 256 Dest IP: ::/0 Src IP: ::/0 Src ports: [1005 - 1005] POLICER Id: 2 Action: policer (V6MCFF6_31trTCM_2) Action: fc (af11) ======================================= ======================================= Filter: MCFF6_3 ======================================= Term: 2 ----- Priority: 255 Dest IP: ::/0 Src IP: ::/0 Dst ports: [2152 - 2152] POLICER Id: 3 Action: policer (V6MCFF6_32trTCM_2) Action: fc (nc2) ======================================= ======================================= Filter: MCFF6_3 ======================================= Term: 3 ----- Priority: 254 Dest IP: ::/0 Src IP: ::/0 Action: accept (n/a) ======================================= bash-5.1#
V4MCFF_31trTCM_2
and Term 2 has policer
instance V4MCFF_32trTCM_2
for the same policer
srTCM_2.
Verify Policer Statistics
bash-5.1# qosdpdk --get policer --name V4MCFF_32trTCM_2 ===================================== Policer parameters: ===================================== policer name: V4MCFF_32trTCM_2 policer id: 1 policer type: trTCM policer loss_priority: high policer tcm_action: tcm_discard policer color type: color_aware policer_cir: 6250000 policer_pir: 8750000 policer_cbs: 10000 policer_pbs: 10000 rx_pkts: 1 rx_bytes: 54 drop_pkts: 1 drop_bytes: 54 =====================================
bash-5.1# acl --family inet --filter FF_1 --action V4FF_11srTCM_1 inet filter "FF_1": Policer "V4FF_11srTCM_1" Rx Packets: 1 Rx Bytes: 54 Dropped Packets: 1 Dropped Bytes: 54
Verify Scheduler Statistics
bash-5.1# qosdpdk --get sch --name VOICE-SCHED-MAP Fetch Qos FC info Scheduler name: VOICE-SCHED-MAP Scheduler Index: 0 ============================================== forwarding-class priority ============================================== af11(64) medium-high(2) af12(65) strict-high(0) ef(77) high(1) nc1(78) low(7)
Verify interface rate statistics:
bash-5.1# scheduler --rate Interface rate statistics ------------------------- Interface Vif Scheduler Sched-core-Rx Sched-Port-Rx Sched-Port-Tx ID core Errors Packets Errors Packets Errors Packets eno2 2 4 0 123123 1003 123123 0 123123
Verify scheduler port statistics:
bash-5.1# scheduler --port 2 Scheduler port stats for vif 2, lcore id 4 -------------------------------------------------------------------------------------------------------------- Prio Pkts Bytes Pkts Bytes Avg OK OK Dropped Dropped Qlen -------------------------------------------------------------------------------------------------------------- [00] 4653800464 4500225051704 0 0 0 [01] 5832256302 8795042503416 0 0 0 [02] 4698800780 7085790896132 0 0 0 [03] 2331518465 3520455006380 0 0 0 [04] 116345 175448260 0 0 0 [05] 116345 175448260 0 0 0 [06] 116345 175448260 0 0 0 [07] 1164485219 1756043285364 0 0 0 --------------------------------------------------------------------------------------------------------------
Verify scheduler port rate statistics:
bash-5.1# scheduler –-portrate 2 Scheduler port stats for vif0/2 ------------------------------- Scheduler port stats for vif 2, lcore id 4 -------------------------------------------- Prio Pkts Bytes Pkts Bytes Avg OK OK Dropped Dropped Qlen -------------------------------------------- [00] 68195 102839272 0 0 0 [01] 136391 205678545 0 0 0 [02] 68196 102840779 0 0 0 [03] 68197 102842285 0 0 0 [04] 68196 102840779 0 0 0 [05] 68196 102840779 0 0 0 [06] 68196 102840779 0 0 0 [07] 136390 205677038 0 0 0 --------------------------------------------
Clear scheduler port statistics:
bash-5.1# scheduler --port 2 --clear Counters cleared for scheduler port 2
Verify CoS Features Applied on an Interface
bash-5.1# vif --get 2 Vrouter Interface Table Flags: P=Policy, X=Cross Connect, S=Service Chain, Mr=Receive Mirror Mt=Transmit Mirror, Tc=Transmit Checksum Offload, L3=Layer 3, L2=Layer 2 D=DHCP, Vp=Vhost Physical, Pr=Promiscuous, Vnt=Native Vlan Tagged Mnp=No MAC Proxy, Dpdk=DPDK PMD Interface, Rfl=Receive Filtering Offload, Mon=Interface is Monitored Uuf=Unknown Unicast Flood, Vof=VLAN insert/strip offload, Df=Drop New Flows, L=MAC Learning Enabled Proxy=MAC Requests Proxied Always, Er=Etree Root, Mn=Mirror without Vlan Tag, HbsL=HBS Left Intf HbsR=HBS Right Intf, Ig=Igmp Trap Enabled, Ml=MAC-IP Learning Enabled, Me=Multicast Enabled LsDp=Link down in DP only, Ccc=CCC Enabled, HwTs=Hardware support for Timestamp vif0/2 PCI: 0000:ca:01.2 (Speed 10000, Duplex 1) NH: 8 MTU: 9216 Type:Physical HWaddr:48:5a:0d:6f:b2:1a IPaddr:10.0.1.1 IP6addr:1001::1 DDP: OFF SwLB: ON Vrf:0 Mcast Vrf:0 Flags:L3Vof QOS:0 Ref:17 RX port packets:37865806023 errors:0 RX queue errors to lcore 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Fabric Interface: 0000:ca:01.2 Status: UP Driver: net_iavf Qos classifier: dscp:BA_1 dscpv6:BA6_1 Rewrite: dscp:RE_1 dscpv6:RE6_1 Scheduler: VOICE-SCHED-MAP RX packets:37865806022 bytes:5452675961518 errors:0 TX packets:18646972033 bytes:25596179340972 errors:0 Drops:1835520 Scheduler Enqueue packets:27565192935 errors:0 Scheduler Dequeue packets:27565192935 errors:0 TX port packets:18646972033 errors:0 inet acl MCFF_1 inet6 acl MCFF6_1