The example in this section illustrates how to configure hierarchical parameters for VLANs and S-VLANs.
Figure 62 shows the QoS scheduler hierarchy that the QoS client creates for the VLANs and S-VLANs in the interface stack. The QoS client creates explicit parameter instances using the parameter definition max-sub-bw to shape rates at the VLAN subinterfaces 100 and 101.
An S-VLAN node is located below the two VLAN nodes in the interface stack. The QoS client creates an implicit parameter instance by applying a shaper to the S-VLAN subinterface 10 that equals the total rate at the VLANs (3072000).
Figure 62: Hierarchical Parameters Scheduler Hierarchy

This section describes the procedures to configure the scheduler hierarchy shown in Figure 62 by using QoS parameters.
Configuring the Parameter Definition
The QoS administrator configures the parameter definition for the maximum subscriber bandwidth.
To configure a parameter definition for the maximum subscriber bandwidth:
- host1(config)#qos-parameter-define max-sub-bw
hierarchical
- host1(config-qos-parameter-define)#controlled-interface-type
svlan
- host1(config-qos-parameter-define)#controlled-interface-type
vlan
- host1(config-qos-parameter-define)#instance-interface-type
vlan
- host1(config-qos-parameter-define)#subscriber-interface-type
vlan
- host1(config-qos-parameter-define)#exit
Configuring the Scheduler Profiles
The QoS administrator can then reference the parameter definition within a scheduler profile, which defines the shaping rates for the parameter.
Configuring the QoS Profiles
By referencing the scheduler profiles within QoS profiles, the QoS administrator creates the scheduler hierarchy. In this portion of the example, the QoS administrator configures QoS profiles for the VLAN and the S-VLAN.
- host1(config)#qos-profile qp-shape-cvlan
- host1(config-qos-profile)#vlan queue traffic-class
best-effort
- host1(config-qos-profile)#vlan node scheduler-profile
sp-shape-cvlan
- host1(config-qos-profile)#exit
This section describes procedures to create parameter instances at VLAN subinterface 100 and VLAN subinterface 101.
- host1(config)#interface gigabitEthernet 2/0
- host1(config-if)#encapsulation vlan
- host1(config)#interface gigabitEthernet 2/0.100
- host1(config-if)#svlan id 10 100
- host1(config-if)#qos-parameter max-sub-bw
1024000
- host1(config-if)#qos-profile qp-shape-cvlan
- host1(config-if)#exit
- host1(config-if)#interface gigabitEthernet
2/0.101
- host1(config-if)#svlan id 10 101
- host1(config-if)#qos-parameter max-sub-bw
2048000
- host1(config-if)#qos-profile qp-shape-cvlan
- host1(config-if)#exit
After completing the configuration, both the QoS administrator and the QoS client can monitor it by issuing the show qos-parameter references command. To display the information about hierarchical parameter instances, you must specify the Gigabit Ethernet interface.
host1#show qos-parameter max-sub-bw references interface gigabitEthernet 2/0
parameter instance
interface name value Type
--------------------------- ---------- ------- ------------
GigabitEthernet2/0 svlan 10 max-sub-bw 3072000 hierarchical
GigabitEthernet2/0.100 max-sub-bw 1024000 explicit
GigabitEthernet2/0.101 max-sub-bw 2048000 explicit
Explicit parameter instances: 2 Hierarchical parameter instances: 1 IP multicast parameter instances: 0 Parameter instances reported: 3
You can use the complete configuration examples provided for each of the configurations in your own network. To customize the configuration example for your needs, copy the text into a text editor, and modify it.
To use the example for immediate use, copy it to the local console or Telnet session from which you access the router.
You can also save the example as a script (.scr) file that executes the commands as though they were entered at the terminal. For information about executing .scr files, see JUNOSe System Basics Configuration Guide.
From Global Configuration mode:
- ! Configure the max-sub-bw QoS parameter definition.
-
qos-parameter-define max-sub-bw hierarchical
-
controlled-interface-type svlan
-
controlled-interface-type vlan
-
instance-interface-type vlan
-
subscriber-interface-type vlan
-
exit
- ! Configure the sp-shape-cvlan and sp-shape-svlan scheduler
profiles.
-
scheduler-profile sp-shape-cvlan
-
shaping-rate max-sub-bw
-
exit
-
scheduler-profile sp-shape-svlan
-
shaping-rate max-sub-bw
-
exit
- ! Configure the qp-shape-cvlan and qp-shape-svlan QoS profiles.
-
qos-profile qp-shape-cvlan
-
vlan queue traffic-class best-effort
-
vlan node scheduler-profile sp-shape-cvlan
-
exit
-
qos-profile qp-shape-svlan
-
svlan node scheduler-profile sp-shape-svlan
-
exit
From Global Configuration mode:
- ! Configure the QoS parameter max-sub-bw for VLAN subinterface
100.
-
interface gigabitEthernet 2/0
-
encapsulation vlan
-
interface gigabitEthernet 2/0.100
-
svlan id 10 100
-
qos-parameter max-sub-bw 1024000
-
qos-profile qp-shape-cvlan
-
exit
- ! Configure the QoS parameter max-sub-bw for VLAN subinterface
101.
-
interface gigabitEthernet 2/0.101
-
svlan id 10 101
-
qos-parameter max-sub-bw 2048000
-
qos-profile qp-shape-cvlan
- ! Attach the QoS profile to the S-VLAN subinterface 10.
-
interface gigabitEthernet 2/0
-
svlan 10 qos-profile qp-shape-svlan