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 1 displays the Ethernet network to which the QoS administrator applies the byte adjustment.
Figure 1: Byte Adjustment for VC1 and VC2

In Figure 1, 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 1 lists the shaping rate and byte adjustment for both subscribers.
Table 1: Byte Adjustment for Subscribers VC1 and VC2
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 voice
- host1(config-traffic-class)#exit
- Configure the traffic class named video.
- host1(config)#traffic-class video
- host1(config-traffic-class)#exit
Configuring 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.
Configuring 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 vlan
- host1(config-qos-parameter-define)#controlled-interface-type ip
- host1(config-qos-parameter-define)#exit
Reference 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 for the subscriber VC1.
- Configure the scheduler profile for the voice service.
- Configure the scheduler profile for the video service.
- Configure the scheduler profile for the subscriber VC2.
Adding 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 vc1 QoS profile with a shared-shaping rate
of 10 Mbps.
- 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 vc1
- host1(config-qos-profile)#vlan node scheduler-profile vc1
- host1(config-qos-profile)#vlan queue traffic-class voice schedule-profile voice
- host1(config-qos-profile)#vlan queue traffic-class video schedule-profile video
- host1(config-qos-profile)#exit
- Configure the vc2 QoS profile with a shaping rate of 1 Mbps.
Attaching the Parameter Definition to an Interface
The QoS administrator creates logical interfaces for VLAN1 and VLAN2 and attaches the parameter definitions to them.
- Attach the parameter definition to VLAN1.
- 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/0
- host1(config-if)#encapsulation vlan
- host1(config-if)#interface gigabitEthernet 6/0/0.1
- host1(config-if)#vlan id 1
- host1(config-if)#qos-parameter byte-adjustment -28
- host1config-if)#qos-parameter cell-mode 1
- host1(config-if)#qos-profile vc1
- host1(config-if)#exit
- Attach the parameter definition to VLAN2.
- 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.1
- host1(config-if)#vlan id 2
- host1(config-if)#qos-parameter byte-adjustment -2
- host1(config-if)#qos-parameter cell-mode 1
- host1(config-if)#qos-profile vc2
- host1(config-if)#exit
Complete 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.
From Global Configuration mode:
- ! Configure the traffic-classes for video and voice.
-
traffic-class voice
-
exit
-
traffic-class video
-
exit
- ! Create the byte-adjustment QoS parameter definition.
-
qos-parameter-define byte-adjustment application
qos-byte-adjustment
-
controlled-interface-type vlan
-
controlled-interface-type ip
-
exit
- ! Create the cell-mode QoS parameter definition.
-
qos-parameter-define cell-mode application
qos-cell-mode
-
controlled-interface-type vlan
-
controlled-interface-type ip
-
exit
- ! Configure the vc1 and vc2 scheduler profiles.
-
scheduler-profile vc1
-
shared-shaping-rate 10000000 burst 10 milliseconds
-
exit
-
scheduler-profile voice
-
shaping-rate 100000 burst 10 milliseconds
-
exit
-
scheduler-profile video
-
shaping-rate 8000000 burst 10 milliseconds
-
exit
-
scheduler-profile vc2
-
shaping-rate 1000000 burst 10 m
-
exit
- ! Add the scheduler profiles to the vc1 QoS profile.
-
qos-profile vc1
-
vlan node scheduler-profile vc1
-
vlan queue traffic-class voice schedule-profile
voice
-
vlan queue traffic-class video schedule-profile
video
-
exit
-
qos-profile vc2
-
vlan node scheduler-profile vc2
- ! Configure the byte adjustment for VLAN1 and VLAN2.
-
interface gigabitEthernet 6/0/0
-
encapsulation vlan
-
interface gigabitEthernet 6/0/0.1
-
vlan id 1
-
qos-parameter byte-adjustment -28
-
qos-parameter cell-mode 1
-
qos-profile vc1
-
interface gigabitEthernet 6/0/1.1
-
vlan id 2
-
qos-parameter byte-adjustment -2
-
qos-parameter cell-mode 1
-
qos-profile vc2