Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Mapping OpenConfig QoS Commands to Junos Configuration

Note:

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 
Table 1: Forwarding Class Configuration

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 fabric-priority value of 0 indicates low priority. Any non-zero value indicates high priority. The fabric-priority value is not supported on the PTX platform.

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/terms/term/conditions/ipv4/config/dscp 
  • /qos/classifiers/classifier/terms/term/actions/config/target-group 
Note:

To more easily follow the OpenConfig examples below, variables are used in the OpenConfig configuration tree above.

Table 2: BA Classifier Configuration

OpenConfig Configuration

Junos Configuration

openconfig-qos:qos {
       classifiers {
              classifier {
                    name DSCP;
                    terms {
                          term {
                                 id 0;
                                 conditions {
                                         ipv4 {
                                               config {
                                                      dscp 000000;
                                               }
                                         }
                                 }
                                 actions {
                                         config {
                                               target-group best-effort;
                                         }
                                 }
                          }
                    }
              }
       }
}

class-of-service {
  classifiers {
     dscp DSCP {
         forwarding-class best-effort {
             loss-priority low code-points 000000;
         }
     }
 }
}

Junos OS expects a loss-priority value. The OpenConfig configuration does not provide this. By default, the loss-priority value is low.

The OpenConfig code-point value is provided using bit format as octets and decimal values as decimals. To avoid confusion, provide code-point values in decimal format. For example:

set openconfig-qos:qos classifiers classifier DSCP terms term 0 conditions ipv4 config dscp 3

The OpenConfig value term id is the same as the queue-num value which the forwarding group represents. For example, if best-effort is attached to queue 0, then the term id value is 0.

When streaming the telemetry state value, the Junos queue-num value to which the OpenConfig target-group value is mapped will be exported as the term id value. For example:

set openconfig-qos:qos classifiers classifier DSCP terms term 0 actions config target-group best-effort

Classifier Binding Configuration

See Table 3 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
Note:

To more easily follow the OpenConfig examples below, variables are used in the OpenConfig configuration tree.

Table 3: Classifier Binding Configuration

OpenConfig Configuration

Junos Configuration

openconfig-qos:qos {
       interfaces {
              interface {
                    interface-id et-0/0/1.0;
                    input {
                          classifiers {
                                 classifier {
                                         type IPV4;  
                                         config {
                                                name DSCP;
                                                type IPV4;
                                         }
                                 }
                          }
                    }
              }
       }
}
class-of-service {
  et-0/0/1 {
      unit 0 {
          classifiers {
              dscp DSCP;
          }
      }
  }
}

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

Scheduler Configuration

See Table 4 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/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
Note:

To more easily follow the OpenConfig examples below, variables are used in the OpenConfig configuration trees below.

Table 4: Scheduler Configuration

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_smap_af1; 
        forwarding-class af2 scheduler sched_smap_ af2; 
        forwarding-class af3 scheduler sched_smap_ af3; 
        forwarding-class af4 scheduler sched_smap_ af4; 
        forwarding-class be1 scheduler sched_smap_ be1; 
        forwarding-class nc1 scheduler sched_smap_ nc1; 
    } 
 } 
 schedulers { 
    sched_smap_af1 { 
        transmit-rate percent 10; 
        buffer-size shared; 
        priority low; 
    } 
    sched_smap_af2 { 
        transmit-rate percent 1; 
        buffer-size shared; 
        priority low; 
    } 
    sched_smap_af3 { 
        transmit-rate percent 1; 
        buffer-size shared; 
        priority low; 
    } 
    sched_smap_af4 { 
    transmit-rate percent 1; 
        buffer-size shared; 
        priority strict-high; 
    } 
    sched_smap_be1 { 
        transmit-rate percent 1; 
        buffer-size shared; 
        priority low; 
    } 
    sched_smap_nc1 { 
   transmit-rate percent 1; 
        buffer-size shared; 
        priority low; 
    } 
 } 
}

The OpenConfig parameters that are not supported under the scheduler command include buffer-size, excess-rates, and excess priorities. Only STRICT-HIGH priority is supported. If you configure a priority, it is treated as STRICT-HIGH. Otherwise, the priority is LOW by default.

The OpenConfig fields that are unsupported fields under scheduler command are cir-pct-remaining, pir-pct-remaining, be (excess burst size), and bc (committed burst size). These fields are unsupported on the PTX platform but are supported on the MX platform.

There is no parameter to configure a scheduler name in OpenConfig. Instead, the name is deduced by combining the Junos scheduler-map name and forwarding group. For example, the below parameters creates the scheduler name sched_smap_assured-forwarding.

<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 sequence number should be same as the queuenum value, which the forwarding group represents. For example, if assured-forwarding is attached to queue 2, then sequence number should be 2. While exporting state, the queuenum to which the target-group is attached is exported as the sequence number.

set openconfig-qos:qos scheduler-policies scheduler-policy smap schedulers scheduler 2 output config output-fwd-group assured-forwarding

Scheduler Map 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/output/scheduler-policy/config/name 
Note:

To more easily follow the OpenConfig examples below, variables are used in the OpenConfig configuration trees below.

Table 5: Scheduler Map Configuration

OpenConfig Configuration

Junos Configuration

openconfig-qos:qos {
       interfaces {
              interface {
                    interface-id et-0/0/1;
                    output {
                          scheduler-policy {
                                  config {
                                         name qos-scheduler-paradise-sps;
                                  }
                          }
                    }
              }
       }
}
class-of-service {
  interfaces {
        et-0/0/1 {
          scheduler-map qos-scheduler-paradise-sps;
        }
  }
}

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 6 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
Table 6: Drop Profile Configuration

OpenConfig Configuration

Junos Configuration

qos {
   queue-management-profiles {
       queue-management-profile <> {
           wred {
               uniform {
                   config {
                       min-threshold;
                       max-threshold;
                       enable-ecn <true | false>;
                       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 fill-level statement, combined with the drop-probability statement, to configure the minimum and maximum thresholds.