OcNOS-SP : OpenConfig Command Reference : QoS OpenConfig Translation
QoS OpenConfig Translation
Enable QoS on OcNOS
Release
This configuration was introduced in OcNOS version 6.1.0
Configuration
On OcNOS model the QoS feature need to be enabled before can start configure QoS features.
On Open Config model there is no equivalent configuration.
OpenConfig NETCONF Payload
There is no equivalent configuration.
OcNOS CLI command
hardware-profile filter ingress-ipv4-qos enable
qos enable
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>
<qos xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-qos">
<global>
<config>
<enable-qos/>
</config>
</global>
</qos>
Validation with NETCONF get
There is no equivalent configuration.
Restrictions
N/A
Enable QoS Profile on OcNOS
Release
This configuration was introduced in OcNOS version 5.1.
Configuration
On OcNOS model the QoS feature need the Hw profile to be enable on SP Hardware types.
On Open Config model there is no equivalent configuration.
OpenConfig NETCONF Payload
There is no equivalent configuration.
OcNOS CLI command
hardware-profile filter ingress-ipv4-qos enable
OcNOS NETCONF Payload
<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.1.0.
Configuration
The Open Config QoS Classifiers is a profile responsible to handle data traffic classification.
This configuration do not have a direct equivalent object on OcNOS model, and to configure classifier on OcNOS model it needs to be translated to ACL, class-maps and policy-maps objets to have the expect configuration.
OpenConfig NETCONF Payload
<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
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
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
<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-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/>
</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
<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
This translation is only available for SP Hardware type.
All paths below have restrictions:
/qos/interfaces/interface/output/classifiers
This association is not support on OcNOS model.
/qos/classifiers/classifier/terms/term/actions/remark
This association is not support on OcNOS model.
/qos/queue-management-profiles is available on Open Config versions newer than v1.0.0.
/qos/queues was restructured on Open Config versions newer than v1.0.0.
Create Forwarding-groups profiles
Release
This configuration was introduced in OcNOS version 6.1.0.
Configuration
The Open Config profile Forwarding-Group do not have a equivalent model on OcNOS model, so this object is stored inside Translation Auxiliary Database.
The object name on Open Config format allows any string value, but on OcNOS all forwarding-profiles have fixed names that follow this pattern “q[0-7]”, so it was added one deviation to force Forwarding-groups leaf “name” follow this pattern.
OpenConfig NETCONF Payload
<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
<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
This translation is only available for SP Hardware type.
Paths /qos/forwarding-groups/forwarding-group/name and /qos/forwarding-groups/forwarding-group/config/name have leaf name have fixed names that follow this pattern “q[0-7]”
Create Queues and Queue-Management-profiles entries
Release
This configuration was introduced in OcNOS version 6.1.0.
Configuration
The Open Config profiles Queues and Queue-Management-Profiles do not have a equivalent model on OcNOS model, so this object is stored inside Translation Auxiliary Database.
The Open Config profiles Queues and Queue-Management-Profiles is used to configure on OcNOS model "random-detect" configuration from policy-map type queuing object.
The object name on Open Config format allows any string value, but on OcNOS they have fixed names that follow this pattern “q[0-7]”, so it was added one deviation to force Queues and Queue-Management-Profiles leaf “name” follow this pattern.
OpenConfig NETCONF Payload
<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
<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
This translation is only available for SP Hardware type.
Path /qos/queue-management-profiles is available on Open Config versions newer than v1.0.0.
Path /qos/queues was restructured on Open Config versions newer than v1.0.0.
The path /qos/interfaces/interface/output/queues have its association is not support on OcNOS models.
The path /qos/interfaces/interface/input/queues/queue[name]/config/queue-management-profile have its association is not support on OcNOS models.
Paths below have leaf name have fixed names that follow this 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.1.0.
Configuration
Use this command to set a one-rate-two-color VLAN match.
OpenConfig NETCONF Payload
<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>2</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>
<input>
<id>SCHEDULER_POLICY_AF2</id>
<config>
<id>SCHEDULER_POLICY_AF2</id>
<input-type>QUEUE</input-type>
<queue>q1</queue>
<weight>15</weight>
</config>
</input>
</inputs>
<one-rate-two-color>
<config>
<cir>256000000</cir>
<max-queue-depth-bytes>64000</max-queue-depth-bytes>
<queuing-behavior>SHAPE</queuing-behavior>
</config>
</one-rate-two-color>
</scheduler>
</schedulers>
</scheduler-policy>
</scheduler-policies>
</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
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
shape 256000000 kbps
wfq-queue weight 5
queue-limit 64000 bytes
random-detect min-threshold 128000 bytes max-threshold 256000 bytes drop-probability 80
exit
class type queuing default q1
shape 256000000 kbps
wfq-queue weight 15
queue-limit 64000 bytes
random-detect min-threshold 256000 bytes max-threshold 512000 bytes drop-probability 80
exit
!
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-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/>
<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-fair-queueing-queue-weight>5</weighted-fair-queueing-queue-weight>
</config>
<red>
<wreds>
<wred>
<color>all</color>
<config>
<color>all</color>
<min-threshold>128000</min-threshold>
<min-threshold-unit>bytes</min-threshold-unit>
<max-threshold>256000</max-threshold>
<max-threshold-unit>bytes</max-threshold-unit>
<drop-probability>80</drop-probability>
</config>
</wred>
</wreds>
</red>
<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-fair-queueing-queue-weight>15</weighted-fair-queueing-queue-weight>
</config>
<red>
<wreds>
<wred>
<color>all</color>
<config>
<color>all</color>
<min-threshold>256000</min-threshold>
<min-threshold-unit>bytes</min-threshold-unit>
<max-threshold>512000</max-threshold>
<max-threshold-unit>bytes</max-threshold-unit>
<drop-probability>80</drop-probability>
</config>
</wred>
</wreds>
</red>
<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
<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>
<input>
<id>SCHEDULER_POLICY_AF2</id>
<config>
<id>SCHEDULER_POLICY_AF2</id>
<queue>q1</queue>
<weight>15</weight>
<input-type>QUEUE</input-type>
</config>
<state>
<weight>15</weight>
<id>SCHEDULER_POLICY_AF2</id>
<queue>q1</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>
<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
This translation is only translated for SP Hardware type.
Path /qos/queue-management-profiles is available on Open Config versions newer than v1.0.0.
Path /qos/queues was restructured on Open Config versions newer than v1.0.0.
The only valid value for path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/config/priority is “STRICT”.
Path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/inputs/input/config/queue have leaf name have fixed names that follow this pattern “q[0-7]”
All paths below have restrictions:
/qos/interfaces/interface/input/scheduler-policy
This association is not valid on OcNOS, and is not support.
/qos/scheduler-policies/scheduler-policy/schedulers/scheduler/output
This association is not valid on OcNOS, and is not support.
/qos/scheduler-policies/scheduler-policy/schedulers/scheduler/one-rate-two-color/config/bc
This association is not valid on OcNOS, and is not support.
/qos/scheduler-policies/scheduler-policy/schedulers/scheduler/one-rate-two-color/config/cir-pct
This association is not valid on OcNOS, and is not support.
/qos/scheduler-policies/scheduler-policy/schedulers/scheduler
This list have a fixed max-element as one entry.
/qos/scheduler-policies/scheduler-policy/schedulers/scheduler/config/type
This configurations 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 support.
/qos/scheduler-policies/scheduler-policy/schedulers/scheduler/one-rate-two-color/config/queuing-behavior
This configurations 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 support.
/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 support.
/qos/scheduler-policies/scheduler-policy/schedulers/scheduler/one-rate-two-color/conform-action
This association is not valid on OcNOS, and is not support.
/qos/scheduler-policies/scheduler-policy/schedulers/scheduler/one-rate-two-color/exceed-action
This association is not valid on OcNOS, and is not support.
/qos/scheduler-policies/scheduler-policy/schedulers/scheduler/two-rate-three-color
This association is not valid on OcNOS, and is not support.
Create interfaces classifier association
Release
This configuration was introduced in OcNOS version 6.1.0.
Configuration
On Open Config model the classifier profile can be associated to an interface on egress and ingress direction, and also it allow a list of classifiers to be associate to an interface.
But on OcNOS model the interface only allow the associate one classifier object, and the association is on ingress direction.
OpenConfig NETCONF Payload
<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/>
</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
This translation is only available for SP Hardware type.
Path /qos/queue-management-profiles is available on Open Config versions newer than v1.0.0.
Path /qos/queues was restructured on Open Config versions newer than v1.0.0.
All paths below have restrictions:
/qos/interfaces/interface/input/classifiers
Only one entry can be insert on this list.
/qos/interfaces/interface/output/classifiers
This association is not support 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.1.0.
Configuration
On Open Config model the scheduler-policies profile can be associated to an interface on egress and ingress direction.
But on OcNOS model the interface only allow the associate one scheduler-policies object, and the association is on ingress direction.
OpenConfig NETCONF Payload
<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>
<one-rate-two-color>
<config>
<cir>256000000</cir>
<max-queue-depth-bytes>64000</max-queue-depth-bytes>
<queuing-behavior>SHAPE</queuing-behavior>
</config>
</one-rate-two-color>
</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
hardware-profile filter ingress-ipv4-qos enable
qos enable
!
policy-map type queuing default SCHEDULER_POLICY_1
class type queuing default q0
shape 256000000 kbps
wfq-queue weight 5
queue-limit 64000 bytes
random-detect min-threshold 128000 bytes max-threshold 256000 bytes drop-probability 80
exit
!
interface eth2
service-policy type queuing output SCHEDULER_POLICY_1
!
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>
<qos xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-qos">
<global>
<config>
<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-fair-queueing-queue-weight>5</weighted-fair-queueing-queue-weight>
</config>
<red>
<wreds>
<wred>
<color>all</color>
<config>
<color>all</color>
<min-threshold>128000</min-threshold>
<min-threshold-unit>bytes</min-threshold-unit>
<max-threshold>256000</max-threshold>
<max-threshold-unit>bytes</max-threshold-unit>
<drop-probability>80</drop-probability>
</config>
</wred>
</wreds>
</red>
<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-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
<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>
<input>
<id>SCHEDULER_POLICY_AF2</id>
<config>
<id>SCHEDULER_POLICY_AF2</id>
<queue>q1</queue>
<weight>15</weight>
<input-type>QUEUE</input-type>
</config>
<state>
<weight>15</weight>
<id>SCHEDULER_POLICY_AF2</id>
<queue>q1</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>
<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>
<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
This translation is only available for SP Hardware type.
Path /qos/queue-management-profiles is available on Open Config versions newer than v1.0.0.
Path /qos/queues was restructured on Open Config versions newer than v1.0.0.
All paths below have restrictions:
/qos/interfaces/interface/interface-id
This leaf must have the format “<interface>.<subinterface>”, e.g., xe10.2, and it is limited to 32 characters.