Description

This article explains why Hierarchical Quality of Service (HQoS) may not work on a nested vMX on the NFX250 platform for Junos OS version 18.2R1.9, and describes what must be done to enable HQoS.

 

Symptoms

  • vMX as Virtual Network Functions (VNF) on NFX must use the nested-vmx image
  • CoS counters are not working for the nested vMX on NFX250 and the interface statistics are inaccurate.

 

Solution

The nested vMX for CoS was missing the flexible-vlan-tagging parameter.

The knob hierarchical-scheduler for CoS requires VLAN tagging with a native VLAN ID and flexible-vlan-tagging to be enabled on the specified interface.

Note: A native VLAN ID does not tag packets in the wire.

 

Note: vMX as VNF in NFX must use the nested-vmx code (vmx-nested-19.1R1.6-1.qcow2); check the JDM RSI domblkinfo to confirm.    In nested vMX, Flexible Queuing Mode must be enabled for queuing to work. By default, the queuing mode is not enabled on vMX. Therefore, it does not display any output for the show interfaces queue command. See KB30809 - [MX] How to see 'show interfaces queue' on a vMX platform [juniper.net] for more information.

 

Configuration

To enable HQoS on vMX, perform the following steps:

  1. Ensure that you configure the interface with hierarchical-scheduler .
set interfaces xe-0/0/0 hierarchical-scheduler maximum-hierarchy-levels 2
  1. Configure the specified interface by enabling flexible-vlan-tagging .

set interfaces xe-0/0/0 flexible-vlan-tagging
  1. Ensure that vlan-id # is configured along with step 1 and step 2.

set interfaces xe-0/0/0 native-vlan-id 1
set interfaces xe-0/0/0 unit 0 vlan-id 1

The complete configuration to enable HQoS would be:

set interfaces xe-0/0/0 hierarchical-scheduler maximum-hierarchy-levels 2
set interfaces xe-0/0/0 flexible-vlan-tagging
set interfaces xe-0/0/0 native-vlan-id 1
set interfaces xe-0/0/0 unit 0 vlan-id 1
set interfaces xe-0/0/0 unit 0 family inet address 192.168.10.2/24
set interfaces xe-0/0/0 unit 0 family iso
set interfaces xe-0/0/0 unit 0 family mpls
 

Note: When you configure HCoS, the Flexible PIC Concentrator (FPC) must be rebooted.

 

Verification

  1. To confirm whether the statistics are accurate now and that shaping works fine, use the following command:
[edit]
root@vmx-vnf2# show class-of-service interfaces ge-0/0/1
scheduler-map 4q;
forwarding-class be;

[edit]
root@vmx-vnf2# show class-of-service interfaces ge-0/0/2
unit 102 {
    forwarding-class nc;
    scheduler-map 4q;
}

root@vmx-vnf2# show class-of-service scheduler-maps 4q
forwarding-class be scheduler be;
forwarding-class ef scheduler ef;
forwarding-class nc scheduler nc;
forwarding-class sc scheduler sc;

[edit]
root@vmx-vnf2# show class-of-service schedulers be
transmit-rate percent 25;

[edit]
root@vmx-vnf2# show class-of-service schedulers ef
transmit-rate percent 25;

[edit]
root@vmx-vnf2# show class-of-service schedulers nc
transmit-rate percent 25;
priority high;

[edit]
root@vmx-vnf2# show class-of-service schedulers sc
transmit-rate percent 25;
 

Note: On a nested vMX, the three priorities are supported as in a regular nested vMX. But the priorities of the queues are hard-coded.