Mapping OpenConfig QoS Commands to Junos Configuration
See OpenConfig Data Model Version for supported data model versions and corresponding Junos OS or Junos Evolved OS releases.
Forwarding Class Configuration
See Table 1 for configuration mappings of the following OpenConfig paths:
- /qos/forwarding-groups/forwarding-group/name
- /qos/forwarding-groups/forwarding-group/config/name
- /qos/forwarding-groups/forwarding-group/config/fabric-priority
- /qos/forwarding-groups/forwarding-group/config/output-queue
OpenConfig Configuration |
Junos Configuration |
---|---|
openconfig-qos:qos { forwarding-groups { forwarding-group { name af1; config { name <>; fabric-priority 0; output-queue <>; } } forwarding-group { name nc; config { name <>; fabric-priority 1; output-queue <>; } } } } |
class-of-service { forwarding-classes { class <name> queue-num <num> priority low; class <name> queue-num <num> priority high; } } |
An OpenConfig |
BA Classifier Configuration
See for configuration mappings of the following OpenConfig paths:
- /qos/classifiers/classifier/name
- /qos/classifiers/classifier/terms/term/id
- /qos/classifiers/classifier/config/name
- /qos/classifiers/classifier/config/type
- /qos/classifiers/classifier/terms/term/id
- /qos/classifiers/classifier/terms/term/config
- /qos/classifiers/classifier/terms/term/config/id
- /qos/classifiers/classifier/terms/term/conditions/ipv4/config/dscp-set
- /qos/classifiers/classifier/terms/term/conditions/ipv6/config/dscp-set
- /qos/classifiers/classifier/terms/term/actions/config/target-group
To more easily follow the OpenConfig examples below, variables are used in the OpenConfig configuration tree above.
OpenConfig Configuration |
Junos Configuration |
---|---|
Open-Config-QoS:QoS:classifiers:classifier { name DSCP; terms { term { id 0; conditions { ipv6 { config { dscp-set [ 2 3 ]; } } actions { config { target-group best-effort; } } } } } |
[edit class-of-service] classifiers { dscp DSCP { term-id { term-id 0; forwarding-class best-effort { loss-priority low code-points [ 000100 000010 ]; } } |
Junos OS expects a The OpenConfig set openconfig-qos:qos classifiers classifier DSCP terms term 0 conditions ipv4 config dscp-set [2 3] |
MPLS Classifier Configuration
See Table 3 for configuration mappings of the following OpenConfig paths:
- /qos/classifiers/classifier/terms/term/conditions/mpls
- /qos/classifiers/classifier/terms/term/conditions/mpls/config
- /qos/classifiers/classifier/terms/term/conditions/mpls/config/traffic-class
- /qos/classifiers/classifier/terms/term/actions/config/target-group
OpenConfig Configuration |
Junos Configuration |
---|---|
openconfig-qos:qos { classifiers { classifier <> { config { name <>; type <>; } terms { term { id <>; conditions { mpls { config { traffic-class <>; } } } actions { config { target-group <>; } } } } term { id <>; conditions { mpls { config { traffic-class <>; } } } actions { config { target-group <>; } } } } } } } } |
class-of-service { classifiers { exp <> { forwarding-class <> { loss-priority low code-points <>; } forwarding-class <> { loss-priority low code-points <>; } } } } |
Junos OS expects a The OpenConfig |
Rewrite Rules Configuration
See Table 4 for configuration mappings of the following OpenConfig paths:
- /qos/classifiers/classifier/terms/term/actions/remark
- /qos/classifiers/classifier/terms/term/actions/remark/config
- /qos/classifiers/classifier/terms/term/actions/remark/config/set-dscp
- /qos/classifiers/classifier/terms/term/actions/remark/config/set-dot1p
- /qos/classifiers/classifier/terms/term/actions/remark/config/set-mpls-tc
OpenConfig Configuration |
Junos Configuration |
---|---|
openconfig-qos:qos { classifiers { classifier <> { config { name <>; type IPV4; } terms { term 0 { actions { config { target-group <>; } remark { config { set-dscp 5; } } } } term 1 { actions { config { target-group <>; } remark { config { set-dscp 6; } } } } } } } } |
class-of-service { rewrite-rules { dscp <> { forwarding-class <> { loss-priority low code-point 000101 term-id 0; } forwarding-class <> { loss-priority low code-point 000110 term-id 1; } } } } |
openconfig-qos:qos { classifiers { classifier <> { config { name <>; type IPV6; } terms { term 0 { actions { config { target-group <>; } remark { config { set-dscp 7; } } } } term 1 { actions { config { target-group <>; } remark { config { set-dscp 8; } } } } } } } } |
class-of-service { rewrite-rules { dscp-ipv6 <> { forwarding-class <> { loss-priority low code-point 000111 term-id 0; } forwarding-class <> { loss-priority low code-point 001000 term-id 1; } } } } |
openconfig-qos:qos { classifiers { classifier <> { config { name <>; type MPLS; } terms { term 0 { actions { config { target-group <>; } remark { config { set-mpls-tc 5; } } } } term 1 { actions { config { target-group <>; } remark { config { set-mpls-tc 6; } } } } } } } } |
class-of-service { rewrite-rules { exp <> { forwarding-class <> { loss-priority low code-point 101 term-id 0; } forwarding-class <> { loss-priority low code-point 110 term-id 1; } } } } |
The forwarding groups used for the rewrite rules configuration are shown below: |
|
openconfig-qos:qos { forwarding-groups { forwarding-group <> { config { name <>; output-queue 0; } } forwarding-group <> { config { name <>; output-queue 1; } } } } |
class-of-service { forwarding-classes { class <> queue-num 0; class <> queue-num 1; } } |
Classifier Binding Configuration
See Table 5 for configuration mappings of the following OpenConfig paths:
- /qos/interfaces/interface/interface-id
- /qos/interfaces/interface/interface-ref/config/interface
- /qos/interfaces/interface/interface-ref/config/subinterface
- /qos/interfaces/interface/input/classifiers/classifier/type
- /qos/interfaces/interface/input/classifiers/classifier/config/name
- /qos/interfaces/interface/input/classifiers/classifier/config/type
To more easily follow the OpenConfig examples below, variables are used in the OpenConfig configuration tree.
OpenConfig Configuration |
Junos Configuration |
---|---|
openconfig-qos:qos { interfaces { interface { interface-id et-0/0/1.0; input { classifiers { classifier { type <>; config { name <>; type <>; } } } } } } interface { interface-id ae0; interface-ref { config { subinterface <>; } } input { classifiers { classifier { type <>; config { name <>; type <>; } } } } } } } |
class-of-service { et-0/0/1 { unit 0 { classifiers { dscp <>; } } } ae0 { unit <> { classifiers { exp <>; } } } } |
Classifier binding can be formed from the interfaces table by mapping classifier and interface. This configuration also supports wild cards (*). For example: set openconfig-qos:qos interfaces interface et-*/*/*.0 interface-ref config interface et-*/*/* set openconfig-qos:qos interfaces interface et-*/*/*.0 interface-ref config subinterface 0 set openconfig-qos:qos interfaces interface et-*/*/*.0 input classifiers classifier IPV4 config name DSCP |
|
openconfig-qos:qos { interfaces interface <> { interface-ref { config interface <>; } output scheduler-policy { config name <>; } } } |
class-of-service { interfaces <> { output-traffic-control-profile <>; } } |
Scheduler Configuration
See Table 6 for configuration mappings of the following OpenConfig paths:
- /qos/scheduler-policies/scheduler-policy/name
- /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/sequence
- /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/config/priority
- /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/output/config/output-fwd-group
- /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/config/sequence
- /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/two-rate-three-color/config/bc
- /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/two-rate-three-color/config/cir
- /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/two-rate-three-color/config/cir-pct
- /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/two-rate-three-color/config/pir
- /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/two-rate-three-color/config/pir-pct
- /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/inputs/input/id
- /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/inputs/input/config/id
- /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/inputs/input/config/input-type
- /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/inputs/input/config/queue
- /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/inputs/input/config/weight
- /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/config/priority
To more easily follow the OpenConfig examples below, variables are used in the OpenConfig configuration trees below.
OpenConfig Configuration |
Junos Configuration |
---|---|
openconfig-qos:qos { scheduler-policies { scheduler-policy { name smap; schedulers { scheduler { sequence:4 two-rate-three-color { config { cir-pct:10 } } } scheduler { sequence:1 two-rate-three-color { config { cir-pct:1 } } } scheduler { sequence:5 two-rate-three-color { config { cir-pct:1 } } } scheduler { sequence:2 priority: STRICT two-rate-three-color { config { cir-pct:1 } } } scheduler { sequence:0 two-rate-three-color { config { cir-pct:1 } } } scheduler { sequence:3 two-rate-three-color { config { cir-pct:1 } } } } } } } |
class-of-service { scheduler-maps { smap { forwarding-class af1 scheduler sched_af1; forwarding-class af2 scheduler sched_af2; forwarding-class af3 scheduler sched_af3; forwarding-class af4 scheduler sched_af4; forwarding-class be1 scheduler sched_be1; forwarding-class nc1 scheduler sched_nc1; } } schedulers { sched_af1 { transmit-rate percent 10; buffer-size shared; priority low; } sched_af2 { transmit-rate percent 1; buffer-size shared; priority low; } sched_af3 { transmit-rate percent 1; buffer-size shared; priority low; } sched_af4 { transmit-rate percent 1; buffer-size shared; priority strict-high; } sched_be1 { transmit-rate percent 1; buffer-size shared; priority low; } sched_nc1 { transmit-rate percent 1; buffer-size shared; priority low; } } } |
The OpenConfig parameters that are not supported under the
The OpenConfig fields that are unsupported fields under
There is no parameter to configure a scheduler name in
OpenConfig. Instead, the name is deduced by combining the Junos
<schedulers> { <name> “sched” _ “_” _$smap_name _ "_" _ $out_fwd_group; } Note:
The scheduler name can be 64 characters in length. Since scheduler map and forwarding class names are concatenated in OpenConfig configurations, care must be taken when providing them. The OpenConfig set openconfig-qos:qos scheduler-policies scheduler-policy smap schedulers scheduler 2 output config output-fwd-group assured-forwarding |
|
openconfig-qos:qos { scheduler-policies scheduler-policy sp1 { schedulers scheduler 0 { inputs { input AF4 { config id AF4; input-type QUEUE; queue 2; weight 60; } } } } } |
class-of-service { scheduler-maps sp1{ forwarding-class AF4 scheduler sched_scheduler_AF4; } traffic-control-profiles { tcp_sp1 schedule-map sp1; } } } // If STRICT priority is configured: class-of-service { schedulers { scheduler_AF4{ transmit-rate percent 100; excess-rate percent 60; priority high; } } } // If *not* STRICT priority, use Weighted Round Robin (WRR)mode: class-of-service { schedulers { scheduler_AF4{ transmit-rate percent 0; excess-rate percent 60; priority low; } } } |
Note: Values are added to the above
configurations for a better understanding of the mapping.
The queue leaf value is translated as the equivalent forwarding class value in the scheduler map. When you configure a strict scheduler priority:
In cases where strict scheduler priority is not configured (WRR mode):
You can only use the From the Junos OS, create a traffic control profile (TCP) for the
scheduler map configuration and use the TCP to bind the
configuration to the interface. The Junos OS configuration above
uses TCP |
Scheduler Map Configuration
See Table 7 for configuration mappings of the following OpenConfig paths:
- /qos/interfaces/interface/interface-id
- /qos/interfaces/interface/output/scheduler-policy/config/name
To more easily follow the OpenConfig examples below, variables are used in the OpenConfig configuration trees below.
OpenConfig Configuration |
Junos Configuration |
---|---|
openconfig-qos:qos { interfaces { interface { interface-id et-0/0/1; output { scheduler-policy { config { name <>; } } } } } } } |
class-of-service { interfaces et-0/0/1{ output-traffic-control-profile tcp_sp1; } } |
Scheduler-maps can be bound to physical (IFD) interfaces only. Wild cards are also supported. For example: set openconfig-qos:qos interfaces interface et-*/*/* interface-ref config interface et-*/*/* set openconfig-qos:qos interfaces interface et-*/*/* output scheduler-policy config name smap |
Drop Profile Configuration
See Table 8 for configuration mappings of the following OpenConfig paths:
- /qos/queue-management-profiles/queue-management-profile/config/name
- /qos/queue-management-profiles/queue-management-profile/wred/uniform/config/min-threshold
- /qos/queue-management-profiles/queue-management-profile/wred/uniform/config/max-threshold
- /qos/queue-management-profiles/queue-management-profile/wred/uniform/config/max-drop-probability-percent
- /qos/queue-management-profiles/queue-management-profile/wred/uniform/config/enable-ecn
- /qos/queue-management-profiles/queue-management-profile/wred/
-
/qos/interfaces/interface/output/queues/queue/config/name
-
/qos/interfaces/interface/output/queues/queue/config/queue-management-profile
OpenConfig Configuration |
Junos Configuration |
---|---|
openconfig-qos:qos { queue-management-profiles { queue-management-profile <> { wred { uniform { config { min-threshold; (not for MX Series) max-threshold; (not for MX Series) enable-ecn <true | false>; (not for MX Series) max-drop-probability-percent <>; } } } } } } |
class-of-service { drop-profiles { <profile-name> { fill-level <> drop-probability <>; } schedulers { <scheduler-name> { explicit-congestion-notification; } } } |
In OpenConfig, you configure the minimum and maximum threshold
levels in bytes. In Junos, you configure each threshold as a
percentage of the queue fill level. You can repeat the
|
|
openconfig-qos:qos { queue-management-profile { config { name <>; } wred { uniform { config { min-threshold-percent <>; max-threshold-percent <>; max-drop-probability-percent <>; } } } } |
class-of-service { drop-profiles { <profile-name> { interpolate { fill-level [ <> <> ]; drop-probability <>; } } } |
openconfig-qos:qos { interfaces interface <> { interface-ref { config interface <>; } output queues <> { config { name <>; queue-management-profile <>; } } } } |
interfaces { <interface-name>{ scheduler-map <>; } } scheduler-maps { <scheduler-map-name> { forwarding-class best-effort scheduler <>; } } schedulers { <scheduler-name> { drop-profile-map loss-priority any protocol any drop-profile <>; } } |
openconfig-qos:qos { scheduler-policies scheduler-policy <> { schedulers scheduler <> { } } |
class-of-service { schedulers { <scheduler> { priority strict-high; } } } |
When binding the |