Example: QoS Parameter Configuration for Hierarchical Parameters
The example in this section illustrates how to configure hierarchical parameters for VLANs and S-VLANs.
Figure 60 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).
![]()
Procedure for QoS Administrators
This section describes the procedures to configure the scheduler hierarchy shown in Figure 60 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:
- Configure the parameter definition named max-sub-bw.
- Enable the parameter to control S-VLANs.
- Enable the parameter to control VLANs.
- Enable the parameter to have instances created on VLAN subinterfaces.
- Specify that the QoS client can create the parameter instance for VLANs, which represent subscribers.
host1(config)#qos-parameter-define max-sub-bw hierarchicalhost1(config-qos-parameter-define)#controlled-interface-type svlanhost1(config-qos-parameter-define)#controlled-interface-type vlanhost1(config-qos-parameter-define)#instance-interface-type vlanhost1(config-qos-parameter-define)#subscriber-interface-type vlanhost1(config-qos-parameter-define)#exitConfiguring the Scheduler Profiles
The QoS administrator can then reference the parameter definition within a scheduler profile, which defines the shaping rates for the parameter.
- Configure the scheduler profile named sp-shape-cvlan.
- Configure the shaping rate by referencing the parameter max-sub-bw.
host1(config)#scheduler-profile sp-shape-cvlanhost1(config-scheduler-profile)#shaping-rate max-sub-bwhost1(config-scheduler-profile)#exit
- Configure the scheduler profile named sp-shape-svlan.
- Configure the shaping rate by referencing the parameter max-sub-bw.
host1(config)#scheduler-profile sp-shape-svlanhost1(config-scheduler-profile)#shaping-rate max-sub-bwhost1(config-scheduler-profile)#exitConfiguring 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.
- Configure the QoS profile named qp-shape-cvlan.
- Configure the VLAN queue and reference the best-effort traffic class.
- Configure the VLAN node and reference the scheduler profile for shaping VLANs.
host1(config)#qos-profile qp-shape-cvlanhost1(config-qos-profile)#vlan queue traffic-class best-efforthost1(config-qos-profile)#vlan node scheduler-profile sp-shape-cvlanhost1(config-qos-profile)#exit
- Configure the QoS profile named qp-shape-svlan.
- Configure the S-VLAN node and reference the scheduler profile sp-shape-svlan.
host1(config)#qos-profile qp-shape-svlanhost1(config-qos-profile)#svlan node scheduler-profile sp-shape-svlanhost1(config-qos-profile)#exitProcedure for QoS Clients
This section describes procedures to create parameter instances at VLAN subinterface 100 and VLAN subinterface 101.
- Specify the Gigabit Ethernet interface in slot 2, port 0.
- Configure the VLAN major interface.
- Configure the VLAN subinterface at slot 2, port 0, subinterface 100.
- Assign an S-VLAN ID of 10 and a VLAN ID of 100 to the VLAN subinterface.
- Attach the max-sub-bw QoS parameter to the subinterface with a value of 1024000.
- Attach the qp-shape-cvlan QoS profile to the subinterface.
host1(config)#interface gigabitEthernet 2/0host1(config-if)#encapsulation vlanhost1(config)#interface gigabitEthernet 2/0.100host1(config-if)#svlan id 10 100host1(config-if)#qos-parameter max-sub-bw 1024000host1(config-if)#qos-profile qp-shape-cvlanhost1(config-if)#exit
- Specify the VLAN subinterface 101 in slot 2, port 0.
- Assign an S-VLAN ID of 10 and a VLAN ID of 101 to the VLAN subinterface.
- Attach the max-sub-bw QoS parameter to the subinterface with a value of 2048000.
- Attach the qp-shape-cvlan QoS profile to the subinterface.
host1(config-if)#interface gigabitEthernet 2/0.101host1(config-if)#svlan id 10 101host1(config-if)#qos-parameter max-sub-bw 2048000host1(config-if)#qos-profile qp-shape-cvlanhost1(config-if)#exit
- Specify the Gigabit Ethernet interface at slot 2, port 0.
- Attach the qp-shape-svlan QoS profile to the node at S-VLAN subinterface 10.
host1(config)#interface gigabitEthernet 2/0host1(config-if)#svlan 10 qos-profile qp-shape-svlanMonitoring Hierarchical QoS Parameters
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/0parameter instanceinterface name value Type--------------------------- ---------- ------- ------------GigabitEthernet2/0 svlan 10 max-sub-bw 3072000 hierarchicalGigabitEthernet2/0.100 max-sub-bw 1024000 explicitGigabitEthernet2/0.101 max-sub-bw 2048000 explicitExplicit parameter instances: 2Hierarchical parameter instances: 1IP multicast parameter instances: 0Parameter instances reported: 3Complete Configuration Example
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, Chapter 2, Command-Line Interface.
QoS Administrator Configuration
From Global Configuration mode:
! Configure the max-sub-bw QoS parameter definition.qos-parameter-define max-sub-bw hierarchicalcontrolled-interface-type svlancontrolled-interface-type vlaninstance-interface-type vlansubscriber-interface-type vlanexit! Configure the sp-shape-cvlan and sp-shape-svlan scheduler profiles.scheduler-profile sp-shape-cvlanshaping-rate max-sub-bwexitscheduler-profile sp-shape-svlanshaping-rate max-sub-bwexit! Configure the qp-shape-cvlan and qp-shape-svlan QoS profiles.qos-profile qp-shape-cvlanvlan queue traffic-class best-effortvlan node scheduler-profile sp-shape-cvlanexitqos-profile qp-shape-svlansvlan node scheduler-profile sp-shape-svlanexitQoS Client Configuration
From Global Configuration mode:
! Configure the QoS parameter max-sub-bw for VLAN subinterface 100.interface gigabitEthernet 2/0encapsulation vlaninterface gigabitEthernet 2/0.100svlan id 10 100qos-parameter max-sub-bw 1024000qos-profile qp-shape-cvlanexit! Configure the QoS parameter max-sub-bw for VLAN subinterface 101.interface gigabitEthernet 2/0.101svlan id 10 101qos-parameter max-sub-bw 2048000qos-profile qp-shape-cvlan! Attach the QoS profile to the S-VLAN subinterface 10.interface gigabitEthernet 2/0svlan 10 qos-profile qp-shape-svlan