Example: QoS Parameter Configuration for QoS Downstream Rate
This example illustrates how to use parameters to control the downstream rate obtained from ANCP.
In this example, the subscribers on the 0.1 access loop are configured on VLAN1. They subscribe to voice, video, and data traffic with a bandwidth of 10 Mbps. Subscribers on the 1.1 access loop are configured on VLAN2, and subscribe to 1 Mbps of data traffic.
Table 33 lists the shaping mode and shaping rate information received by the QoS downstream rate application upon access loop synchronization. The parameter instances are created with these values.
Configuring Traffic Classes
The QoS administrator configures the traffic classes for voice and video services.
- Configure the traffic class named voice.
host1(config)#traffic-class voicehost1(config-traffic-class)#exit- Configure the traffic class named video.
host1(config)#traffic-class videohost1(config-traffic-class)#exitConfiguring the QoS Parameter Definition for QoS Downstream Rate
The QoS administrator configures a parameter definition for the QoS downstream rate application. Using subscriber-interface types, the QoS administrator then enables ANCP to create parameter instances of the QoS downstream rate application.
- Configure a parameter definition named ancpVlan.
host1(config)#qos-parameter-define ancpVlan application qos-downstream-rate- Define the controlled-interface types for vlan and ip to adjust the shaping rate for the VLAN and IP queues.
- Configure the controlled-interface type for VLAN.
- Configure the controlled-interface type for IP.
host1(config-qos-parameter-define)#controlled-interface-type vlanhost1(config-qos-parameter-define)#controlled-interface-type ip
- Define the subscriber-interface types for vlan and ethernet.
host1(config-qos-parameter-define)#subscriber-interface-type vlanhost1(config-qos-parameter-define)#subscriber-interface-type ethernethost1(config-qos-parameter-define)#exitConfiguring the QoS Parameter Definition for QoS Cell Mode
The QoS administrator then configures the QoS shaping mode using the QoS cell mode application. Using subscriber-interface types, the QoS administrator then enables ANCP to create parameter instances using the QoS cell mode application.
- Configure a parameter definition named cellmodeVlan.
host1(config)#qos-parameter-define cellmodeVlan application qos-cell-mode- Define the controlled-interface types for vlan and ip for the shaping mode.
host1(config-qos-parameter-define)#controlled-interface-type vlanhost1(config-qos-parameter-define)#controlled-interface-type iphost1(config-qos-parameter-define)#exit- Define the subscriber-interface types for vlan and ethernet.
host1(config-qos-parameter-define)#subscriber-interface-type vlanhost1(config-qos-parameter-define)#subscriber-interface-type ethernethost1(config-qos-parameter-define)#exitEnabling QoS Adaptive Mode
The QoS administrator enables QoS adaptive mode for ANCP.
- Enter Layer 2 Control Configuration mode.
host1(config)#l2c- Enable QoS adaptive mode for the system.
host1(config-l2c)#qos-adaptive-modeReference the Parameter Definition Within a Scheduler Profile
The QoS administrator configures the shaping rate and the shared-shaping rate within scheduler profiles for the VLAN1 and VLAN2 subscribers.
- Configure the scheduler profile named vlan1.
- Configure the shared-shaping rate by referencing the ancpVlan parameter with a burst of 10 milliseconds.
host1(config)#scheduler-profile vlan1host1(config-scheduler-profile)#shared-shaping-rate ancpVlan burst 10 milliseconds autohost1(config-scheduler-profile)#exit
- Configure the scheduler profile named voice.
- Configure the shaping rate of 100000 with a burst of 10 milliseconds.
host1(config)#scheduler-profile voicehost1(config-scheduler-profile)#shaping-rate 100000 burst 10 millisecondshost1(config-scheduler-profile)#exit
- Configure the scheduler profile named video.
- Configure the shaping rate of 8000000 with a burst of 10 milliseconds.
host1(config)#scheduler-profile videohost1(config-scheduler-profile)#shaping-rate 8000000 burst 10 millisecondshost1(config-scheduler-profile)#exit
- Configure the scheduler profile named vlan2.
- Configure the shaping rate by referencing the ancpVlan parameter with a burst of 10 milliseconds.
host1(config)#scheduler-profile vlan2host1(config-scheduler-profile)#shaping-rate ancpVlan burst 10 millisecondshost1(config-scheduler-profile)#exitAdding the Scheduler Profiles to a QoS Profile
After configuring the scheduler profiles, the QoS administrator then configures QoS profiles for the VLAN1 and VLAN2 subscribers.
- Configure the QoS profile named vlan1.
- Configure the vlan node and reference the scheduler profile vlan1.
- Configure the vlan queue and reference the voice traffic class and the voice scheduler profile.
- Configure the vlan queue and reference the video traffic class and the video scheduler profile.
host1(config)#qos-profile vlan1host1(config-qos-profile)#vlan node scheduler-profile vlan1host1(config-qos-profile)#vlan queue traffic-class voice scheduler-profile voicehost1(config-qos-profile)#vlan queue traffic-class video scheduler-profile videohost1(config-qos-profile)#exit
- Configure the QoS profile named vlan2.
- Configure the vlan node and reference the scheduler profile vlan2.
host1(config)#qos-profile vlan2host1(config-qos-profile)#vlan node scheduler-profile vlan2host1(config-qos-profile)#exitAttaching the QoS Profile to an Interface
The QoS administrator creates logical interfaces for VLAN1 and VLAN2 and attaches the QoS profiles to them. As the subscribers log in, ANCP creates the parameter instances for cellmodeVlan and ancpVlan using RADIUS VSAs.
- Configure the Gigabit Ethernet interface in slot 6, adapter 0, port 0.
- Configure the VLAN major interface.
- Configure the Gigabit Ethernet interface in slot 6, adapter 0, port 0, subinterface 1.
- Assign VLAN ID of 1.
- Attach the QoS profile vc1 to the interface.
host1(config)#interface gigabitEthernet 6/0/0host1(config-if)#encapsulation vlanhost1(config-if)#interface gigabitEthernet 6/0/0.1host1(config-if)#vlan id 1host1(config-if)#qos-profile vlan1host1(config-if)#exit
- Specify the Gigabit Ethernet interface in slot 6, adapter 0, port 1.
- Assign a VLAN ID of 2.
- Attach the QoS profile vlan2 to the interface.
host1(config-if)#interface gigabitEthernet 6/0/1.1host1(config-if)#vlan id 2host1(config-if)#qos-profile vlan2host1(config-if)#exitComplete 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.
From Global Configuration mode:
! Configure the traffic-classes for video and voice.traffic-class voiceexittraffic-class videoexit! Create the ancpVlan QoS parameter definition.qos-parameter-define ancpVlan application qos-downstream-ratecontrolled-interface-type vlancontrolled-interface-type ipinstance-interface-type vlaninstance-interface-type ethernetexit! Create the cellmodeVlan QoS parameter definition.qos-parameter-define cellmodeVlan application qos-cell-modecontrolled-interface-type vlancontrolled-interface-type ipinstance-interface-type vlaninstance-interface-type ethernetexit! Enable QoS adaptive mode for ANCP.l2cqos-adaptive-modeexit! Configure the vlan1 and vlan2 scheduler profiles.scheduler-profile vlan1shared-shaping-rate ancpVlan burst 10 milliseconds autoexitscheduler-profile voiceshaping-rate 100000 burst 10 millisecondsexitscheduler-profile videoshaping-rate 8000000 burst 10 millisecondsexitscheduler-profile vlan2shaping-rate ancpVlan burst 10 millisecondsexit! Add the scheduler profiles to the vlan1 and vlan2 QoS profiles.qos-profile vlan1vlan node scheduler-profile vlan1vlan queue traffic-class voice scheduler-profile voicevlan queue traffic-class video scheduler-profile videoexitqos-profile vlan2vlan node scheduler-profile vlan2exit! Configure the QoS downstream rate adjustment for VLAN1 and VLAN2.interface gigabitEthernet 6/0/0encapsulation vlaninterface gigabitEthernet 6/0/1.1vlan id 1qos-profile vlan1exitinterface gigabitEthernet 6/0/1.1vlan id 2qos-profile vlan2exit