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:
Table 177 shows the default mappings between the bit values and standard aliases.
Table 177: Well-Known CoS Aliases and Default CoS Values
J-series Services Routers and SRX-series services gateways have eight queues built into the hardware. By default, four queues are assigned to four forwarding classes. Table 178 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 178 displays the default assignments of forwarding classes to queues.
Table 178: Default Forwarding Class Queue Assignments
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.
- [edit class-of-service]
- schedulers {
-
- network-control {
- transmit-rate percent 5;
- buffer-size percent 5;
- priority low;
- drop-profile-map loss-priority any protocol any drop-profile
terminal;
- }
-
- best-effort {
- transmit-rate percent 95;
- buffer-size percent 95;
- priority low;
- drop-profile-map loss-priority any protocol any drop-profile
terminal;
- }
- }
- drop-profiles {
-
- terminal {
-
-
- fill-level 100 drop-probability 100;
- }
- }
Table 179 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 179: Default Behavior Aggregate Classification
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:
- [edit class-of-service]
- classifiers {
-
- (dscp | dscp-ipv6 | exp | ieee-802.1 | inet-precedence) classifier-name {
- import [classifier-name | default];
-
- forwarding-class class-name {
-
- loss-priority level {
- code-points [ aliases ] [ 6-bit-patterns ];
- }
- }
- }
- }
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:
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.
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:
- [edit class-of-service interfaces interface-name interface-name unit logical-unit-number]
- classifiers (dscp | dscp-ipv6 | exp | ieee-802.1 | inet-precedence)
(classifier-name | default);
You can use interface wildcards for interface-name and logical-unit-number.
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.
Table 180 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 180: Sample Behavior Aggregate Classification Forwarding Classes and Queues