OpenConfig QoS
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
None.
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>
</config>
<red>
<config>
<minth>128000</minth>
<maxth>256000</maxth>
</config>
</red>
</queue>
<queue>
<name>q1</name>
<config>
<name>q1</name>
</config>
<red>
<config>
<minth>256000</minth>
<maxth>512000</maxth>
</config>
</red>
</queue>
</queues>
<forwarding-groups>
<forwarding-group>
<name>q0</name>
<config>
<name>q0</name>
<output-queue>q0</output-queue>
<fabric-priority>128</fabric-priority>
</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>
<terms>
<term>
<id>10</id>
<config>
<id>10</id>
</config>
<actions>
<config>
<target-group>q0</target-group>
</config>
</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>
</ipv4>
</conditions>
</term>
<term>
<id>20</id>
<config>
<id>20</id>
</config>
<actions>
<config>
<target-group>q1</target-group>
</config>
</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>
</ipv4>
</conditions>
</term>
</terms>
</classifier>
</classifiers>
<queues>
<queue>
<name>q0</name>
<config>
<name>q0</name>
</config>
<red>
<config>
<minth>128000</minth>
<maxth>256000</maxth>
</config>
</red>
</queue>
<queue>
<name>q1</name>
<config>
<name>q1</name>
</config>
<red>
<config>
<minth>256000</minth>
<maxth>512000</maxth>
</config>
</red>
</queue>
</queues>
<forwarding-groups>
<forwarding-group>
<name>q0</name>
<config>
<name>q0</name>
<output-queue>q0</output-queue>
<fabric-priority>128</fabric-priority>
</config>
</forwarding-group>
</forwarding-groups>
</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.
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.
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>
<fabric-priority>128</fabric-priority>
</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>
<fabric-priority>128</fabric-priority>
</config>
</forwarding-group>
</forwarding-groups>
</qos>
Restrictions
This translation is only available for SP Hardware type.
Create Queues entries
Release
This configuration was introduced in OcNOS version 6.1.0.
Configuration
The Open Config profile Queues do not have a equivalent model on OcNOS model, so this object is stored inside Translation Auxiliary Database.
The Open Config profile Queues is used to configure on OcNOS model "random-detect" configuration from policy-map type queuing object.
OpenConfig NETCONF Payload
<qos xmlns="http://openconfig.net/yang/qos">
<queues>
<queue>
<name>q0</name>
<config>
<name>q0</name>
</config>
<red>
<config>
<minth>128000</minth>
<maxth>256000</maxth>
</config>
</red>
</queue>
</queues>
</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
random-detect min-threshold 128000 bytes max-threshold 256000 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>
<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>
<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>
</queue-mode>
</class>
</classes>
</policy-map>
</policy-maps>
</global>
</qos>
Validation with NETCONF get
<qos xmlns="http://openconfig.net/yang/qos">
<queues>
<queue>
<name>q0</name>
<config>
<name>q0</name>
</config>
<red>
<config>
<minth>128000</minth>
<maxth>256000</maxth>
</config>
</red>
</queue>
</queues>
</qos>
Restrictions
This translation is only available for SP Hardware type.
The path /qos/interfaces/interface/output/queues have its association is not support on OcNOS models.
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">
<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
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>
<weight>5</weight>
<id>SCHEDULER_POLICY_AF1</id>
<queue>q0</queue>
<input-type>QUEUE</input-type>
</config>
</input>
</inputs>
<one-rate-two-color>
<config>
<queuing-behavior>SHAPE</queuing-behavior>
<max-queue-depth-bytes>64000</max-queue-depth-bytes>
<cir>256000000</cir>
</config>
</one-rate-two-color>
</scheduler>
</schedulers>
</scheduler-policy>
</scheduler-policies>
</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
!
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>
</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>
<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>
<weight>5</weight>
<id>SCHEDULER_POLICY_AF1</id>
<queue>q0</queue>
<input-type>QUEUE</input-type>
</config>
</input>
</inputs>
<one-rate-two-color>
<config>
<queuing-behavior>SHAPE</queuing-behavior>
<max-queue-depth-bytes>64000</max-queue-depth-bytes>
<cir>256000000</cir>
</config>
</one-rate-two-color>
</scheduler>
</schedulers>
</scheduler-policy>
</scheduler-policies>
</qos>
Restrictions
• This translation is only translated for SP Hardware type.
• The only valid value for path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/config/priority is “STRICT”.
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>
</config>
<red>
<config>
<minth>128000</minth>
<maxth>256000</maxth>
</config>
</red>
</queue>
</queues>
<forwarding-groups>
<forwarding-group>
<name>q0</name>
<config>
<name>q0</name>
<output-queue>q0</output-queue>
<fabric-priority>128</fabric-priority>
</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>
<terms>
<term>
<id>10</id>
<config>
<id>10</id>
</config>
<actions>
<config>
<target-group>q0</target-group>
</config>
</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>
</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>
</classifier>
</classifiers>
</input>
<interface-ref>
<config>
<interface>eth2</interface>
</config>
</interface-ref>
</interface>
</interfaces>
<queues>
<queue>
<name>q0</name>
<config>
<name>q0</name>
</config>
<red>
<config>
<minth>128000</minth>
<maxth>256000</maxth>
</config>
</red>
</queue>
</queues>
<forwarding-groups>
<forwarding-group>
<name>q0</name>
<config>
<name>q0</name>
<output-queue>q0</output-queue>
<fabric-priority>128</fabric-priority>
</config>
</forwarding-group>
</forwarding-groups>
</qos>
Restrictions
This translation is only available for SP Hardware type.
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>
</config>
<red>
<config>
<minth>128000</minth>
<maxth>256000</maxth>
</config>
</red>
</queue>
</queues>
<forwarding-groups>
<forwarding-group>
<name>q0</name>
<config>
<name>q0</name>
<output-queue>q0</output-queue>
<fabric-priority>128</fabric-priority>
</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>
<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>
<weight>5</weight>
<id>SCHEDULER_POLICY_AF1</id>
<queue>q0</queue>
<input-type>QUEUE</input-type>
</config>
</input>
</inputs>
<one-rate-two-color>
<config>
<queuing-behavior>SHAPE</queuing-behavior>
<max-queue-depth-bytes>64000</max-queue-depth-bytes>
<cir>256000000</cir>
</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>
<input>
<classifiers>
<classifier>
<config>
<name>IN_CUSTOMERIF</name>
<type>IPV4</type>
</config>
<type>IPV4</type>
</classifier>
</classifiers>
</input>
<interface-ref>
<config>
<interface>eth2</interface>
</config>
</interface-ref>
</interface>
</interfaces>
<queues>
<queue>
<name>q0</name>
<config>
<name>q0</name>
</config>
<red>
<config>
<minth>128000</minth>
<maxth>256000</maxth>
</config>
</red>
</queue>
</queues>
<forwarding-groups>
<forwarding-group>
<name>q0</name>
<config>
<name>q0</name>
<output-queue>q0</output-queue>
<fabric-priority>128</fabric-priority>
</config>
</forwarding-group>
</forwarding-groups>
</qos>
Restrictions
This translation is only available for SP Hardware type.
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.