Default CoS Settings
Even when you do not configure any CoS settings on your routing platform, the software performs some CoS functions to ensure that user traffic and protocol packets are forwarded with minimum delay when the network is experiencing congestion. Some default mappings are automatically applied to each logical interface that you configure. Other default mappings, such as explicit default classifiers and rewrite rules, are in operation only if you explicitly associate them with an interface.
You can display default CoS settings by running the show class-of-service operational mode command.
This section contains the following topics:
- Default CoS Values and Aliases
- Forwarding Class Queue Assignments
- Scheduler Settings
- Default Behavior Aggregate Classifiers
- CoS Value Rewrites
- Sample Behavior Aggregate Classification
Default CoS Values and Aliases
Table 236 shows the default mappings between the bit values and standard aliases.
Table 236: Well-Known CoS Aliases and Default CoS Values
CoS Value Type | Alias | CoS Value |
---|---|---|
DSCP and DSCP IPv6 | ef | 101110 |
af11 | 001010 | |
af12 | 001100 | |
af13 | 001110 | |
af21 | 010010 | |
af22 | 010100 | |
af23 | 010110 | |
af31 | 011010 | |
af32 | 011100 | |
af33 | 011110 | |
af41 | 100010 | |
af42 | 100100 | |
af43 | 100110 | |
be | 000000 | |
cs1 | 001000 | |
cs2 | 010000 | |
cs3 | 011000 | |
cs4 | 100000 | |
cs5 | 101000 | |
nc1/cs6 | 110000 | |
nc2/cs7 | 111000 | |
MPLS EXP | be | 000 |
be1 | 001 | |
ef | 010 | |
ef1 | 011 | |
af11 | 100 | |
af12 | 101 | |
nc1/cs6 | 110 | |
nc2/cs7 | 111 | |
IEEE 802.1 | be | 000 |
be1 | 001 | |
ef | 010 | |
ef1 | 011 | |
af11 | 100 | |
af12 | 101 | |
nc1/cs6 | 110 | |
nc2/cs7 | 111 | |
IP precedence | be | 000 |
be1 | 001 | |
ef | 010 | |
ef1 | 011 | |
af11 | 100 | |
af12 | 101 | |
nc1/cs6 | 110 | |
nc2/cs7 | 111 |
Forwarding Class Queue Assignments
J Series and SRX Series devices have eight queues built into the hardware. By default, four queues are assigned to four forwarding classes. Table 237 shows the four default forwarding classes and queues that Juniper Networks classifiers assign to packets based on the CoS values in arriving packet headers. Queues 4 through 7 have no default assignments to forwarding classes. To use queues 4 through 7, you must create custom forwarding class names and assign them to the queues. For more information about how to assign queues to forwarding classes, see Configuring Class of Service.
By default, all incoming packets, except the IP protocol control packets, are assigned to the forwarding class associated with queue 0. All IP protocol control packets are assigned to the forwarding class associated with queue 3.
Table 237 displays the default assignments of forwarding classes to queues.
Table 237: Default Forwarding Class Queue Assignments
Forwarding Queue | Forwarding Class | Forwarding Class Description |
---|---|---|
Queue 0 | best-effort (BE) | The Juniper Networks device does not apply any special CoS handling to packets with 000000 in the DiffServ field, a backward compatibility feature. These packets are usually dropped under congested network conditions. |
Queue 1 | expedited-forwarding (EF) | The Juniper Networks device delivers assured bandwidth, low loss, low delay, and low delay variation (jitter) end-to-end for packets in this service class. Devices accept excess traffic in this class, but in contrast to assured forwarding, out-of-profile expedited-forwarding packets can be forwarded out of sequence or dropped. |
Queue 2 | assured-forwarding (AF) | The Juniper Networks device offers a high level of assurance that the packets are delivered as long as the packet flow from the customer stays within a certain service profile that you define. The device accepts excess traffic, but applies a random early detection (RED) drop profile to determine whether the excess packets are dropped and not forwarded. Three drop probabilities (low, medium, and high) are defined for this service class. |
Queue 3 | network-control (NC) | The Juniper Networks device delivers packets in this service class with a low priority. (These packets are not delay sensitive.) Typically, these packets represent routing protocol hello or keepalive messages. Because loss of these packets jeopardizes proper network operation, delay is preferable to discard. |
Scheduler Settings
Each forwarding class has an associated scheduler priority. Only two forwarding classes, best-effort and network-control (queue 0 and queue 3), are used in the JUNOS default scheduler configuration.
By default, the best-effort forwarding class (queue 0) receives 95 percent, and the network-control (queue 3) receives 5 percent of the bandwidth and buffer space for the output link. The default drop profile causes the buffer to fill and then discard all packets until it again has space.
The expedited-forwarding and assured-forwarding classes have no schedulers, because by default no resources are assigned to queue 1 and queue 2. However, you can manually configure resources for expedited-forwarding and assured-forwarding.
By default, each queue can exceed the assigned bandwidth if additional bandwidth is available from other queues. When a forwarding class does not fully use the allocated transmission bandwidth, the remaining bandwidth can be used by other forwarding classes if they receive a larger amount of offered load than the bandwidth allocated. If you do not want a queue to use any leftover bandwidth, you must configure it for strict allocation. For more information, see Configuring Strict High Priority for Queuing with a Configuration Editor.
The device uses the following default scheduler settings. You can modify these settings through configuration. For instructions, see Configuring Class of Service.
Default Behavior Aggregate Classifiers
Table 238 shows the forwarding class and packet loss priority (PLP) that are assigned by default to each well-known DSCP. Although several DSCPs map to the expedited-forwarding (ef) and assured-forwarding (af) classes, by default no resources are assigned to these forwarding classes. All af classes other than af1x are mapped to best-effort, because RFC 2597, Assured Forwarding PHB Group, prohibits a node from aggregating classes. Assignment to best-effort implies that the node does not support that class.
You can modify the default settings through configuration. For instructions, see Configuring Class of Service.
Table 238: Default Behavior Aggregate Classification
DSCP and DSCP IPv6 Alias | Forwarding Class | Packet Loss Priority (PLP) |
---|---|---|
ef | expedited-forwarding | low |
af11 | assured-forwarding | low |
af12 | assured-forwarding | high |
af13 | assured-forwarding | high |
af21 | best-effort | low |
af22 | best-effort | low |
af23 | best-effort | low |
af31 | best-effort | low |
af32 | best-effort | low |
af33 | best-effort | low |
af41 | best-effort | low |
af42 | best-effort | low |
af43 | best-effort | low |
be | best-effort | low |
cs1 | best-effort | low |
cs2 | best-effort | low |
cs3 | best-effort | low |
cs4 | best-effort | low |
cs5 | best-effort | low |
nc1/cs6 | network-control | low |
nc2/cs7 | network-control | low |
other | best-effort | low |
Defining BA Classifiers
You can override the default IP precedence classifier by defining a classifier and applying it to a logical interface. To define new classifiers for all code point types, include the classifiers statement at the [edit class-of-service] hierarchy level:
The map sets the forwarding class and PLP for a specific set of code-point aliases and bit patterns. The inputs of the map are code-point aliases and bit patterns. The outputs of the map are the forwarding class and the PLP.
The classifiers work as follows:
- dscp—Handles incoming IPv4 packets.
- dscp-ipv6—Handles incoming IPv6 packets. (IPv6 is not supported in this release of the software.)
- exp—Handles MPLS packets using Layer 2 headers.
- ieee-802.1—Handles Layer 2 CoS.
- inet-precedence—Handles incoming IPv4 packets. IP precedence mapping requires only the upper three bits of the DSCP field.
A classifier takes a specified bit pattern as either the literal pattern or as a defined alias and attempts to match it to the type of packet arriving on the interface. If the information in the packet’s header matches the specified pattern, the packet is sent to the appropriate queue, defined by the forwarding class associated with the classifier.
The code-point aliases and bit patterns are the input for the map. The loss priority and forwarding class are outputs of the map. In other words, the map sets the PLP and forwarding class for a given set of code-point aliases and bit patterns.
Applying a BA Classifier to a Logical Interface
You can apply the classification map to a logical interface by including the classifiers statement at the [edit class-of-service interfaces interface-name unit logical-unit-number] hierarchy level:
You can use interface wildcards for interface-name and logical-unit-number.
CoS Value Rewrites
Typically, a device rewrites CoS values in outgoing packets on the outbound interfaces of an edge device, to meet the policies of the targeted peer. After reading the current forwarding class and loss priority information associated with the packet, the transmitting device locates the chosen CoS value from a table, and writes this CoS value into the packet header.
For instructions for configuring rewrite rules, see Configuring and Applying Rewrite Rules.
Sample Behavior Aggregate Classification
Table 239 shows the device forwarding classes associated with each well-known DSCP code point and the resources assigned to their output queues for a sample DiffServ CoS implementation. This example assigns expedited forwarding to queue 1 and a subset of the assured forwarding classes (af1x) to queue 2, and distributes resources among all four forwarding classes.
Other DiffServ-based implementations are possible. For configuration information, see Configuring Class of Service.
Table 239: Sample Behavior Aggregate Classification Forwarding Classes and Queues
DSCP and DSCP IPv6 Alias | DSCP and DSCP IPv6 Bits | Forwarding Class | PLP | Queue |
---|---|---|---|---|
ef | 101110 | expedited-forwarding | low | 1 |
af11 | 001010 | assured-forwarding | low | 2 |
af12 | 001100 | assured-forwarding | high | 2 |
af13 | 001110 | assured-forwarding | high | 2 |
af21 | 010010 | best-effort | low | 0 |
af22 | 010100 | best-effort | low | 0 |
af23 | 010110 | best-effort | low | 0 |
af31 | 011010 | best-effort | low | 0 |
af32 | 011100 | best-effort | low | 0 |
af33 | 011110 | best-effort | low | 0 |
af41 | 100010 | best-effort | low | 0 |
af42 | 100100 | best-effort | low | 0 |
af43 | 100110 | best-effort | low | 0 |
be | 000000 | best-effort | low | 0 |
cs1 | 0010000 | best-effort | low | 0 |
cs2 | 010000 | best-effort | low | 0 |
cs3 | 011000 | best-effort | low | 0 |
cs4 | 100000 | best-effort | low | 0 |
cs5 | 101000 | best-effort | low | 0 |
nc1/cs6 | 110000 | network-control | low | 3 |
nc2/cs7 | 111000 | network-control | low | 3 |
other | — | best-effort | low | 0 |