To make settings consistent across Juniper Networks routers, you configure many CoS settings used on the adaptive services interface at the [edit class-of-service] hierarchy level. When you commit this configuration along with what you configure at the [edit services cos] hierarchy level, these properties are applied to the AS or MultiServices PIC.
The following configuration examples at the [edit class-of-service] hierarchy level can be applied on the adaptive services interface. For more information, see the JUNOS Class of Service Configuration Guide.
![]() |
Note: The first two configurations, forwarding-class name to forwarding-class ID mapping and forwarding-class name to queue number mapping, are mutually exclusive. |
Forwarding-Class Name to Forwarding-Class ID Mapping
This configuration example illustrates the mapping between the forwarding-class name and the forwarding-class ID:
- [edit class-of-service]
- forwarding-classes {
- forwarding-class fc0 0;
- forwarding-class fc1 0;
- forwarding-class fc2 1;
- forwarding-class fc3 1;
- forwarding-class fc4 2;
- forwarding-class fc5 2;
- forwarding-class fc6 3;
- forwarding-class fc7 3;
- forwarding-class fc8 4;
- forwarding-class fc9 4;
- forwarding-class fc10 5;
- forwarding-class fc11 5;
- forwarding-class fc12 6;
- forwarding-class fc13 6;
- forwarding-class fc14 7;
- forwarding-class fc15 7;
- }
Forwarding-Class Name to Queue Number Mapping
This configuration specifies the mapping between the forwarding-class name and a queue number:
- [edit class-of-service]
- forwarding-classes {
- queue queue-number class-name <priority (high | low)>;
- }
The following is a configuration example:
- forwarding-classes {
- queue 0 be;
- queue 1 ef;
- queue 2 af;
- queue 3 nc;
- queue 4 ef1;
- queue 5 ef2;
- queue 6 af1;
- queue 7 nc1;
- }
Diffserv Code Point Alias to DSCP Bits Mapping
This configuration provides a mapping from an alias name to a DSCP bit value. The alias then can be used instead of the DSCP bits in adaptive services configurations.
- [edit class-of-service]
- code-point-aliases {
-
- (dscp | dscp-ipv6 | exp | ieee-802.1 | inet-precedence)
{
-
alias | bits;
- }
- }
Here is an example:
- code-point-aliases {
-
- dscp {
- my1 110001;
- my2 101110;
- be 000001;
- cs7 110000;
- }
- }