Example: QoS Parameter Configuration for QoS Cell Mode and Byte Adjustment for Cell Shaping
The example in this section illustrates how to configure the byte adjustment application to adjust the shaping rate for downstream ATM traffic from the customer premise equipment (CPE) to Ethernet interfaces configured on an E320 router.
In this example, the QoS administrator manages the shaping rate using a combination of the byte adjustment application and cell shaping mode to account for different layer 2 encapsulations and the ATM cell pad, header, and trailer.
Figure 62 displays the Ethernet network to which the QoS administrator applies the byte adjustment.
![]()
In Figure 62, VLAN 1 and VLAN 2 map to the subscribers at VC1 and VC2.
The QoS administrator allocates a total of 10 Mbps of bandwidth for voice, video, and data services to VC1, and 2 Mbps of bandwidth of data traffic for VC2.
Table 28 lists the shaping rate and byte adjustment for both subscribers.
Configuring Traffic Classes
The QoS administrator configures the traffic classes and traffic-class groups for video and voice 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
The QoS administrator configures a parameter definition and the byte adjustment application. The QoS administrator then enables the QoS client to create a parameter instance of the byte adjustment from VLAN interfaces. All interfaces above the VLAN use the same byte adjustment value.
- Configure a parameter definition named byte-adjustment.
host1(config)#qos-parameter-define byte-adjustment application qos-byte-adjustment- 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 iphost1(config-qos-parameter-define)#exitConfiguring the QoS Shaping Mode
The QoS administrator then configures the QoS shaping mode using the QoS cell mode application. When you configure the QoS shaping mode to cell mode on port 0 of the IOA, all ports on the IOA use the same value.
- Configure a parameter definition named cell-mode.
host1(config)#qos-parameter-define cell-mode 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)#exitReference the Parameter Definition Within a Scheduler Profile
The QoS administrator configures the shaping rate and the shared-shaping rate within scheduler profiles for the subscribers at VC1 and VC2.
- Configure the scheduler profile named vc1.
- Configure the shared-shaping rate of 10000000 with a burst of 10 milliseconds.
host1(config)#scheduler-profile vc1host1(config-scheduler-profile)#shared-shaping-rate 10000000 burst 10 millisecondshost1(config-scheduler-profile)#exit
- Configure the scheduler profile named voice.
- Configure the shared-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 voice.
- Configure the shared-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 vc2.
- Configure the shared-shaping rate of 1000000 with a burst of 10 milliseconds.
host1(config)#scheduler-profile vc2host1(config-scheduler-profile)#shaping-rate 1000000 burst 10 mhost1(config-scheduler-profile)#exitAdding the Scheduler Profiles to a QoS Profile
After configuring the scheduler profiles, the QoS administrator then configures QoS profiles for subscribers VC1 and VC2.
- Configure the QoS profile vc1.
- Configure the vlan node and reference the scheduler profile vc1.
- 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 vc1host1(config-qos-profile)#vlan node scheduler-profile vc1host1(config-qos-profile)#vlan queue traffic-class voice schedule-profile voicehost1(config-qos-profile)#vlan queue traffic-class video schedule-profile videohost1(config-qos-profile)#exit
- Configure the QoS profile vc2.
- Configure the vlan node and reference the scheduler profile vc2.
host1(config)#qos-profile vc2host1(config-qos-profile)#vlan node scheduler-profile vc2host1(config-qos-profile)#exitAttaching the Parameter Definition to an Interface
The QoS administrator creates logical interfaces for VLAN1 and VLAN2 and attaches the parameter definitions to them.
- 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.
- Create a parameter instance for byte-adjustment with a value of -28.
- Create a parameter instance for cell-mode with a value of 1 (cell shaping mode).
- Attach the QoS profile vc1 to the Gigabit Ethernet 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-parameter byte-adjustment -28host1config-if)#qos-parameter cell-mode 1host1(config-if)#qos-profile vc1host1(config-if)#exit
- Specify the Gigabit Ethernet interface in slot 6, adapter 0, port 1.
- Assign a VLAN ID of 2.
- Create a parameter instance for byte-adjustment with a value of -2.
- Create a parameter instance for cell-mode with a value of 1 (cell shaping mode).
- Attach the QoS profile vc2 to the Gigabit Ethernet interface.
host1(config-if)#interface gigabitEthernet 6/0/1.1host1(config-if)#vlan id 2host1(config-if)#qos-parameter byte-adjustment -2host1(config-if)#qos-parameter cell-mode 1host1(config-if)#qos-profile vc2host1(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 byte-adjustment QoS parameter definition.qos-parameter-define byte-adjustment application qos-byte-adjustmentcontrolled-interface-type vlancontrolled-interface-type ipexit! Create the cell-mode QoS parameter definition.qos-parameter-define cell-mode application qos-cell-modecontrolled-interface-type vlancontrolled-interface-type ipexit! Configure the vc1 and vc2 scheduler profiles.scheduler-profile vc1shared-shaping-rate 10000000 burst 10 millisecondsexitscheduler-profile voiceshaping-rate 100000 burst 10 millisecondsexitscheduler-profile videoshaping-rate 8000000 burst 10 millisecondsexitscheduler-profile vc2shaping-rate 1000000 burst 10 mexit! Add the scheduler profiles to the vc1 QoS profile.qos-profile vc1vlan node scheduler-profile vc1vlan queue traffic-class voice schedule-profile voicevlan queue traffic-class video schedule-profile videoexitqos-profile vc2vlan node scheduler-profile vc2! Configure the byte adjustment for VLAN1 and VLAN2.interface gigabitEthernet 6/0/0encapsulation vlaninterface gigabitEthernet 6/0/0.1vlan id 1qos-parameter byte-adjustment -28qos-parameter cell-mode 1qos-profile vc1interface gigabitEthernet 6/0/1.1vlan id 2qos-parameter byte-adjustment -2qos-parameter cell-mode 1qos-profile vc2