OcNOS DC : OpenConfig Command Reference : QoS OpenConfig Translation
QoS OpenConfig Translation
Enable QoS on OcNOS
The below configuration is used to enable QoS on OcNOS.
Release
This configuration was introduced in OcNOS version 6.5.0.
Configuration
The QoS protocol is enabled by default in OcNOS version 6.5.0. However, the QoS protocol needs to be enabled in the older versions before configuring QoS features.
Note that there is no equivalent configuration to enable/disable QoS protocol in OpenConfig model.
OpenConfig NetConf Payload
There is no equivalent configuration in OpenConfig model.
OcNOS CLI command
The below CLI command is used to enable QoS on OcNOS.
OcNOS#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
OcNOS(config)#qos enable
OcNOS(config)#commit
OcNOS NetConf Payload
Here is a sample OcNOS NetConf Payload to enable QoS on OcNOS.
<qos xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-qos">
<global>
<config>
<enable-qos>enable</enable-qos>
</config>
</global>
</qos>
Validation with NetConf get
There is no equivalent configuration.
Restrictions
In OcNOS version 6.5.0, the QoS protocol is already enabled by default.
In OcNOS versions earlier than 6.5.0, the QoS protocol needs to be enabled before configuring QoS features.
Enable QoS Profile on OcNOS
Release
This configuration was introduced in OcNOS version 6.5.0.
Configuration
The QoS feature on OcNOS model needs the Hw profile to be enabled on DC Hardware types.
Note that there is no equivalent configuration on OpenConfig model.
OpenConfig NetConf Payload
There is no equivalent configuration.
OcNOS CLI command
The below CLI command is used to enable QoS Profile on OcNOS.
hardware-profile filter ingress-ipv4-qos enable
OcNOS NetConf Payload
Here is the OcNOS NetConf Payload to enable QoS Profile on OcNOS.
<profiles xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-platform">
<hardware-profile xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-platform">
<filters xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-platform">
<config xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-platform">
<ingress-ipv4-qos/>
</config>
</filters>
</hardware-profile>
</profiles>
Validation with NetConf get
There is no equivalent configuration.
Restrictions
None.
Create Classifiers Profiles
Release
This configuration was introduced in OcNOS version 6.5.0.
Configuration
The OpenConfig QoS Classifiers is a profile responsible for handling data traffic classification.
This configuration does not have a direct equivalent object on OcNOS model. To configure classifier on OcNOS model, it needs to be translated to Access Control List (ACL), class-maps and policy-maps objects.
OpenConfig NetConf Payload
Here is a sample OpenConfig NetConf Payload to create Classifiers profiles.
<qos xmlns="http://openconfig.net/yang/qos">
<queues>
<queue>
<name>q0</name>
<config>
<name>q0</name>
<queue-id>0</queue-id>
</config>
</queue>
<queue>
<name>q1</name>
<config>
<name>q1</name>
<queue-id>1</queue-id>
</config>
</queue>
</queues>
<queue-management-profiles>
<queue-management-profile>
<name>q0</name>
<config>
<name>q0</name>
</config>
<wred>
<uniform>
<config>
<min-threshold>128000</min-threshold>
<max-threshold>256000</max-threshold>
</config>
</uniform>
</wred>
</queue-management-profile>
<queue-management-profile>
<name>q1</name>
<config>
<name>q1</name>
</config>
<wred>
<uniform>
<config>
<min-threshold>256000</min-threshold>
<max-threshold>512000</max-threshold>
</config>
</uniform>
</wred>
</queue-management-profile>
</queue-management-profiles>
<forwarding-groups>
<forwarding-group>
<name>q0</name>
<config>
<name>q0</name>
<output-queue>q0</output-queue>
</config>
</forwarding-group>
</forwarding-groups>
<classifiers>
<classifier>
<name>IN_CUSTOMERIF</name>
<config>
<name>IN_CUSTOMERIF</name>
<type>IPV4</type>
</config>
<terms>
<term>
<id>10</id>
<config>
<id>10</id>
</config>
<conditions>
<ipv4>
<config>
<source-address>1.1.1.1/24</source-address>
<destination-address>2.2.2.2/24</destination-address>
<dscp>af21</dscp>
</config>
</ipv4>
</conditions>
<actions>
<config>
<target-group>q0</target-group>
</config>
</actions>
</term>
<term>
<id>20</id>
<config>
<id>20</id>
</config>
<conditions>
<ipv4>
<config>
<source-address>3.3.3.3/24</source-address>
<destination-address>4.4.4.4/24</destination-address>
<dscp>26</dscp>
</config>
</ipv4>
</conditions>
<actions>
<config>
<target-group>q1</target-group>
</config>
</actions>
</term>
</terms>
</classifier>
</classifiers>
</qos>
OcNOS CLI command
The below CLI command is used to create Classifiers profiles for handling data traffic classification.
qos enable
!
ip access-list IN_CUSTOMERIF$10
1 permit tcp 1.1.1.0/24 2.2.2.0/24 dscp af21
ip access-list IN_CUSTOMERIF$20
1 permit tcp 3.3.3.0/24 4.4.4.0/24 dscp af31
!
class-map type qos match-any IN_CUSTOMERIF$10
match access-group IN_CUSTOMERIF$10
!
class-map type qos match-any IN_CUSTOMERIF$20
match access-group IN_CUSTOMERIF$20
!
policy-map type qos IN_CUSTOMERIF
class type qos IN_CUSTOMERIF$10
set queue 0
exit
class type qos IN_CUSTOMERIF$20
set queue 1
exit
!
OcNOS NetConf Payload
Here is a sample OcNOS Netconf Payload to create Classifiers profiles for handling data traffic classification.
<acl xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-acl">
<acl-sets>
<acl-set>
<name>IN_CUSTOMERIF$10</name>
<type>ip</type>
<config>
<name>IN_CUSTOMERIF$10</name>
<type>ip</type>
</config>
<acl-entries>
<acl-entry>
<sequence-id>1</sequence-id>
<config>
<sequence-id>1</sequence-id>
</config>
<ipv4>
<config>
<forwarding-action>permit</forwarding-action>
<source-address>1.1.1.0/24</source-address>
<destination-address>2.2.2.0/24</destination-address>
<dscp>af21</dscp>
<protocol-tcp/>
</config>
</ipv4>
</acl-entry>
</acl-entries>
</acl-set>
<acl-set>
<name>IN_CUSTOMERIF$20</name>
<type>ip</type>
<config>
<name>IN_CUSTOMERIF$20</name>
<type>ip</type>
</config>
<acl-entries>
<acl-entry>
<sequence-id>1</sequence-id>
<config>
<sequence-id>1</sequence-id>
</config>
<ipv4>
<config>
<forwarding-action>permit</forwarding-action>
<source-address>3.3.3.0/24</source-address>
<destination-address>4.4.4.0/24</destination-address>
<dscp>af31</dscp>
<protocol-tcp/>
</config>
</ipv4>
</acl-entry>
</acl-entries>
</acl-set>
</acl-sets>
</acl>
<qos xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-qos">
<global>
<config>
<enable-qos>enable</enable-qos>
</config>
<class-maps>
<class-map>
<name>IN_CUSTOMERIF$10</name>
<config>
<name>IN_CUSTOMERIF$10</name>
<type>qos</type>
<match-criteria>match-any</match-criteria>
</config>
<match-any-conditions>
<config>
<access-control-list-name>IN_CUSTOMERIF$10</access-control-list-name>
</config>
</match-any-conditions>
</class-map>
<class-map>
<name>IN_CUSTOMERIF$20</name>
<config>
<name>IN_CUSTOMERIF$20</name>
<type>qos</type>
<match-criteria>match-any</match-criteria>
</config>
<match-any-conditions>
<config>
<access-control-list-name>IN_CUSTOMERIF$20</access-control-list-name>
</config>
</match-any-conditions>
</class-map>
</class-maps>
<policy-maps>
<policy-map>
<policy-map-name>IN_CUSTOMERIF</policy-map-name>
<config>
<policy-map-name>IN_CUSTOMERIF</policy-map-name>
<type>qos</type>
</config>
<classes>
<class>
<class-map-name>IN_CUSTOMERIF$10</class-map-name>
<config>
<class-map-name>IN_CUSTOMERIF$10</class-map-name>
<type>qos</type>
</config>
<qos-mode>
<config>
<queue-id>0</queue-id>
</config>
</qos-mode>
</class>
<class>
<class-map-name>IN_CUSTOMERIF$20</class-map-name>
<config>
<class-map-name>IN_CUSTOMERIF$20</class-map-name>
<type>qos</type>
</config>
<qos-mode>
<config>
<queue-id>1</queue-id>
</config>
</qos-mode>
</class>
</classes>
</policy-map>
</policy-maps>
</global>
</qos>
Validation with NetConf get
Here is the NetConf validation response that provides detailed information about creating Classifiers profiles.
<qos xmlns="http://openconfig.net/yang/qos">
<classifiers>
<classifier>
<name>IN_CUSTOMERIF</name>
<config>
<name>IN_CUSTOMERIF</name>
<type>IPV4</type>
</config>
<state>
<name>IN_CUSTOMERIF</name>
<type>IPV4</type>
</state>
<terms>
<term>
<id>10</id>
<config>
<id>10</id>
</config>
<state>
<id>10</id>
</state>
<actions>
<config>
<target-group>q0</target-group>
</config>
<state>
<target-group>q0</target-group>
</state>
</actions>
<conditions>
<ipv4>
<config>
<source-address>1.1.1.0/24</source-address>
<destination-address>2.2.2.0/24</destination-address>
<dscp>18</dscp>
</config>
<state>
<source-address>1.1.1.0/24</source-address>
<destination-address>2.2.2.0/24</destination-address>
<dscp>18</dscp>
</state>
</ipv4>
</conditions>
</term>
<term>
<id>20</id>
<config>
<id>20</id>
</config>
<state>
<id>20</id>
</state>
<actions>
<config>
<target-group>q1</target-group>
</config>
<state>
<target-group>q1</target-group>
</state>
</actions>
<conditions>
<ipv4>
<config>
<source-address>3.3.3.0/24</source-address>
<destination-address>4.4.4.0/24</destination-address>
<dscp>26</dscp>
</config>
<state>
<source-address>3.3.3.0/24</source-address>
<destination-address>4.4.4.0/24</destination-address>
<dscp>26</dscp>
</state>
</ipv4>
</conditions>
</term>
</terms>
</classifier>
</classifiers>
<queue-management-profiles>
<queue-management-profile>
<name>q0</name>
<config>
<name>q0</name>
</config>
<state>
<name>q0</name>
</state>
<wred>
<uniform>
<config>
<min-threshold>128000</min-threshold>
<max-threshold>256000</max-threshold>
</config>
<state>
<min-threshold>128000</min-threshold>
<max-threshold>256000</max-threshold>
</state>
</uniform>
</wred>
</queue-management-profile>
<queue-management-profile>
<name>q1</name>
<config>
<name>q1</name>
</config>
<state>
<name>q1</name>
</state>
<wred>
<uniform>
<config>
<min-threshold>256000</min-threshold>
<max-threshold>512000</max-threshold>
</config>
<state>
<min-threshold>256000</min-threshold>
<max-threshold>512000</max-threshold>
</state>
</uniform>
</wred>
</queue-management-profile>
</queue-management-profiles>
<forwarding-groups>
<forwarding-group>
<name>q0</name>
<config>
<name>q0</name>
<output-queue>q0</output-queue>
</config>
<state>
<name>q0</name>
<output-queue>q0</output-queue>
</state>
</forwarding-group>
</forwarding-groups>
<queues>
<queue>
<name>q0</name>
<config>
<name>q0</name>
<queue-id>0</queue-id>
</config>
<state>
<name>q0</name>
<queue-id>0</queue-id>
</state>
</queue>
<queue>
<name>q1</name>
<config>
<name>q1</name>
<queue-id>1</queue-id>
</config>
<state>
<name>q1</name>
<queue-id>1</queue-id>
</state>
</queue>
</queues>
</qos>
Restrictions
All the paths mentioned below have restrictions:
/qos/interfaces/interface/output/classifiers
This association is not supported on OcNOS model.
/qos/classifiers/classifier/terms/term/actions/remark
This association is not supported on OcNOS model.
Path /qos/queue-management-profiles is available on OpenConfig versions above 1.0.0.
Path /qos/queues was restructured on OpenConfig versions above 1.0.0.
Create Forwarding-groups Profiles
Release
This configuration was introduced in OcNOS version 6.5.0.
Configuration
The OpenConfig profile Forwarding-group does not have an equivalent model on OcNOS model, so this object is stored inside Translation Auxiliary Database.
The object name on OpenConfig format allows any string value. However on OcNOS, all forwarding-profiles have fixed names that follow the pattern q[0-7]. Hence, the Forwarding-groups leaf name must follow this pattern.
OpenConfig NetConf Payload
Here is a sample OpenConfig NetConf Payload to create Forwarding-groups profiles.
<qos xmlns="http://openconfig.net/yang/qos">
<forwarding-groups>
<forwarding-group>
<name>q0</name>
<config>
<name>q0</name>
<output-queue>q0</output-queue>iority>
</config>
</forwarding-group>
</forwarding-groups>
</qos>
OcNOS CLI command
There is no equivalent configuration.
OcNOS NetConf Payload
There is no equivalent configuration.
Validation with NetConf get
Here is a NetConf validation response that provides detailed information about creating Forwarding-groups profiles.
<qos xmlns="http://openconfig.net/yang/qos">
<forwarding-groups>
<forwarding-group>
<name>q0</name>
<config>
<name>q0</name>
<output-queue>q0</output-queue>
</config>
<state>
<name>q0</name>
<output-queue>q0</output-queue>
</state>
</forwarding-group>
</forwarding-groups>
</qos>
Restrictions
Paths /qos/forwarding-groups/forwarding-group/name and /qos/forwarding-groups/forwarding-group/config/name have fixed names that follow the pattern q[0-7].
Create Queues and Queue-Management-profiles Entries
Release
This configuration was introduced in OcNOS version 6.5.0.
Configuration
The OpenConfig profiles Queues and Queue-Management-Profiles do not have an equivalent model on OcNOS, so this object is stored inside Translation Auxiliary Database.
These OpenConfig profiles are used to configure on OcNOS model random-detect configuration from policy-map type queuing object.
The object name on OpenConfig format allows any string value. However on OcNOS, they have fixed names that follow the pattern q[0-7]. Hence the Queues and Queue-Management-Profiles leaf name must follow this pattern.
OpenConfig NetConf Payload
Here is a sample OpenConfig NetConf Payload to create Queues and Queue-Management-profiles entries.
<qos xmlns="http://openconfig.net/yang/qos">
<queues>
<queue>
<name>q0</name>
<config>
<name>q0</name>
<queue-id>0</queue-id>
</config>
</queue>
<queue>
<name>q1</name>
<config>
<name>q1</name>
<queue-id>1</queue-id>
</config>
</queue>
</queues>
<queue-management-profiles>
<queue-management-profile>
<name>q0</name>
<config>
<name>q0</name>
</config>
<wred>
<uniform>
<config>
<min-threshold>128000</min-threshold>
<max-threshold>256000</max-threshold>
</config>
</uniform>
</wred>
</queue-management-profile>
<queue-management-profile>
<name>q1</name>
<config>
<name>q1</name>
</config>
<wred>
<uniform>
<config>
<min-threshold>256000</min-threshold>
<max-threshold>512000</max-threshold>
</config>
</uniform>
</wred>
</queue-management-profile>
</queue-management-profiles>
</qos>
OcNOS CLI command
There is no equivalent configuration.
OcNOS NetConf Payload
There is no equivalent configuration.
Validation with NetConf get
Here is the NetConf response that gives detailed information about creating Queues and Queue-Management-profiles entries.
<qos xmlns="http://openconfig.net/yang/qos">
<queues>
<queue>
<name>q0</name>
<config>
<name>q0</name>
<queue-id>0</queue-id>
</config>
<state>
<name>q0</name>
<queue-id>0</queue-id>
</state>
</queue>
</queues>
<queue-management-profiles>
<queue-management-profile>
<name>q0</name>
<config>
<name>q0</name>
</config>
<state>
<name>q0</name>
</state>
<wred>
<uniform>
<config>
<min-threshold>128000</min-threshold>
<max-threshold>256000</max-threshold>
</config>
<state>
<min-threshold>128000</min-threshold>
<max-threshold>256000</max-threshold>
</state>
</uniform>
</wred>
</queue-management-profile>
<queue-management-profile>
<name>q1</name>
<config>
<name>q1</name>
</config>
<state>
<name>q1</name>
</state>
<wred>
<uniform>
<config>
<min-threshold>256000</min-threshold>
<max-threshold>512000</max-threshold>
</config>
<state>
<min-threshold>256000</min-threshold>
<max-threshold>512000</max-threshold>
</state>
</uniform>
</wred>
</queue-management-profile>
</queue-management-profiles>
</qos>
Restrictions
Path /qos/queue-management-profiles is available on OpenConfig versions above 1.0.0.
Path /qos/queues was restructured on OpenConfig versions above 1.0.0.
The path /qos/interfaces/interface/output/queues have its association that is not supported on OcNOS models.
The path /qos/interfaces/interface/input/queues/queue[name]/config/queue-management-profile have its association that is not supported on OcNOS models.
The paths below have fixed leaf names that follow the pattern q[0-7].
/qos/queues/queue/name
/qos/queues/queue/config/name
/qos/queue-management-profiles/queue-management-profile/name
/qos/queue-management-profiles/queue-management-profile/config/name
Create Scheduler-policies Entries
Release
This configuration was introduced in OcNOS version 6.5.0.
Configuration
On DC platforms, there are limitations to configure QoS WRED and tail-drops data together. Hence, the Scheduler-policies entries is divided into ones configured with leaf /openconfig-qos:qos/scheduler-policies/scheduler-policy/schedulers/scheduler/one-rate-two-color/config/max-queue-depth-bytes container, and the ones that do not have this leaf.
The scheduler-policies without leaf /openconfig-qos:qos/scheduler-policies/scheduler-policy/schedulers/scheduler/one-rate-two-color/config/max-queue-depth-bytes, configures the WRED configuration on OcNOS and sets data based on OpenConfig queue-management-profiles container.
The scheduler-policies with leaf /openconfig-qos:qos/scheduler-policies/scheduler-policy/schedulers/scheduler/one-rate-two-color/config/max-queue-depth-bytes,configures the tail-drops configuration on OcNOS. It is based on data set OpenConfig leaf /openconfig-qos:qos/scheduler-policies/scheduler-policy/schedulers/scheduler/one-rate-two-color/config/max-queue-depth-bytes to configure OcNOS leaf /ipi-qos:qos/global/policy-maps/policy-map/classes/class/queue-mode/tail-drops/tail-drop/config/max-threshold.
The scheduler-policies input configuration for OpenConfig XPath /oc-qos:qos/scheduler-policies/scheduler-policy/schedulers/scheduler/inputs/input/config now has its leaf queue as mandatory in operations "create", "delete", "remove" and "merge". This is because the translation mapping done on OcNOS datamodel to XPath /qos/global/policy-maps/policy-map/classes/class and the queue leaf points to class-map-name leaf on OcNOS. If this condition is not addressed, the Translation Framework throws an error when the OpenConfig payload is applied.
Create Scheduler-policies entries without leaf max-queue-depth-bytes
Release
This configuration was introduced in OcNOS version 6.5.0.
Configuration
On DC platforms, there are limitations to configure QoS WRED and tail-drops data together. Hence, the Scheduler-policies entries is divided into ones configured with leaf /openconfig-qos:qos/scheduler-policies/scheduler-policy/schedulers/scheduler/one-rate-two-color/config/max-queue-depth-bytes container, and the ones that do not have this leaf.
The scheduler-policies without leaf /openconfig-qos:qos/scheduler-policies/scheduler-policy/schedulers/scheduler/one-rate-two-color/config/max-queue-depth-bytes, configures the WRED configuration on OcNOS and sets data based on OpenConfig queue-management-profiles container.
OpenConfig NetConf Payload
Here is a sample OpenConfig NetConf Payload to create Scheduler-policies entries without leaf max-queue-depth-bytes.
<qos xmlns="http://openconfig.net/yang/qos">
<queues>
<queue>
<name>q0</name>
<config>
<name>q0</name>
<queue-id>0</queue-id>
</config>
</queue>
<queue>
<name>q1</name>
<config>
<name>q1</name>
<queue-id>1</queue-id>
</config>
</queue>
</queues>
<queue-management-profiles>
<queue-management-profile>
<name>q0</name>
<config>
<name>q0</name>
</config>
<wred>
<uniform>
<config>
<min-threshold>128000</min-threshold>
<max-threshold>256000</max-threshold>
</config>
</uniform>
</wred>
</queue-management-profile>
<queue-management-profile>
<name>q1</name>
<config>
<name>q1</name>
</config>
<wred>
<uniform>
<config>
<min-threshold>256000</min-threshold>
<max-threshold>512000</max-threshold>
</config>
</uniform>
</wred>
</queue-management-profile>
</queue-management-profiles>
<forwarding-groups>
<forwarding-group>
<name>q0</name>
<config>
<name>q0</name>
<output-queue>q0</output-queue>
</config>
</forwarding-group>
</forwarding-groups>
<classifiers>
<classifier>
<name>IN_CUSTOMERIF</name>
<config>
<name>IN_CUSTOMERIF</name>
<type>IPV4</type>
</config>
<terms>
<term>
<id>10</id>
<config>
<id>10</id>
</config>
<conditions>
<ipv4>
<config>
<source-address>1.1.1.1/24</source-address>
<destination-address>2.2.2.2/24</destination-address>
<dscp>af21</dscp>
</config>
</ipv4>
</conditions>
<actions>
<config>
<target-group>q0</target-group>
</config>
</actions>
</term>
<term>
<id>20</id>
<config>
<id>20</id>
</config>
<conditions>
<ipv4>
<config>
<source-address>3.3.3.3/24</source-address>
<destination-address>4.4.4.4/24</destination-address>
<dscp>26</dscp>
</config>
</ipv4>
</conditions>
<actions>
<config>
<target-group>q1</target-group>
</config>
</actions>
</term>
</terms>
</classifier>
</classifiers>
<scheduler-policies>
<scheduler-policy>
<name>SCHEDULER_POLICY_1</name>
<config>
<name>SCHEDULER_POLICY_1</name>
</config>
<schedulers>
<scheduler>
<sequence>10</sequence>
<config>
<sequence>10</sequence>
<type>oc-qos-types:QOS_SCHEDULER_TYPE:ONE_RATE_TWO_COLOR</type>
<priority>STRICT</priority>
</config>
<inputs>
<input>
<id>SCHEDULER_POLICY_AF1</id>
<config>
<id>SCHEDULER_POLICY_AF1</id>
<input-type>QUEUE</input-type>
<queue>q0</queue>
<weight>5</weight>
</config>
</input>
</inputs>
</scheduler>
</schedulers>
</scheduler-policy>
</scheduler-policies>
</qos>
OcNOS CLI command
The below CLI command is used to create Scheduler-policies entries without leaf max-queue-depth-bytes.
qos enable
!
ip access-list IN_CUSTOMERIF$10
1 permit tcp 1.1.1.0/24 2.2.2.0/24 dscp af21
ip access-list IN_CUSTOMERIF$20
1 permit tcp 3.3.3.0/24 4.4.4.0/24 dscp af31
!
class-map type qos match-any IN_CUSTOMERIF$10
match access-group IN_CUSTOMERIF$10
!
class-map type qos match-any IN_CUSTOMERIF$20
match access-group IN_CUSTOMERIF$20
!
policy-map type qos IN_CUSTOMERIF
class type qos IN_CUSTOMERIF$10
set queue 0
exit
class type qos IN_CUSTOMERIF$20
set queue 1
exit
!
policy-map type queuing default SCHEDULER_POLICY_1
class type queuing default q0
wrr-queue weight 5
random-detect min-threshold 128000 max-threshold 256000 bytes drop-probability 80
exit
!
OcNOS NetConf Payload
Here is a sample OcNOS NetConf Payload to create Scheduler-policies entries without leaf max-queue-depth-bytes.
<acl xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-acl">
<acl-sets>
<acl-set>
<name>IN_CUSTOMERIF$10</name>
<type>ip</type>
<config>
<name>IN_CUSTOMERIF$10</name>
<type>ip</type>
</config>
<acl-entries>
<acl-entry>
<sequence-id>1</sequence-id>
<config>
<sequence-id>1</sequence-id>
</config>
<ipv4>
<config>
<forwarding-action>permit</forwarding-action>
<source-address>1.1.1.0/24</source-address>
<destination-address>2.2.2.0/24</destination-address>
<dscp>af21</dscp>
<protocol-tcp/>
</config>
</ipv4>
</acl-entry>
</acl-entries>
</acl-set>
<acl-set>
<name>IN_CUSTOMERIF$20</name>
<type>ip</type>
<config>
<name>IN_CUSTOMERIF$20</name>
<type>ip</type>
</config>
<acl-entries>
<acl-entry>
<sequence-id>1</sequence-id>
<config>
<sequence-id>1</sequence-id>
</config>
<ipv4>
<config>
<forwarding-action>permit</forwarding-action>
<source-address>3.3.3.0/24</source-address>
<destination-address>4.4.4.0/24</destination-address>
<dscp>af31</dscp>
<protocol-tcp/>
</config>
</ipv4>
</acl-entry>
</acl-entries>
</acl-set>
</acl-sets>
</acl>
<qos xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-qos">
<global>
<config>
<enable-qos>enable</enable-qos>
<statistics-enabled/>
</config>
<class-maps>
<class-map>
<name>IN_CUSTOMERIF$10</name>
<config>
<name>IN_CUSTOMERIF$10</name>
<type>qos</type>
<match-criteria>match-any</match-criteria>
</config>
<match-any-conditions>
<config>
<access-control-list-name>IN_CUSTOMERIF$10</access-control-list-name>
</config>
</match-any-conditions>
</class-map>
<class-map>
<name>IN_CUSTOMERIF$20</name>
<config>
<name>IN_CUSTOMERIF$20</name>
<type>qos</type>
<match-criteria>match-any</match-criteria>
</config>
<match-any-conditions>
<config>
<access-control-list-name>IN_CUSTOMERIF$20</access-control-list-name>
</config>
</match-any-conditions>
</class-map>
</class-maps>
<policy-maps>
<policy-map>
<policy-map-name>IN_CUSTOMERIF</policy-map-name>
<config>
<policy-map-name>IN_CUSTOMERIF</policy-map-name>
<type>qos</type>
</config>
<classes>
<class>
<class-map-name>IN_CUSTOMERIF$10</class-map-name>
<config>
<class-map-name>IN_CUSTOMERIF$10</class-map-name>
<type>qos</type>
</config>
<qos-mode>
<config>
<queue-id>0</queue-id>
</config>
</qos-mode>
</class>
<class>
<class-map-name>IN_CUSTOMERIF$20</class-map-name>
<config>
<class-map-name>IN_CUSTOMERIF$20</class-map-name>
<type>qos</type>
</config>
<qos-mode>
<config>
<queue-id>1</queue-id>
</config>
</qos-mode>
</class>
</classes>
</policy-map>
<policy-map>
<policy-map-name>SCHEDULER_POLICY_1</policy-map-name>
<config>
<policy-map-name>SCHEDULER_POLICY_1</policy-map-name>
<type>queuing-default</type>
</config>
<classes>
<class>
<class-map-name>q0</class-map-name>
<config>
<class-map-name>q0</class-map-name>
<type>queuing-default</type>
</config>
<queue-mode>
<config>
<weighted-round-robin-queue-weight>5</weighted-round-robin-queue-weight>
</config>
<red>
<wred>
<config>
<min-threshold>128000</min-threshold>
<max-threshold>256000</max-threshold>
<threshold-unit>bytes</threshold-unit>
<drop-probability>80</drop-probability>
</config>
</wred>
</red>
</queue-mode>
</class>
</classes>
</policy-map>
<policy-map>
<policy-map-name>subif-default-out-policy</policy-map-name>
<config>
<policy-map-name>subif-default-out-policy</policy-map-name>
<type>queuing-default</type>
</config>
<classes>
<class>
<class-map-name>q1</class-map-name>
<config>
<class-map-name>q1</class-map-name>
<type>queuing-default</type>
</config>
<queue-mode>
<config>
<priority-level>0</priority-level>
</config>
</queue-mode>
</class>
<class>
<class-map-name>q2</class-map-name>
<config>
<class-map-name>q2</class-map-name>
<type>queuing-default</type>
</config>
<queue-mode>
<config>
<priority-level>0</priority-level>
</config>
</queue-mode>
</class>
<class>
<class-map-name>q3</class-map-name>
<config>
<class-map-name>q3</class-map-name>
<type>queuing-default</type>
</config>
<queue-mode>
<config>
<priority-level>0</priority-level>
</config>
</queue-mode>
</class>
<class>
<class-map-name>q4</class-map-name>
<config>
<class-map-name>q4</class-map-name>
<type>queuing-default</type>
</config>
<queue-mode>
<config>
<priority-level>0</priority-level>
</config>
</queue-mode>
</class>
<class>
<class-map-name>q5</class-map-name>
<config>
<class-map-name>q5</class-map-name>
<type>queuing-default</type>
</config>
<queue-mode>
<config>
<priority-level>0</priority-level>
</config>
</queue-mode>
</class>
<class>
<class-map-name>q6</class-map-name>
<config>
<class-map-name>q6</class-map-name>
<type>queuing-default</type>
</config>
<queue-mode>
<config>
<priority-level>0</priority-level>
</config>
</queue-mode>
</class>
<class>
<class-map-name>q7</class-map-name>
<config>
<class-map-name>q7</class-map-name>
<type>queuing-default</type>
</config>
<queue-mode>
<config>
<priority-level>0</priority-level>
</config>
</queue-mode>
</class>
</classes>
</policy-map>
</policy-maps>
</global>
</qos>
Validation with NetConf get
Here is the NetConf response that gives detailed information about creating Scheduler-policies entries without leaf max-queue-depth-bytes.
<qos xmlns="http://openconfig.net/yang/qos">
<classifiers>
<classifier>
<name>IN_CUSTOMERIF</name>
<config>
<name>IN_CUSTOMERIF</name>
<type>IPV4</type>
</config>
<state>
<name>IN_CUSTOMERIF</name>
<type>IPV4</type>
</state>
<terms>
<term>
<id>10</id>
<config>
<id>10</id>
</config>
<state>
<id>10</id>
</state>
<actions>
<config>
<target-group>q0</target-group>
</config>
<state>
<target-group>q0</target-group>
</state>
</actions>
<conditions>
<ipv4>
<config>
<source-address>1.1.1.0/24</source-address>
<destination-address>2.2.2.0/24</destination-address>
<dscp>18</dscp>
</config>
<state>
<source-address>1.1.1.0/24</source-address>
<destination-address>2.2.2.0/24</destination-address>
<dscp>18</dscp>
</state>
</ipv4>
</conditions>
</term>
<term>
<id>20</id>
<config>
<id>20</id>
</config>
<state>
<id>20</id>
</state>
<actions>
<config>
<target-group>q1</target-group>
</config>
<state>
<target-group>q1</target-group>
</state>
</actions>
<conditions>
<ipv4>
<config>
<source-address>3.3.3.0/24</source-address>
<destination-address>4.4.4.0/24</destination-address>
<dscp>26</dscp>
</config>
<state>
<source-address>3.3.3.0/24</source-address>
<destination-address>4.4.4.0/24</destination-address>
<dscp>26</dscp>
</state>
</ipv4>
</conditions>
</term>
</terms>
</classifier>
</classifiers>
<scheduler-policies>
<scheduler-policy>
<name>SCHEDULER_POLICY_1</name>
<config>
<name>SCHEDULER_POLICY_1</name>
</config>
<state>
<name>SCHEDULER_POLICY_1</name>
</state>
<schedulers>
<scheduler>
<sequence>10</sequence>
<config>
<sequence>10</sequence>
<type
xmlns:oc-qos-types="http://openconfig.net/yang/qos-types">oc-qos-types:ONE_RATE_TWO_COLOR</type>
<priority>STRICT</priority>
</config>
<inputs>
<input>
<id>SCHEDULER_POLICY_AF1</id>
<config>
<id>SCHEDULER_POLICY_AF1</id>
<queue>q0</queue>
<weight>5</weight>
<input-type>QUEUE</input-type>
</config>
<state>
<weight>5</weight>
<id>SCHEDULER_POLICY_AF1</id>
<queue>q0</queue>
<input-type>QUEUE</input-type>
</state>
</input>
</inputs>
<state>
<sequence>10</sequence>
<type
xmlns:oc-qos-types="http://openconfig.net/yang/qos-types">oc-qos-types:ONE_RATE_TWO_COLOR</type>
<priority>STRICT</priority>
</state>
</scheduler>
</schedulers>
</scheduler-policy>
</scheduler-policies>
<queue-management-profiles>
<queue-management-profile>
<name>q0</name>
<config>
<name>q0</name>
</config>
<state>
<name>q0</name>
</state>
<wred>
<uniform>
<config>
<min-threshold>128000</min-threshold>
<max-threshold>256000</max-threshold>
<weight>20</weight>
<max-threshold>90</max-threshold>
</config>
<state>
<min-threshold>128000</min-threshold>
<max-threshold>256000</max-threshold>
<weight>20</weight>
<max-threshold>90</max-threshold>
</state>
</uniform>
</wred>
</queue-management-profile>
<queue-management-profile>
<name>q1</name>
<config>
<name>q1</name>
</config>
<state>
<name>q1</name>
</state>
<wred>
<uniform>
<config>
<min-threshold>256000</min-threshold>
<max-threshold>512000</max-threshold>
<weight>10</weight>
<max-threshold>70</max-threshold>
</config>
<state>
<min-threshold>256000</min-threshold>
<max-threshold>512000</max-threshold>
<weight>10</weight>
<max-threshold>70</max-threshold>
</state>
</uniform>
</wred>
</queue-management-profile>
</queue-management-profiles>
<forwarding-groups>
<forwarding-group>
<name>q0</name>
<config>
<name>q0</name>
<output-queue>q0</output-queue>
<fabric-priority>128</fabric-priority>
</config>
<state>
<name>q0</name>
<output-queue>q0</output-queue>
<fabric-priority>128</fabric-priority>
</state>
</forwarding-group>
</forwarding-groups>
<queues>
<queue>
<name>q0</name>
<config>
<name>q0</name>
<queue-id>0</queue-id>
</config>
<state>
<name>q0</name>
<queue-id>0</queue-id>
</state>
</queue>
<queue>
<name>q1</name>
<config>
<name>q1</name>
<queue-id>1</queue-id>
</config>
<state>
<name>q1</name>
<queue-id>1</queue-id>
</state>
</queue>
</queues>
</qos>
Restrictions
Path /qos/queue-management-profiles is available on OpenConfig versions above 1.0.0.
Path /qos/queues has been restructured on OpenConfig versions above 1.0.0.
The only valid value for path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/config/priority is STRICT.
The leaf name for path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/inputs/input/config/queue have fixed names that follow the pattern q[0-7].
The scheduler-policies input configuration for OpenConfig XPath /oc-qos:qos/scheduler-policies/scheduler-policy/schedulers/scheduler/inputs/input/config now has its leaf queue as mandatory in operations "create", "delete", "remove" and "merge". This is because the translation mapping done on OcNOS datamodel to XPath /qos/global/policy-maps/policy-map/classes/class and the queue leaf points to class-map-name leaf on OcNOS. If this condition is not addressed, the Translation Framework throws an error when the OpenConfig payload is applied.
All the paths mentioned below have restrictions:
/qos/interfaces/interface/input/scheduler-policy
This association is not valid on OcNOS and is not supported.
/qos/scheduler-policies/scheduler-policy/schedulers/scheduler/output
This association is not valid on OcNOS and is not supported.
/qos/scheduler-policies/scheduler-policy/schedulers/scheduler/one-rate-two-color/config/bc
This association is not valid on OcNOS and is not supported.
/qos/scheduler-policies/scheduler-policy/schedulers/scheduler/one-rate-two-color/config/cir-pct
This association is not valid on OcNOS and is not supported..
/qos/scheduler-policies/scheduler-policy/schedulers/scheduler
This list has a fixed max-element as one entry.
/qos/scheduler-policies/scheduler-policy/schedulers/scheduler/config/type
This configuration has a fixed value: ONE_RATE_TWO_COLOR.
/qos/scheduler-policies/scheduler-policy/schedulers/scheduler/inputs/input/config/input-type
This configuration has a fixed value: QUEUE.
/qos/scheduler-policies/scheduler-policy/schedulers/scheduler/one-rate-two-color/config/cir-pct-remaining
This association is not valid on OcNOS and is not supported.
/qos/scheduler-policies/scheduler-policy/schedulers/scheduler/one-rate-two-color/config/queuing-behavior
This configuration has a fixed value: SHAPE.
/qos/scheduler-policies/scheduler-policy/schedulers/scheduler/one-rate-two-color/config/max-queue-depth-packets
This association is not valid on OcNOS and is not supported.
/qos/scheduler-policies/scheduler-policy/schedulers/scheduler/one-rate-two-color/config/max-queue-depth-percent
This association is not valid on OcNOS and is not supported..
/qos/scheduler-policies/scheduler-policy/schedulers/scheduler/one-rate-two-color/conform-action
This association is not valid on OcNOS and is not supported.
/qos/scheduler-policies/scheduler-policy/schedulers/scheduler/one-rate-two-color/exceed-action
This association is not valid on OcNOS and is not supported..
/qos/scheduler-policies/scheduler-policy/schedulers/scheduler/two-rate-three-color
This association is not valid on OcNOS and is not supported.
Create Scheduler-policies Entries with leaf max-queue-depth-bytes
Release
This configuration was introduced in OcNOS version 6.5.0.
Configuration
On DC platforms, there are limitations to configure QoS WRED and tail-drops data together. Hence, the Scheduler-policies entries is divided into ones configured with leaf /openconfig-qos:qos/scheduler-policies/scheduler-policy/schedulers/scheduler/one-rate-two-color/config/max-queue-depth-bytes container, and the ones that do not have this leaf.
The scheduler-policies with leaf /openconfig-qos:qos/scheduler-policies/scheduler-policy/schedulers/scheduler/one-rate-two-color/config/max-queue-depth-bytes,configures the tail-drops configuration on OcNOS. It is based on data set OpenConfig leaf /openconfig-qos:qos/scheduler-policies/scheduler-policy/schedulers/scheduler/one-rate-two-color/config/max-queue-depth-bytes to configure OcNOS leaf /ipi-qos:qos/global/policy-maps/policy-map/classes/class/queue-mode/tail-drops/tail-drop/config/max-threshold.
OpenConfig NetConf Payload
Here is a sample OpenConfig NetConf Payload to create Scheduler-policies entries with leaf max-queue-depth-bytes.
<qos xmlns="http://openconfig.net/yang/qos">
<queues>
<queue>
<name>q0</name>
<config>
<name>q0</name>
<queue-id>0</queue-id>
</config>
</queue>
<queue>
<name>q1</name>
<config>
<name>q1</name>
<queue-id>1</queue-id>
</config>
</queue>
</queues>
<queue-management-profiles>
<queue-management-profile>
<name>q0</name>
<config>
<name>q0</name>
</config>
<wred>
<uniform>
<config>
<min-threshold>128000</min-threshold>
<max-threshold>256000</max-threshold>
</config>
</uniform>
</wred>
</queue-management-profile>
<queue-management-profile>
<name>q1</name>
<config>
<name>q1</name>
</config>
<wred>
<uniform>
<config>
<min-threshold>256000</min-threshold>
<max-threshold>512000</max-threshold>
</config>
</uniform>
</wred>
</queue-management-profile>
</queue-management-profiles>
<forwarding-groups>
<forwarding-group>
<name>q0</name>
<config>
<name>q0</name>
<output-queue>q0</output-queue>
</config>
</forwarding-group>
</forwarding-groups>
<classifiers>
<classifier>
<name>IN_CUSTOMERIF</name>
<config>
<name>IN_CUSTOMERIF</name>
<type>IPV4</type>
</config>
<terms>
<term>
<id>10</id>
<config>
<id>10</id>
</config>
<conditions>
<ipv4>
<config>
<source-address>1.1.1.1/24</source-address>
<destination-address>2.2.2.2/24</destination-address>
<dscp>af21</dscp>
</config>
</ipv4>
</conditions>
<actions>
<config>
<target-group>q0</target-group>
</config>
</actions>
</term>
<term>
<id>20</id>
<config>
<id>20</id>
</config>
<conditions>
<ipv4>
<config>
<source-address>3.3.3.3/24</source-address>
<destination-address>4.4.4.4/24</destination-address>
<dscp>26</dscp>
</config>
</ipv4>
</conditions>
<actions>
<config>
<target-group>q1</target-group>
</config>
</actions>
</term>
</terms>
</classifier>
</classifiers>
<scheduler-policies>
<scheduler-policy>
<name>SCHEDULER_POLICY_2</name>
<config>
<name>SCHEDULER_POLICY_2</name>
</config>
<schedulers>
<scheduler>
<sequence>20</sequence>
<config>
<sequence>20</sequence>
<type
xmlns:oc-qos-types="http://openconfig.net/yang/qos-types">oc-qos-types:ONE_RATE_TWO_COLOR</type>
<priority>STRICT</priority>
</config>
<inputs>
<input>
<id>SCHEDULER_POLICY_AF1</id>
<config>
<id>SCHEDULER_POLICY_AF1</id>
<queue>q0</queue>
<weight>5</weight>
<input-type>QUEUE</input-type>
</config>
</input>
<input>
<id>SCHEDULER_POLICY_AF2</id>
<config>
<id>SCHEDULER_POLICY_AF2</id>
<queue>q1</queue>
<weight>14</weight>
<input-type>QUEUE</input-type>
</config>
</input>
</inputs>
<one-rate-two-color>
<config>
<max-queue-depth-bytes>64000</max-queue-depth-bytes>
<cir>256000000</cir>
<queuing-behavior>SHAPE</queuing-behavior>
</config>
</one-rate-two-color>
</scheduler>
</schedulers>
</scheduler-policy>
</scheduler-policies>
</qos>
OcNOS CLI command
The below CLI command is used to create Scheduler-policies entries with leaf max-queue-depth-bytes.
qos enable
!
ip access-list IN_CUSTOMERIF$10
1 permit tcp 1.1.1.0/24 2.2.2.0/24 dscp af21
ip access-list IN_CUSTOMERIF$20
1 permit tcp 3.3.3.0/24 4.4.4.0/24 dscp af31
!
class-map type qos match-any IN_CUSTOMERIF$10
match access-group IN_CUSTOMERIF$10
!
class-map type qos match-any IN_CUSTOMERIF$20
match access-group IN_CUSTOMERIF$20
!
policy-map type qos IN_CUSTOMERIF
class type qos IN_CUSTOMERIF$10
set queue 0
exit
class type qos IN_CUSTOMERIF$20
set queue 1
exit
!
policy-map type queuing default SCHEDULER_POLICY_2
class type queuing default q0
shape 256000000 kbps
wrr-queue weight 5
queue-limit 64000 bytes
exit
class type queuing default q1
shape 256000000 kbps
wrr-queue weight 14
queue-limit 64000 bytes
exit
!
OcNOS NetConf Payload
Here is a sample OcNOS NetConf Payload to create Scheduler-policies entries with leaf max-queue-depth-bytes.
<acl xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-acl">
<acl-sets>
<acl-set>
<name>IN_CUSTOMERIF$10</name>
<type>ip</type>
<config>
<name>IN_CUSTOMERIF$10</name>
<type>ip</type>
</config>
<acl-entries>
<acl-entry>
<sequence-id>1</sequence-id>
<config>
<sequence-id>1</sequence-id>
</config>
<ipv4>
<config>
<forwarding-action>permit</forwarding-action>
<source-address>1.1.1.0/24</source-address>
<destination-address>2.2.2.0/24</destination-address>
<dscp>af21</dscp>
<protocol-tcp/>
</config>
</ipv4>
</acl-entry>
</acl-entries>
</acl-set>
<acl-set>
<name>IN_CUSTOMERIF$20</name>
<type>ip</type>
<config>
<name>IN_CUSTOMERIF$20</name>
<type>ip</type>
</config>
<acl-entries>
<acl-entry>
<sequence-id>1</sequence-id>
<config>
<sequence-id>1</sequence-id>
</config>
<ipv4>
<config>
<forwarding-action>permit</forwarding-action>
<source-address>3.3.3.0/24</source-address>
<destination-address>4.4.4.0/24</destination-address>
<dscp>af31</dscp>
<protocol-tcp/>
</config>
</ipv4>
</acl-entry>
</acl-entries>
</acl-set>
</acl-sets>
</acl>
<qos xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-qos">
<global>
<config>
<enable-qos>enable</enable-qos>
<statistics-enabled/>
</config>
<class-maps>
<class-map>
<name>IN_CUSTOMERIF$10</name>
<config>
<name>IN_CUSTOMERIF$10</name>
<type>qos</type>
<match-criteria>match-any</match-criteria>
</config>
<match-any-conditions>
<config>
<access-control-list-name>IN_CUSTOMERIF$10</access-control-list-name>
</config>
</match-any-conditions>
</class-map>
<class-map>
<name>IN_CUSTOMERIF$20</name>
<config>
<name>IN_CUSTOMERIF$20</name>
<type>qos</type>
<match-criteria>match-any</match-criteria>
</config>
<match-any-conditions>
<config>
<access-control-list-name>IN_CUSTOMERIF$20</access-control-list-name>
</config>
</match-any-conditions>
</class-map>
</class-maps>
<policy-maps>
<policy-map>
<policy-map-name>IN_CUSTOMERIF</policy-map-name>
<config>
<policy-map-name>IN_CUSTOMERIF</policy-map-name>
<type>qos</type>
</config>
<classes>
<class>
<class-map-name>IN_CUSTOMERIF$10</class-map-name>
<config>
<class-map-name>IN_CUSTOMERIF$10</class-map-name>
<type>qos</type>
</config>
<qos-mode>
<config>
<queue-id>0</queue-id>
</config>
</qos-mode>
</class>
<class>
<class-map-name>IN_CUSTOMERIF$20</class-map-name>
<config>
<class-map-name>IN_CUSTOMERIF$20</class-map-name>
<type>qos</type>
</config>
<qos-mode>
<config>
<queue-id>1</queue-id>
</config>
</qos-mode>
</class>
</classes>
</policy-map>
<policy-map>
<policy-map-name>SCHEDULER_POLICY_2</policy-map-name>
<config>
<policy-map-name>SCHEDULER_POLICY_2</policy-map-name>
<type>queuing-default</type>
</config>
<classes>
<class>
<class-map-name>q0</class-map-name>
<config>
<class-map-name>q0</class-map-name>
<type>queuing-default</type>
</config>
<queue-mode>
<config>
<weighted-round-robin-queue-weight>5</weighted-round-robin-queue-weight>
</config>
<tail-drops>
<tail-drop>
<max-threshold>64000</max-threshold>
<max-threshold-type>bytes</max-threshold-type>
<config>
<max-threshold>64000</max-threshold>
<max-threshold-type>bytes</max-threshold-type>
</config>
</tail-drop>
</tail-drops>
<shapes>
<shape>
<rate-value>256000000</rate-value>
<rate-unit>kbps</rate-unit>
<config>
<rate-value>256000000</rate-value>
<rate-unit>kbps</rate-unit>
</config>
</shape>
</shapes>
</queue-mode>
</class>
<class>
<class-map-name>q1</class-map-name>
<config>
<class-map-name>q1</class-map-name>
<type>queuing-default</type>
</config>
<queue-mode>
<config>
<weighted-round-robin-queue-weight>14</weighted-round-robin-queue-weight>
</config>
<tail-drops>
<tail-drop>
<max-threshold>64000</max-threshold>
<max-threshold-type>bytes</max-threshold-type>
<config>
<max-threshold>64000</max-threshold>
<max-threshold-type>bytes</max-threshold-type>
</config>
</tail-drop>
</tail-drops>
<shapes>
<shape>
<rate-value>256000000</rate-value>
<rate-unit>kbps</rate-unit>
<config>
<rate-value>256000000</rate-value>
<rate-unit>kbps</rate-unit>
</config>
</shape>
</shapes>
</queue-mode>
</class>
</classes>
</policy-map>
<policy-map>
<policy-map-name>subif-default-out-policy</policy-map-name>
<config>
<policy-map-name>subif-default-out-policy</policy-map-name>
<type>queuing-default</type>
</config>
<classes>
<class>
<class-map-name>q1</class-map-name>
<config>
<class-map-name>q1</class-map-name>
<type>queuing-default</type>
</config>
<queue-mode>
<config>
<priority-level>0</priority-level>
</config>
</queue-mode>
</class>
<class>
<class-map-name>q2</class-map-name>
<config>
<class-map-name>q2</class-map-name>
<type>queuing-default</type>
</config>
<queue-mode>
<config>
<priority-level>0</priority-level>
</config>
</queue-mode>
</class>
<class>
<class-map-name>q3</class-map-name>
<config>
<class-map-name>q3</class-map-name>
<type>queuing-default</type>
</config>
<queue-mode>
<config>
<priority-level>0</priority-level>
</config>
</queue-mode>
</class>
<class>
<class-map-name>q4</class-map-name>
<config>
<class-map-name>q4</class-map-name>
<type>queuing-default</type>
</config>
<queue-mode>
<config>
<priority-level>0</priority-level>
</config>
</queue-mode>
</class>
<class>
<class-map-name>q5</class-map-name>
<config>
<class-map-name>q5</class-map-name>
<type>queuing-default</type>
</config>
<queue-mode>
<config>
<priority-level>0</priority-level>
</config>
</queue-mode>
</class>
<class>
<class-map-name>q6</class-map-name>
<config>
<class-map-name>q6</class-map-name>
<type>queuing-default</type>
</config>
<queue-mode>
<config>
<priority-level>0</priority-level>
</config>
</queue-mode>
</class>
<class>
<class-map-name>q7</class-map-name>
<config>
<class-map-name>q7</class-map-name>
<type>queuing-default</type>
</config>
<queue-mode>
<config>
<priority-level>0</priority-level>
</config>
</queue-mode>
</class>
</classes>
</policy-map>
</policy-maps>
</global>
</qos>
Validation with NetConf get
Here is the NetConf response that gives detailed information about creating Scheduler-policies entries with leaf max-queue-depth-bytes.
<qos xmlns="http://openconfig.net/yang/qos">
<classifiers>
<classifier>
<name>IN_CUSTOMERIF</name>
<config>
<name>IN_CUSTOMERIF</name>
<type>IPV4</type>
</config>
<state>
<name>IN_CUSTOMERIF</name>
<type>IPV4</type>
</state>
<terms>
<term>
<id>10</id>
<config>
<id>10</id>
</config>
<state>
<id>10</id>
</state>
<actions>
<config>
<target-group>q0</target-group>
</config>
<state>
<target-group>q0</target-group>
</state>
</actions>
<conditions>
<ipv4>
<config>
<source-address>1.1.1.0/24</source-address>
<destination-address>2.2.2.0/24</destination-address>
<dscp>18</dscp>
</config>
<state>
<source-address>1.1.1.0/24</source-address>
<destination-address>2.2.2.0/24</destination-address>
<dscp>18</dscp>
</state>
</ipv4>
</conditions>
</term>
<term>
<id>20</id>
<config>
<id>20</id>
</config>
<state>
<id>20</id>
</state>
<actions>
<config>
<target-group>q1</target-group>
</config>
<state>
<target-group>q1</target-group>
</state>
</actions>
<conditions>
<ipv4>
<config>
<source-address>3.3.3.0/24</source-address>
<destination-address>4.4.4.0/24</destination-address>
<dscp>26</dscp>
</config>
<state>
<source-address>3.3.3.0/24</source-address>
<destination-address>4.4.4.0/24</destination-address>
<dscp>26</dscp>
</state>
</ipv4>
</conditions>
</term>
</terms>
</classifier>
</classifiers>
<scheduler-policies>
<scheduler-policy>
<name>SCHEDULER_POLICY_2</name>
<config>
<name>SCHEDULER_POLICY_2</name>
</config>
<state>
<name>SCHEDULER_POLICY_2</name>
</state>
<schedulers>
<scheduler>
<sequence>20</sequence>
<config>
<sequence>20</sequence>
<type
xmlns:oc-qos-types="http://openconfig.net/yang/qos-types">oc-qos-types:ONE_RATE_TWO_COLOR</type>
<priority>STRICT</priority>
</config>
<inputs>
<input>
<id>SCHEDULER_POLICY_AF1</id>
<config>
<id>SCHEDULER_POLICY_AF1</id>
<queue>q0</queue>
<weight>5</weight>
<input-type>QUEUE</input-type>
</config>
<state>
<weight>5</weight>
<id>SCHEDULER_POLICY_AF1</id>
<queue>q0</queue>
<input-type>QUEUE</input-type>
</state>
</input>
<input>
<id>SCHEDULER_POLICY_AF2</id>
<config>
<id>SCHEDULER_POLICY_AF2</id>
<queue>q1</queue>
<weight>14</weight>
<input-type>QUEUE</input-type>
</config>
<state>
<weight>14</weight>
<id>SCHEDULER_POLICY_AF2</id>
<queue>q1</queue>
<input-type>QUEUE</input-type>
</state>
</input>
</inputs>
<state>
<sequence>20</sequence>
<type
xmlns:oc-qos-types="http://openconfig.net/yang/qos-types">oc-qos-types:ONE_RATE_TWO_COLOR</type>
<priority>STRICT</priority>
</state>
<one-rate-two-color>
<state>
<queuing-behavior>SHAPE</queuing-behavior>
<max-queue-depth-bytes>64000</max-queue-depth-bytes>
<cir>256000000</cir>
</state>
<config>
<max-queue-depth-bytes>64000</max-queue-depth-bytes>
<cir>256000000</cir>
<queuing-behavior>SHAPE</queuing-behavior>
</config>
</one-rate-two-color>
</scheduler>
</schedulers>
</scheduler-policy>
</scheduler-policies>
<queue-management-profiles>
<queue-management-profile>
<name>q0</name>
<config>
<name>q0</name>
</config>
<state>
<name>q0</name>
</state>
<wred>
<uniform>
<config>
<min-threshold>128000</min-threshold>
<max-threshold>256000</max-threshold>
<weight>20</weight>
<max-threshold>90</max-threshold>
</config>
<state>
<min-threshold>128000</min-threshold>
<max-threshold>256000</max-threshold>
<weight>20</weight>
<max-threshold>90</max-threshold>
</state>
</uniform>
</wred>
</queue-management-profile>
<queue-management-profile>
<name>q1</name>
<config>
<name>q1</name>
</config>
<state>
<name>q1</name>
</state>
<wred>
<uniform>
<config>
<min-threshold>256000</min-threshold>
<max-threshold>512000</max-threshold>
<weight>10</weight>
<max-threshold>70</max-threshold>
</config>
<state>
<min-threshold>256000</min-threshold>
<max-threshold>512000</max-threshold>
<weight>10</weight>
<max-threshold>70</max-threshold>
</state>
</uniform>
</wred>
</queue-management-profile>
</queue-management-profiles>
<forwarding-groups>
<forwarding-group>
<name>q0</name>
<config>
<name>q0</name>
<output-queue>q0</output-queue>
<fabric-priority>128</fabric-priority>
</config>
<state>
<name>q0</name>
<output-queue>q0</output-queue>
<fabric-priority>128</fabric-priority>
</state>
</forwarding-group>
</forwarding-groups>
<queues>
<queue>
<name>q0</name>
<config>
<name>q0</name>
<queue-id>0</queue-id>
</config>
<state>
<name>q0</name>
<queue-id>0</queue-id>
</state>
</queue>
<queue>
<name>q1</name>
<config>
<name>q1</name>
<queue-id>1</queue-id>
</config>
<state>
<name>q1</name>
<queue-id>1</queue-id>
</state>
</queue>
</queues>
</qos>
Restrictions
The path /qos/queue-management-profiles is available on Open Config versions above 1.0.0.
The path /qos/queues has been restructured on Open Config versions above 1.0.0.
The only valid value for path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/config/priority is STRICT.
The leaf name for path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/inputs/input/config/queue must have fixed names that follow the pattern q[0-7].
The scheduler-policies input configuration for OpenConfig XPath /oc-qos:qos/scheduler-policies/scheduler-policy/schedulers/scheduler/inputs/input/config now has its leaf queue as mandatory in operations "create", "delete", "remove" and "merge". This is because the translation mapping done on OcNOS datamodel to XPath /qos/global/policy-maps/policy-map/classes/class and the queue leaf points to class-map-name leaf on OcNOS. If this condition is not addressed, the Translation Framework throws an error when the OpenConfig payload is applied.
All the paths shown below have restrictions:
/qos/interfaces/interface/input/scheduler-policy
This association is not valid on OcNOS and is not supported.
/qos/scheduler-policies/scheduler-policy/schedulers/scheduler/output
This association is not valid on OcNOS and is not supported.
/qos/scheduler-policies/scheduler-policy/schedulers/scheduler/one-rate-two-color/config/bc
This association is not valid on OcNOS and is not supported.
/qos/scheduler-policies/scheduler-policy/schedulers/scheduler/one-rate-two-color/config/cir-pct
This association is not valid on OcNOS and is not supported.
/qos/scheduler-policies/scheduler-policy/schedulers/scheduler
This list has a fixed max-element as one entry.
/qos/scheduler-policies/scheduler-policy/schedulers/scheduler/config/type
This configuration has a fixed value as ONE_RATE_TWO_COLOR.
/qos/scheduler-policies/scheduler-policy/schedulers/scheduler/inputs/input/config/input-type
This configurations has a fixed value as QUEUE.
/qos/scheduler-policies/scheduler-policy/schedulers/scheduler/one-rate-two-color/config/cir-pct-remaining
This association is not valid on OcNOS and is not supported.
/qos/scheduler-policies/scheduler-policy/schedulers/scheduler/one-rate-two-color/config/queuing-behavior
This configuration has a fixed value as SHAPE.
/qos/scheduler-policies/scheduler-policy/schedulers/scheduler/one-rate-two-color/config/max-queue-depth-packets
This association is not valid on OcNOS and is not supported.
/qos/scheduler-policies/scheduler-policy/schedulers/scheduler/one-rate-two-color/config/max-queue-depth-percent
This association is not valid on OcNOS and is not supported.
/qos/scheduler-policies/scheduler-policy/schedulers/scheduler/one-rate-two-color/conform-action
This association is not valid on OcNOS and is not supported.
/qos/scheduler-policies/scheduler-policy/schedulers/scheduler/one-rate-two-color/exceed-action
This association is not valid on OcNOS and is not supported.
/qos/scheduler-policies/scheduler-policy/schedulers/scheduler/two-rate-three-color
This association is not valid on OcNOS and is not supported.
Create Interfaces Classifier Association
Release
This configuration was introduced in OcNOS version 6.5.0.
Configuration
On OpenConfig model, the classifier profile can be associated to an interface on egress and ingress direction, and a list of classifiers can be associated to an interface. But on OcNOS model, the interface only allows one classifier object, and the association is in ingress direction.
On OcNOS model, the association between QoS ingress interface and QoS classifier profile needs the hardware-profile ingress-ipv4-qos to be enabled before the association. The translation adds the hardware-profile ingress-ipv4-qos configuration during translation on XPath /oc-qos:qos/interfaces/interface/input/classifiers/classifier/config/name.
OpenConfig NetConf Payload
Here is a sample OpenConfig NetConf Payload to create an interfaces classifier association.
<qos xmlns="http://openconfig.net/yang/qos">
<queues>
<queue>
<name>q0</name>
<config>
<name>q0</name>
<queue-id>0</queue-id>
</config>
</queue>
</queues>
<queue-management-profiles>
<queue-management-profile>
<name>q0</name>
<config>
<name>q0</name>
</config>
<wred>
<uniform>
<config>
<min-threshold>128000</min-threshold>
<max-threshold>256000</max-threshold>
<weight>20</weight>
<max-drop-probability-percent>90</max-drop-probability-percent>
</config>
</uniform>
</wred>
</queue-management-profile>
</queue-management-profiles>
<forwarding-groups>
<forwarding-group>
<name>q0</name>
<config>
<name>q0</name>
<output-queue>q0</output-queue
</config>
</forwarding-group>
</forwarding-groups>
<classifiers>
<classifier>
<name>IN_CUSTOMERIF</name>
<config>
<name>IN_CUSTOMERIF</name>
<type>IPV4</type>
</config>
<terms>
<term>
<id>10</id>
<config>
<id>10</id>
</config>
<conditions>
<ipv4>
<config>
<source-address>1.1.1.1/24</source-address>
<destination-address>2.2.2.2/24</destination-address>
<dscp>af21</dscp>
</config>
</ipv4>
</conditions>
<actions>
<config>
<target-group>q0</target-group>
</config>
</actions>
</term>
</terms>
</classifier>
</classifiers>
<interfaces>
<interface>
<interface-id>eth2</interface-id>
<config>
<interface-id>eth2</interface-id>
</config>
<interface-ref>
<config>
<interface>eth2</interface>
</config>
</interface-ref>
<input>
<classifiers>
<classifier>
<type>IPV4</type>
<config>
<name>IN_CUSTOMERIF</name>
<type>IPV4</type>
</config>
</classifier>
</classifiers>
</input>
</interface>
</interfaces>
</qos>
OcNOS CLI command
hardware-profile filter ingress-ipv4-qos enable
qos enable
!
ip access-list IN_CUSTOMERIF$10
1 permit tcp 1.1.1.0/24 2.2.2.0/24 dscp af21
!
class-map type qos match-any IN_CUSTOMERIF$10
match access-group IN_CUSTOMERIF$10
!
policy-map type qos IN_CUSTOMERIF
class type qos IN_CUSTOMERIF$10
set queue 0
exit
class type qos IN_CUSTOMERIF$20
set queue 1
exit
!
interface eth2
service-policy type qos input IN_CUSTOMERIF
!
OcNOS NetConf Payload
<profiles xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-platform">
<hardware-profile>
<filters>
<config>
<ingress-ipv4-qos/>
</config>
</filters>
</hardware-profile>
</profiles>
<acl xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-acl">
<acl-sets>
<acl-set>
<name>IN_CUSTOMERIF$10</name>
<type>ip</type>
<config>
<name>IN_CUSTOMERIF$10</name>
<type>ip</type>
</config>
<acl-entries>
<acl-entry>
<sequence-id>1</sequence-id>
<config>
<sequence-id>1</sequence-id>
</config>
<ipv4>
<config>
<forwarding-action>permit</forwarding-action>
<source-address>1.1.1.0/24</source-address>
<destination-address>2.2.2.0/24</destination-address>
<dscp>af21</dscp>
<protocol-tcp/>
</config>
</ipv4>
</acl-entry>
</acl-entries>
</acl-set>
</acl-sets>
</acl>
<qos xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-qos">
<global>
<config>
<enable-qos>enable</enable-qos>
</config>
<class-maps>
<class-map>
<name>IN_CUSTOMERIF$10</name>
<config>
<name>IN_CUSTOMERIF$10</name>
<type>qos</type>
<match-criteria>match-any</match-criteria>
</config>
<match-any-conditions>
<config>
<access-control-list-name>IN_CUSTOMERIF$10</access-control-list-name>
</config>
</match-any-conditions>
</class-map>
</class-maps>
<policy-maps>
<policy-map>
<policy-map-name>IN_CUSTOMERIF</policy-map-name>
<config>
<policy-map-name>IN_CUSTOMERIF</policy-map-name>
<type>qos</type>
</config>
<classes>
<class>
<class-map-name>IN_CUSTOMERIF$10</class-map-name>
<config>
<class-map-name>IN_CUSTOMERIF$10</class-map-name>
<type>qos</type>
</config>
<qos-mode>
<config>
<queue-id>0</queue-id>
</config>
</qos-mode>
</class>
</classes>
</policy-map>
</policy-maps>
</global>
<interfaces xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-qos-if">
<interface>
<name>eth2</name>
<config>
<name>eth2</name>
</config>
<service-policy>
<ingress>
<config>
<type-qos-policy-map-name>IN_CUSTOMERIF</type-qos-policy-map-name>
</config>
</ingress>
</service-policy>
</interface>
</interfaces>
Validation with NetConf get
<qos xmlns="http://openconfig.net/yang/qos">
<classifiers>
<classifier>
<name>IN_CUSTOMERIF</name>
<config>
<name>IN_CUSTOMERIF</name>
<type>IPV4</type>
</config>
<state>
<name>IN_CUSTOMERIF</name>
<type>IPV4</type>
</state>
<terms>
<term>
<id>10</id>
<config>
<id>10</id>
</config>
<state>
<id>10</id>
</state>
<actions>
<config>
<target-group>q0</target-group>
</config>
<state>
<target-group>q0</target-group>
</state>
</actions>
<conditions>
<ipv4>
<config>
<source-address>1.1.1.0/24</source-address>
<destination-address>2.2.2.0/24</destination-address>
<dscp>18</dscp>
</config>
<state>
<source-address>1.1.1.0/24</source-address>
<destination-address>2.2.2.0/24</destination-address>
<dscp>18</dscp>
</state>
</ipv4>
</conditions>
</term>
<term>
<id>20</id>
<config>
<id>20</id>
</config>
<state>
<id>20</id>
</state>
<actions>
<config>
<target-group>q1</target-group>
</config>
<state>
<target-group>q1</target-group>
</state>
</actions>
<conditions>
<ipv4>
<config>
<source-address>3.3.3.0/24</source-address>
<destination-address>4.4.4.0/24</destination-address>
<dscp>26</dscp>
</config>
<state>
<source-address>3.3.3.0/24</source-address>
<destination-address>4.4.4.0/24</destination-address>
<dscp>26</dscp>
</state>
</ipv4>
</conditions>
</term>
</terms>
</classifier>
</classifiers>
<interfaces>
<interface>
<interface-id>eth2</interface-id>
<config>
<interface-id>eth2</interface-id>
</config>
<input>
<classifiers>
<classifier>
<config>
<name>IN_CUSTOMERIF</name>
<type>IPV4</type>
</config>
<type>IPV4</type>
<state>
<name>IN_CUSTOMERIF</name>
<type>IPV4</type>
</state>
<terms>
<term>
<id>10</id>
<state>
<id>10</id>
<matched-packets>0</matched-packets>
<matched-octets>0</matched-octets>
</state>
</term>
<term>
<id>20</id>
<state>
<id>20</id>
<matched-packets>0</matched-packets>
<matched-octets>0</matched-octets>
</state>
</term>
</terms>
</classifier>
</classifiers>
</input>
<interface-ref>
<config>
<interface>eth2</interface>
</config>
<state>
<interface>eth2</interface>
</state>
</interface-ref>
<state>
<interface-id>eth2</interface-id>
</state>
</interface>
</interfaces>
<queue-management-profiles>
<queue-management-profile>
<name>q0</name>
<config>
<name>q0</name>
</config>
<state>
<name>q0</name>
</state>
<wred>
<uniform>
<config>
<min-threshold>128000</min-threshold>
<max-threshold>256000</max-threshold>
<weight>20</weight>
<max-threshold>90</max-threshold>
</config>
<state>
<min-threshold>128000</min-threshold>
<max-threshold>256000</max-threshold>
<weight>20</weight>
<max-threshold>90</max-threshold>
</state>
</uniform>
</wred>
</queue-management-profile>
<queue-management-profile>
<name>q1</name>
<config>
<name>q1</name>
</config>
<state>
<name>q1</name>
</state>
<wred>
<uniform>
<config>
<min-threshold>256000</min-threshold>
<max-threshold>512000</max-threshold>
<weight>10</weight>
<max-threshold>70</max-threshold>
</config>
<state>
<min-threshold>256000</min-threshold>
<max-threshold>512000</max-threshold>
<weight>10</weight>
<max-threshold>70</max-threshold>
</state>
</uniform>
</wred>
</queue-management-profile>
</queue-management-profiles>
<forwarding-groups>
<forwarding-group>
<name>q0</name>
<config>
<name>q0</name>
<output-queue>q0</output-queue>
<fabric-priority>128</fabric-priority>
</config>
<state>
<name>q0</name>
<output-queue>q0</output-queue>
<fabric-priority>128</fabric-priority>
</state>
</forwarding-group>
</forwarding-groups>
<queues>
<queue>
<name>q0</name>
<config>
<name>q0</name>
<queue-id>0</queue-id>
</config>
<state>
<name>q0</name>
<queue-id>0</queue-id>
</state>
</queue>
<queue>
<name>q1</name>
<config>
<name>q1</name>
<queue-id>1</queue-id>
</config>
<state>
<name>q1</name>
<queue-id>1</queue-id>
</state>
</queue>
</queues>
</qos>
Restrictions
The translation of XPath /oc-qos:qos/interfaces/interface/input/classifiers/classifier/config/name adds the OcNOS hardware-profile ingress-ipv4-qos configuration.
Path /qos/queue-management-profiles is available on OpenConfig versions above 1.0.0.
Path /qos/queues has been restructured on Open Config versions above 1.0.0.
All the paths shown below have restrictions:
/qos/interfaces/interface/input/classifiers
Only one entry can be inserted on this list.
/qos/interfaces/interface/output/classifiers
This association is not supported on OcNOS model.
/qos/interfaces/interface/interface-id
This leaf must have the format “<interface>.<subinterface>”, e.g., xe10.2, and it is limited to 32 characters.
Create Interfaces Scheduler-policies Association
Release
This configuration was introduced in OcNOS version 6.5.0.
Configuration
On OpenConfig model, the Scheduler-policies profile can be associated to an interface on egress and ingress direction.
But on OcNOS model, the interface only allows one scheduler-policies object, and the association is in ingress direction.
OpenConfig NetConf Payload
Here is a sample OpenConfig NetConf Payload to create interfaces scheduler-policies association.
<qos xmlns="http://openconfig.net/yang/qos">
<queues>
<queue>
<name>q0</name>
<config>
<name>q0</name>
<queue-id>0</queue-id>
</config>
</queue>
</queues>
<queue-management-profiles>
<queue-management-profile>
<name>q0</name>
<config>
<name>q0</name>
</config>
<wred>
<uniform>
<config>
<min-threshold>128000</min-threshold>
<max-threshold>256000</max-threshold>
<weight>20</weight>
<max-drop-probability-percent>90</max-drop-probability-percent>
</config>
</uniform>
</wred>
</queue-management-profile>
</queue-management-profiles>
<forwarding-groups>
<forwarding-group>
<name>q0</name>
<config>
<name>q0</name>
<output-queue>q0</output-queue>
</config>
</forwarding-group>
</forwarding-groups>
<scheduler-policies>
<scheduler-policy>
<name>SCHEDULER_POLICY_1</name>
<config>
<name>SCHEDULER_POLICY_1</name>
</config>
<schedulers>
<scheduler>
<sequence>10</sequence>
<config>
<sequence>10</sequence>
<type>ONE_RATE_TWO_COLOR</type>
<priority>STRICT</priority>
</config>
<inputs>
<input>
<id>SCHEDULER_POLICY_AF1</id>
<config>
<id>SCHEDULER_POLICY_AF1</id>
<input-type>QUEUE</input-type>
<queue>q0</queue>
<weight>5</weight>
</config>
</input>
</inputs>
</scheduler>
</schedulers>
</scheduler-policy>
</scheduler-policies>
<interfaces>
<interface>
<interface-id>eth2</interface-id>
<config>
<interface-id>eth2</interface-id>
</config>
<interface-ref>
<config>
<interface>eth2</interface>
</config>
</interface-ref>
<output>
<scheduler-policy>
<config>
<name>SCHEDULER_POLICY_1</name>
</config>
</scheduler-policy>
</output>
</interface>
</interfaces>
</qos>
OcNOS CLI command
The below CLI command is used to create interfaces scheduler-policies association.
qos enable
!
policy-map type queuing default SCHEDULER_POLICY_1
class type queuing default q0
wrr-queue weight 5
random-detect min-threshold 128000 max-threshold 256000 bytes drop-probability 80
exit
!
interface eth2
service-policy type queuing output SCHEDULER_POLICY_1
!
OcNOS NetConf Payload
Here is a sample OcNOS NetConf Payload to create interfaces scheduler-policies association.
<qos xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-qos">
<global>
<config>
<enable-qos>enable</enable-qos>
</config>
<policy-maps>
<policy-map>
<policy-map-name>SCHEDULER_POLICY_1</policy-map-name>
<config>
<policy-map-name>SCHEDULER_POLICY_1</policy-map-name>
<type>queuing-default</type>
</config>
<classes>
<class>
<class-map-name>q0</class-map-name>
<config>
<class-map-name>q0</class-map-name>
<type>queuing-default</type>
</config>
<queue-mode>
<config>
<weighted-round-robin-queue-weight>5</weighted-round-robin-queue-weight>
</config>
<red>
<wred>
<config>
<min-threshold>128000</min-threshold>
<threshold-unit>bytes</threshold-unit>
<max-threshold>256000</max-threshold>
<drop-probability>80</drop-probability>
</config>
</wred>
</red>
</queue-mode>
</class>
</classes>
</policy-map>
</policy-maps>
</global>
<interfaces xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-qos-if">
<interface>
<name>eth2</name>
<config>
<name>eth2</name>
</config>
<service-policy>
<egress>
<config>
<type-queuing-policy-map-name>SCHEDULER_POLICY_1</type-queuing-policy-map-name>
</config>
</egress>
</service-policy>
</interface>
</interfaces>
</qos>
Validation with NetConf get
Here is a NetConf validation response that provides detailed information about creating interfaces scheduler-policies association.
<qos xmlns="http://openconfig.net/yang/qos">
<scheduler-policies>
<scheduler-policy>
<name>SCHEDULER_POLICY_1</name>
<config>
<name>SCHEDULER_POLICY_1</name>
</config>
<state>
<name>SCHEDULER_POLICY_1</name>
</state>
<schedulers>
<scheduler>
<sequence>10</sequence>
<config>
<sequence>10</sequence>
<type
xmlns:oc-qos-types="http://openconfig.net/yang/qos-types">oc-qos-types:ONE_RATE_TWO_COLOR</type>
<priority>STRICT</priority>
</config>
<inputs>
<input>
<id>SCHEDULER_POLICY_AF1</id>
<config>
<id>SCHEDULER_POLICY_AF1</id>
<queue>q0</queue>
<weight>5</weight>
<input-type>QUEUE</input-type>
</config>
<state>
<weight>5</weight>
<id>SCHEDULER_POLICY_AF1</id>
<queue>q0</queue>
<input-type>QUEUE</input-type>
</state>
</input>
</inputs>
<state>
<sequence>10</sequence>
<type
xmlns:oc-qos-types="http://openconfig.net/yang/qos-types">oc-qos-types:ONE_RATE_TWO_COLOR</type>
<priority>STRICT</priority>
</state>
</scheduler>
</schedulers>
</scheduler-policy>
</scheduler-policies>
<interfaces>
<interface>
<interface-id>eth2</interface-id>
<config>
<interface-id>eth2</interface-id>
</config>
<output>
<scheduler-policy>
<config>
<name>SCHEDULER_POLICY_1</name>
</config>
<state>
<name>SCHEDULER_POLICY_1</name>
</state>
<schedulers>
<scheduler>
<sequence>10</sequence>
<state>
<sequence>10</sequence>
<conforming-octets>0</conforming-octets>
<conforming-pkts>0</conforming-pkts>
<exceeding-octets>0</exceeding-octets>
<exceeding-pkts>0</exceeding-pkts>
</state>
</scheduler>
</schedulers>
</scheduler-policy>
</output>
<interface-ref>
<config>
<interface>eth2</interface>
</config>
<state>
<interface>eth2</interface>
</state>
</interface-ref>
<state>
<interface-id>eth2</interface-id>
</state>
</interface>
</interfaces>
<queue-management-profiles>
<queue-management-profile>
<name>q0</name>
<config>
<name>q0</name>
</config>
<state>
<name>q0</name>
</state>
<wred>
<uniform>
<config>
<min-threshold>128000</min-threshold>
<max-threshold>256000</max-threshold>
<weight>20</weight>
<max-threshold>90</max-threshold>
</config>
<state>
<min-threshold>128000</min-threshold>
<max-threshold>256000</max-threshold>
<weight>20</weight>
<max-threshold>90</max-threshold>
</state>
</uniform>
</wred>
</queue-management-profile>
<queue-management-profile>
<name>q1</name>
<config>
<name>q1</name>
</config>
<state>
<name>q1</name>
</state>
<wred>
<uniform>
<config>
<min-threshold>256000</min-threshold>
<max-threshold>512000</max-threshold>
<weight>10</weight>
<max-threshold>70</max-threshold>
</config>
<state>
<min-threshold>256000</min-threshold>
<max-threshold>512000</max-threshold>
<weight>10</weight>
<max-threshold>70</max-threshold>
</state>
</uniform>
</wred>
</queue-management-profile>
</queue-management-profiles>
<forwarding-groups>
<forwarding-group>
<name>q0</name>
<config>
<name>q0</name>
<output-queue>q0</output-queue>
<fabric-priority>128</fabric-priority>
</config>
<state>
<name>q0</name>
<output-queue>q0</output-queue>
<fabric-priority>128</fabric-priority>
</state>
</forwarding-group>
</forwarding-groups>
<queues>
<queue>
<name>q0</name>
<config>
<name>q0</name>
<queue-id>0</queue-id>
</config>
<state>
<name>q0</name>
<queue-id>0</queue-id>
</state>
</queue>
<queue>
<name>q1</name>
<config>
<name>q1</name>
<queue-id>1</queue-id>
</config>
<state>
<name>q1</name>
<queue-id>1</queue-id>
</state>
</queue>
</queues>
</qos>
Restrictions
The path /qos/queue-management-profiles is available on Open Config versions above 1.0.0.
The path /qos/queues has been restructured on OpenConfig versions above 1.0.0.
The path /qos/interfaces/interface/interface-id has the following restriction:
It must be in the format <interface>.<subinterface> For example: xe10.2, and limited to 32 characters.