Class of Service
The Class of Service menu allows you to configure most of the Junos OS CoS components for the IPv4 and MPLS traffic on a J Series or an SRX Series device. You can configure forwarding classes for transmitting packets, define which packets are placed into each output queue, schedule the transmission service level for each queue, and manage congestion using a random early detection (RED) algorithm. After defining the CoS components, you must assign classifiers to the required physical and logical interfaces.
This section contains the following topics:
- Defining Forwarding Classes
- Defining Classifiers
- Defining Rewrite Rules
- Defining Schedulers
- Defining Scheduler Maps
- Defining Drop Profiles
- Defining Virtual Channel Groups
- Assigning CoS Components to Interfaces
Defining Forwarding Classes
By assigning a forwarding class to a queue number, you affect the scheduling and marking of a packet as it transits a J Series or an SRX Series device.
To define forwarding classes using the J-Web configuration editor:
- Select Configure>Class of Service>Forwarding
Classes.
The Forwarding Class Configuration summary page appears.
- Fill in the options as shown in Table 87.
- Click one of the following buttons:
- Click OK to check your configuration, save it as a candidate configuration, and return to the main configuration page, then click Commit Options>Commit.
- click Cancel to cancel your entries and return to the main page.
Table 87: Forwarding Classes Configuration Options
Field | Function | Action |
---|---|---|
Forwarding Classes Summary | ||
Forwarding class name | Displays the forwarding class name assigned to the internal queue number. By default, four forwarding classes are assigned to queue numbers 0 (best-effort), 1 (assured-forwarding), 5 (expedited-forwarding), and 7 (network-connect). | None |
Queue number | Displays internal queue numbers to which forwarding classes are assigned. By assigning a forwarding class to a queue number, you affect the scheduling and marking of a packet as it transits a J Series or an SRX Series device. By default, if a packet is not classified, it is assigned to the class associated with queue 0. You can have more than one forwarding class to a queue number. | None |
Queue characteristics | Displays the queue characteristics, for example, video or voice. | None |
Add | Opens a page that allows you to create a new forwarding class. | Click Add to create a new forwarding class. |
Edit | Opens a page that allows you to edit a selected forwarding class. | To edit a forwarding class, select a forwarding class in the summary page, and click Edit. |
Delete | Deletes a specified forwarding class. | To delete a forwarding class, select the forwarding class and click Delete. |
Add Forwarding Class/Edit Forwarding Class | ||
Queue number | Specifies the internal queue number to which a forwarding class is assigned. | To specify an internal queue number, type an integer from 0 through 7, as supported by your device. Note: If you create a new forwarding class that overrides the default queue number, the default forwarding class is deleted after a commit. |
Forwarding class name | Specifies the forwarding class name assigned to the internal queue number. | To assign a forwarding class name to a queue, type the name—for example, be-class. |
Defining Classifiers
Classifiers examine the CoS value or alias of an incoming packet and assign it a level of service by setting its forwarding class and loss priority.
To define classifiers using the J-Web configuration editor:
- Select Configure>Class of Service>Classifiers.
The Classifier Configuration summary page appears.
- Fill in the options as shown in Table 88.
- Click one of the following buttons:
- Click OK to check your configuration, save it as a candidate configuration, and return to the main configuration page, then click Commit Options>Commit.
- Click Cancel to cancel your entries and return to the main page.
Table 88: Classifiers Configuration Options
Field | Function | Action |
---|---|---|
Classifier Configuration Summary | ||
Classifier name | Displays the names of classifiers. | None. |
Classifier type | Displays the classifier type. The following type of classifiers are supported:
| None. |
Details of Classifiers | ||
Incoming code point | Displays CoS values and aliases to which forwarding class and loss priority are mapped. | None. |
Forwarding class name | Displays forwarding class names that are assigned to specific CoS values and aliases of a classifier. | None. |
Loss priority | Displays loss priorities that are assigned to specific CoS values and aliases of a classifier. | None. |
Add | Opens a page that allows you to define classifiers. | To add a classifier, click Add. |
Edit | Opens a page that allows you to edit a selected classifier. | To edit a classifier, select a classifier in the summary page and click Edit. |
Delete | Deletes a specified classifier. | To delete a classifier, select the classifier and click Delete. |
Add Classifier | ||
Classifier name | Specifies the name for a classifier. | To name a classifier, type the name—for example, ba-classifier. |
Classifier type | Specifies a classifier type. | Select a classifier type from the drop-down list—for example, dscp, ieee-802.1, or inet-precedence. |
Add | Opens a page that allows you to assign a forwarding class and loss priority to the specified CoS value and alias. A classifier examines the incoming packet's header for the specified CoS value and alias and assigns it the forwarding class and loss priority that you have defined. | To assign a code point, forwarding class, and loss priority to a specific CoS classifier, click Add. |
Add Code Point Mapping/Edit Code Point Mapping | ||
Code point | Specifies the CoS value in bits and the alias of a classifier. | To specify a CoS value and alias, either select preconfigured ones from the list or type new ones. |
Forwarding class | Assigns the forwarding class to the specified CoS value and alias. | To assign a forwarding class, select either one of the following default forwarding classes or one that you have configured:
|
Loss priority | Assigns a loss priority to the specified CoS value and alias. | To assign a loss priority, select one:
|
Defining Rewrite Rules
Use the rewrite rules to alter the CoS values in outgoing packets to meet the requirements of the targeted peer. A rewrite rule examines the forwarding class and loss priority of a packet and sets its bits to a corresponding value specified in the rule.
To define rewrite rules using the J-Web configuration editor:
- Select Configure>Class of Service>Rewrite
Rules.
The Configure Rewrite Rule summary page appears.
- Fill in the options as shown in Table 89.
- Click one of the following buttons:
- Click OK to check your configuration, save it as a candidate configuration, and return to the main configuration page, then click Commit Options>Commit.
- Click Cancel to cancel your entries and return to the main page.
Table 89: Rewrite Rules Configuration Options
Field | Function | Action |
---|---|---|
Configure Rewrite Rule Summary | ||
Rewrite rule name | Displays names of defined rewrite rules. | None. |
Rewrite rule type | Displays the rewrite rule type. The following types are supported for J6350 and the SRX Series devices:
| None. |
Code Point Details | ||
Incoming code point | Displays the CoS values and aliases that a specific rewrite rule has set for a specific forwarding class and loss priority. | None. |
Forwarding class name | Displays forwarding classes associated with a specific rewrite rule. | None. |
Loss priority | Displays loss priority values associated with a specific rewrite rule. | None. |
Add | Opens a page that allows you to define a new rewrite rule. | To add a rewrite rule, click Add. |
Edit | Opens a page that allows you to edit a selected rewrite rule. | To edit a rewrite rule, select a rewrite rule in the summary page and click Edit. |
Delete | Removes selected rewrite rules. | To remove a rule, select the rewrite rule and click Delete. |
Add Rewrite Rule/Edit Rewrite Rule | ||
Rewrite rule name | Specifies a rewrite rule name. | To name a rule, type the name—for example, rewrite-dscps. |
Rewrite rule type | Specifies a rewrite rule type. | Select a rewrite rule type from the drop-down list—for example, dscp, ieee-802.1, or inet-precedence. |
Add | Opens a page that allows you to rewrite outgoing CoS values of a packet based on the forwarding class and loss priority. | To assign a code point, forwarding class, and loss priority to the rewrite rule, click Add. |
Add Code Point Mapping | ||
Code point | Specifies the CoS value in bits and the alias of a classifier. | To specify a CoS value and alias, select one from the drop-down list. |
Forwarding class | Assigns the forwarding class to the rewrite rule. | To assign a forwarding class, select one from the drop-down list:
|
Loss priority | Assigns a loss priority to the specified rewrite rule. | To assign a loss priority, select one:
|
Defining Schedulers
An individual device interface has multiple queues assigned to store packets temporarily before transmission. To determine the order in which to service the queues, the device uses a round-robin scheduling method based on priority and the queue's weighted round-robin (WRR) credits. Junos OS schedulers allow you to define the priority, bandwidth, delay buffer size, rate control status, and RED drop profiles to be applied to a particular queue for packet transmission.
To configure schedulers using the J-Web configuration editor:
- Select Configure>Class of Service>Schedulers.
The Configure Schedulers summary page appears.
- Fill in the options as shown in Table 90.
- Click one of the following buttons:
- Click OK to check your configuration, save it as a candidate configuration, and return to the main configuration page, then click Commit Options>Commit.
- Click Cancel to cancel your entries and return to the main page.
Table 90: Schedulers Configuration Options
Field | Function | Action |
---|---|---|
Configure Schedulers Summary | ||
Scheduler name | Displays the names of defined schedulers. | None |
Scheduler priority | Displays the transmission priority of the scheduler, which determines the order in which an output interface transmits traffic from the queues. | None |
Details of Scheduler | ||
Name | Displays the scheduler name. | None |
Value | Displays the CoS value. | None |
Add | Opens a page that allows you to add a scheduler. | To add a scheduler, click Add. |
Edit | Opens a page that allows you to edit a selected scheduler. | To edit a scheduler, select an existing scheduler in the summary page and click Edit. |
Delete | Removes selected schedulers. | To remove an existing scheduler, select the scheduler and click Delete. |
Add Scheduler/Edit Scheduler | ||
Scheduler name | Specifies the name for a scheduler. | To name a scheduler, type the name—for example, be-scheduler. |
Scheduler priority | Sets the transmission priority of the scheduler, which determines the order in which an output interface transmits traffic from the queues. You can set scheduling priority at different levels in an order of increasing priority from low to high. A high-priority queue with a high transmission rate might lock out lower-priority traffic. | To specify a priority, select one:
|
Buffer size | Defines the size of the delay buffer. By default, queues 0 through 7 have the following percentage of the total available buffer space:
Note: A large buffer size value correlates with a greater possibility of packet delays. This might not be practical for sensitive traffic such as voice or video. | To define a delay buffer size for a scheduler, select the appropriate option:
|
Shaping rate | Defines the minimum bandwidth allocated to a queue. The default shaping rate is 100 percent, which is the same as no shaping at all. | To define a shaping rate, select the appropriate option:
|
Transmit rate | Defines the transmission rate of a scheduler. The transmit rate determines the traffic bandwidth from each forwarding class you configure. By default, queues 0 through 7 have the following percentage of transmission capacity:
| To define a transmit rate, select the appropriate option:
|
Defining Scheduler Maps
After defining schedulers you associate them with forwarding classes by means of scheduler maps.
To configure scheduler maps using the J-Web configuration editor:
- Select Configure>Class of Service>Scheduler
Maps.
The Configure Scheduler Maps summary page appears.
- Fill in the options as shown in Table 91.
- Click one of the following buttons:
- Click OK to check your configuration, save it as a candidate configuration, and return to the main configuration page, then click Commit Options>Commit.
- Click Cancel to cancel your entries and return to the main page.
Table 91: Scheduler Maps Configuration Options
Field | Function | Action |
---|---|---|
Configure Scheduler Maps | ||
Scheduler map name | Displays the names of defined scheduler maps. Scheduler maps link schedulers to forwarding classes. | None |
Schedulers | For each map, displays the schedulers assigned to it. | None |
Forwarding Class | For each map, displays the forwarding classes assigned to it. | None |
Details of Scheduler | ||
Name | Displays the scheduler assigned to the selected scheduler map | None |
Value | Displays the CoS values. | None |
Add | Opens a page that allows you to add a scheduler map. | To add a scheduler map, click Add. |
Edit | Opens a page that allows you to edit a selected scheduler map. | To edit an existing scheduler map, select the scheduler map in the summary page and click Edit. |
Delete | Removes selected scheduler maps. | To remove an existing scheduler map, select the scheduler map and click Delete. |
Add Scheduler Map/Edit Scheduler Map | ||
Scheduler map name | Specifies the name for a scheduler map. | To name a map, type the name—for example, be-scheduler-map. |
Scheduler mapping | Allows you to associate a preconfigured scheduler with a forwarding class. Once applied to an interface, the scheduler maps affect the hardware queues, packet schedulers, and RED drop profiles. | To associate a scheduler with a forwarding class, locate the forwarding class and select the scheduler in the box next to it. |
Defining Drop Profiles
A drop profile is a feature of the random early detection (RED) process that allows packets to be dropped before queues are full. Drop profiles are composed of two main values—the queue fullness and the drop probability.
To configure drop profiles using the J-Web configuration editor:
- Select Configure>Class of Service>Drop
Profile.
The RED drop profiles summary page appears.
- Fill in the options as shown in Table 92.
- Click one of the following buttons:
- Click OK to check your configuration, save it as a candidate configuration, and return to the main configuration page, then click Commit Options>Commit.
- Click Cancel to cancel your entries and return to the main page.
Table 92: RED Drop Profile Configuration Options
Field | Function | Action |
---|---|---|
Red Drop Profiles | ||
Drop profile name | Displays the configured random early detection (RED) drop profile names. | None |
Profile type | Displays whether a RED drop profile type is interpolated or segmented. | None |
Data points | Displays information about the data point types. | None |
Add | Opens a page that allows you to add a RED drop profile. | To create a new RED drop profile, click Add. |
Edit | Opens a page that allows you to edit a RED drop profile. | To edit an existing profile, select the profile in the summary page and click Edit. |
Delete | Removes selected RED drop profiles. | To remove an existing profile, select the profile and click Delete. |
Add RED Drop Profile/Edit RED Drop Profile | ||
Drop profile name | Specifies a name for a drop profile. A drop profile consists of pairs of values between 0 and 100, one for queue buffer fill level and one for drop probability, that determine the relationship between a buffer's fullness and the likelihood it will drop packets. The values you assign to each pair must increase relative to the previous pair of values. With a few value pairs, the system automatically constructs a drop profile. | To name a drop profile, type the name—for example, be-normal. |
RED drop profile type | Specifies whether a RED drop profile type is segmented or interpolated.
| Select Segmented or Interpolated. |
Add | Opens a page that allows you to add the specified queue buffer fill level and drop probability as a data point for the graph. | To add fill level and drop probability, click Add. |
Data point | Specifies the points for generating the RED drop profile graph. Each data point is defined by a pair of x and y coordinates and represents the relationship between them. The x axis represents the queue buffer fill level, which is a percentage value of how full the queue is. A value of 100 means the queue is full. The y axis represents the drop probability, which is a percentage value of the chances of a packet being dropped. A value of 0 means that a packet is never dropped, and a value of 100 means that all packets are dropped. | To specify x and y coordinates for data points, type a number between 0 and 100 in the following boxes:
|
Defining Virtual Channel Groups
![]() | Note: SRX3400, SRX3600, SRX5600, and SRX5800 devices do not support virtual channels. |
Use virtual channels to avoid oversubscription of links by limiting traffic from a higher aggregated bandwidth to a lower one—for example, to limit traffic from a main office to branch offices. You channelize this traffic by applying queuing, packet scheduling, and accounting rules to logical interfaces.
To configure virtual channel groups using the J-Web configuration editor:
- Select Configure>Class of Service>Virtual
Channel Groups.
The configure class of service page appears.
- Fill in the options as shown in Table 92.
- Click one of the following buttons:
- Click OK to check your configuration, save it as a candidate configuration, and return to the main configuration page, then click Commit Options>Commit.
- Click Cancel to cancel your entries and return to the main page.
Table 93: Virtual Channel Group Quick Configuration Page Summary
Field | Function | Your Action |
---|---|---|
Virtual Channel Groups Summary | ||
Virtual Channel Group Name | Displays names of defined virtual channel groups. Allows you to edit a virtual channel group. | None |
Virtual Channel Name | Displays names of defined virtual channels. Allows you to edit a virtual channel. | None |
Default | Marks the default virtual channel of a group. One of the virtual channels in a group must be configured as the default channel. Any traffic not explicitly directed to a particular channel is transmitted by this channel. | None |
Scheduler Map | Displays the scheduler map assigned to a particular virtual channel. | None |
Shaping Rate | Displays the shaping rate configured for a virtual channel. | None |
Add | Opens a page that allows you to add a virtual channel group. | To add a virtual channel group, click Add. |
Delete | Removes a specific virtual channel group. | To remove a specific virtual channel group, select it from the summary page, and click Delete. |
Add a Virtual Channel Group/Edit a Virtual Channel Group | ||
Virtual Channel Group Name | Specifies a name for a virtual channel group. | To name a group, type the name—for example, wan-vc-group. |
Add | Creates a virtual channel group. Opens a page that allows you to add a virtual channel to the specified group. | To create a virtual channel group, click Add. |
Add a Virtual Channel/Edit Virtual Channel | ||
Virtual Channel Name | Specifies the name of a virtual channel to be assigned to a virtual channel group. | To name a virtual channel, either select a predefined name from the list or type a new name—for example, branch1–vc. |
Scheduler Map | Specifies a predefined scheduler map to assign to a virtual channel. Scheduler maps associate schedulers with forwarding classes. For information about how to define scheduler maps, see Table 91. | To specify a scheduler map, select it from the Scheduler Map list. |
Shaping Rate | Specifies the shaping rate for a virtual channel. The shaper limits the maximum bandwidth transmitted by a virtual channel. Configuring a shaping rate is optional. If no shaping rate is configured, a virtual channel without a shaper can use the full logical interface bandwidth. | To specify a shaping rate, select one of the following options:
|
Assigning CoS Components to Interfaces
![]() | Note: SRX Series devices do not support WAN interfaces (including T1/E1 and channelized T1/E1). |
After you have defined CoS components, you must assign them to logical or physical interfaces. The Assign to Interface option allows you to assign scheduler maps to physical or logical interfaces and to assign forwarding classes, classifiers, rewrite rules, or virtual channel groups to logical interfaces.
To assign interfaces using the J-Web configuration editor:
- Select Configure>Class of Service>Assign
to Interface.
The Configure Interface Association summary page appears. The summary page displays the interfaces available for CoS component assignment and the status of existing CoS components.
- Fill in the options as shown in Table 94.
- Click OK to check your configuration, save it as a candidate configuration, and return to the main configuration page, then click Commit Options>Commit.
- Click Cancel to cancel your entries and return to the main page.
Table 94: Assigning CoS Components to Interfaces
Field | Function | Action |
---|---|---|
Configure Interface Association | ||
Port | Displays the port and interface name. | None |
Scheduler Map | Displays predefined scheduler maps for the physical interface. A scheduler map enables the physical interface to have more than one set of output queues. Note: For 4-port Fast Ethernet ePIMs, if you apply a CoS scheduler map on outgoing (egress) traffic, the device does not divide the bandwidth appropriately among the CoS queues. As a workaround, configure enforced CoS shaping on the ports. | None |
Edit | Opens an edit page that allows you to associate the system default scheduler map or a preconfigured map to the selected interface. | To change a map for an interface, select it from the Scheduler Map list and click Edit. |
Details of Logical Interfaces | ||
Unit | None | |
Forwarding class | Displays the forwarding classes assigned to a particular interface. | None |
Scheduler map | Displays the scheduler maps assigned to a particular interface. | None |
Virtual channel group | Displays the virtual channel groups assigned to a particular interface. | None |
Classifier | Displays the classifiers assigned to a particular interface—for example, information about DSCP, DSCPv6, EXP, and inet classifiers. | None |
Rewrite rule | Displays the rewrite rules assigned to a particular interface—for example, information about DSCP, DSCPv6, EXP and inet rewrite rules. | None |
Add | Opens a page that allows you to add a CoS service to a physical interface. | To add a CoS service to a physical interface, click Add. |
Edit | Opens a page that allows you to edit a CoS services assigned to an interface. | To edit an existing service, select the service in the summary page and click Edit. |
Delete | Removes CoS services assigned to a specific interface. | To remove CoS services assigned to a specific interface, locate the interface name, click the check box next to it, and click Delete. |
Add Logical Interface/Edit Logical Interface | ||
Unit | Specifies the name of a logical interface. Allows you to assign CoS components to all logical interfaces configured on a physical interface at the same time. | To specify an interface for CoS assignment, type its name in the Unit box. To assign CoS services to all logical interfaces configured on this physical interface, type the wildcard character (*). |
Scheduler Map | Specifies a predefined scheduler map for this interface. Note: You can configure either a scheduler map or a virtual channel group on a logical interface, not both. | To assign a scheduler map to the interface, select it from the list. |
Forwarding Class | Assigns a predefined forwarding class to incoming packets on a logical interface. | To assign a forwarding class to the interface, select it from the list. |
Virtual Channel Group | Applies a virtual channel group to a logical interface. Applying a virtual channel group creates a set of eight queues for each virtual channel in the group. Note: You can configure either a scheduler map or a virtual channel group on a logical interface, not both. | To specify a virtual channel group for the interface, select it from the list. |
Classifiers | Allows you to apply classification maps to a logical interface. Classifiers assign a forwarding class and loss priority to an incoming packet based on its CoS value. | To assign a classification map to the interface, select an appropriate classifier for each CoS value type used on the interface. |
Rewrite Rules | Allows you to apply rewrite rule configurations to a logical interface. Rewrite rules rewrite the CoS values in an outgoing packet based on forwarding class and loss priority. You can choose to apply your own rewrite rule or a default one. The default rewrite assignments are based on the default bit definitions of DSCP, DSCP IPv6, MPLS EXP, and IP precedence. | To apply a rewrite rule configuration to the interface, select a rule for each CoS value type used on the interface. |