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

In Figure 64, 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 29 lists the shaping rate and byte adjustment for both subscribers.
Table 29: 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.
- host1(config)#traffic-class voice
- host1(config-traffic-class)#exit
- 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.
- host1(config)#qos-parameter-define byte-adjustment
application qos-byte-adjustment
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.
- host1(config)#qos-parameter-define cell-mode
application qos-cell-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.
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.
- 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
Attaching the Parameter Definition to an Interface
The QoS administrator creates logical interfaces for VLAN1 and VLAN2 and attaches the parameter definitions to them.
- 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
- 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
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