- play_arrow Overview
- play_arrow Understanding How Class of Service Manages Congestion and Defines Traffic Forwarding Behavior
- Understanding How Class of Service Manages Congestion and Controls Service Levels in the Network
- How CoS Applies to Packet Flow Across a Network
- The Junos OS CoS Components Used to Manage Congestion and Control Service Levels
- Mapping CoS Component Inputs to Outputs
- Default Junos OS CoS Settings
- Packet Flow Through the Junos OS CoS Process Overview
- Configuring Basic Packet Flow Through the Junos OS CoS Process
- Example: Classifying All Traffic from a Remote Device by Configuring Fixed Interface-Based Classification
- Interface Types That Do Not Support Junos OS CoS
-
- play_arrow Configuring Class of Service
- play_arrow Assigning Service Levels with Behavior Aggregate Classifiers
- Understanding How Behavior Aggregate Classifiers Prioritize Trusted Traffic
- Default IP Precedence Classifier
- Default DSCP and DSCP IPv6 Classifiers
- Default MPLS EXP Classifier
- Default IEEE 802.1p Classifier
- Default IEEE 802.1ad Classifier
- Default Aliases for CoS Value Bit Patterns Overview
- Defining Aliases for CoS Value Bit Patterns
- Configuring Behavior Aggregate Classifiers
- Applying Behavior Aggregate Classifiers to Logical Interfaces
- Example: Configuring and Applying a Default DSCP Behavior Aggregate Classifier
- Example: Configuring Behavior Aggregate Classifiers
- Understanding DSCP Classification for VPLS
- Example: Configuring DSCP Classification for VPLS
- Configuring Class of Service for MPLS LSPs
- Applying DSCP Classifiers to MPLS Traffic
- Applying MPLS EXP Classifiers to Routing Instances
- Applying MPLS EXP Classifiers for Explicit-Null Labels
- Manage Ingress Oversubscription with Traffic Class Maps
- play_arrow Assigning Service Levels with Multifield Classifiers
- Overview of Assigning Service Levels to Packets Based on Multiple Packet Header Fields
- Configuring Multifield Classifiers
- Using Multifield Classifiers to Set Packet Loss Priority
- Example: Configuring and Applying a Firewall Filter for a Multifield Classifier
- Example: Classifying Packets Based on Their Destination Address
- Example: Configuring and Verifying a Complex Multifield Filter
- play_arrow Controlling Network Access with Traffic Policing
- Controlling Network Access Using Traffic Policing Overview
- Effect of Two-Color Policers on Shaping Rate Changes
- Configuring Policers Based on Logical Interface Bandwidth
- Example: Limiting Inbound Traffic at Your Network Border by Configuring an Ingress Single-Rate Two-Color Policer
- Example: Performing CoS at an Egress Network Boundary by Configuring an Egress Single-Rate Two-Color Policer
- Example: Limiting Inbound Traffic Within Your Network by Configuring an Ingress Single-Rate Two-Color Policer and Configuring Multifield Classifiers
- Example: Limiting Outbound Traffic Within Your Network by Configuring an Egress Single-Rate Two-Color Policer and Configuring Multifield Classifiers
- Overview of Tricolor Marking Architecture
- Enabling Tricolor Marking and Limitations of Three-Color Policers
- Configuring and Applying Tricolor Marking Policers
- Configuring Single-Rate Tricolor Marking
- Configuring Two-Rate Tricolor Marking
- Example: Configuring and Verifying Two-Rate Tricolor Marking
- Applying Firewall Filter Tricolor Marking Policers to Interfaces
- Policer Overhead to Account for Rate Shaping in the Traffic Manager
- play_arrow Defining Forwarding Behavior with Forwarding Classes
- Understanding How Forwarding Classes Assign Classes to Output Queues
- Default Forwarding Classes
- Configuring a Custom Forwarding Class for Each Queue
- Configuring Up to 16 Custom Forwarding Classes
- Classifying Packets by Egress Interface
- Forwarding Policy Options Overview
- Configuring CoS-Based Forwarding
- Example: Configuring CoS-Based Forwarding
- Example: Configuring CoS-Based Forwarding for Different Traffic Types
- Example: Configuring CoS-Based Forwarding for IPv6
- Applying Forwarding Classes to Interfaces
- Understanding Queuing and Marking of Host Outbound Traffic
- Forwarding Classes and Fabric Priority Queues
- Default Routing Engine Protocol Queue Assignments
- Assigning Forwarding Class and DSCP Value for Routing Engine-Generated Traffic
- Example: Writing Different DSCP and EXP Values in MPLS-Tagged IP Packets
- Change the Default Queuing and Marking of Host Outbound Traffic
- Example: Configure Different Queuing and Marking Defaults for Outbound Routing Engine and Distributed Protocol Handler Traffic
- Overriding the Input Classification
- play_arrow Defining Output Queue Properties with Schedulers
- How Schedulers Define Output Queue Properties
- Default Schedulers Overview
- Configuring Schedulers
- Configuring Scheduler Maps
- Applying Scheduler Maps Overview
- Applying Scheduler Maps to Physical Interfaces
- Configuring Traffic Control Profiles for Shared Scheduling and Shaping
- Configuring an Input Scheduler on an Interface
- Understanding Interface Sets
- Configuring Interface Sets
- Interface Set Caveats
- Configuring Internal Scheduler Nodes
- Example: Configuring and Applying Scheduler Maps
- play_arrow Controlling Bandwidth with Scheduler Rates
- Oversubscribing Interface Bandwidth
- Configuring Scheduler Transmission Rate
- Providing a Guaranteed Minimum Rate
- PIR-Only and CIR Mode
- Excess Rate and Excess Priority Configuration Examples
- Controlling Remaining Traffic
- Bandwidth Sharing on Nonqueuing Packet Forwarding Engines Overview
- Configuring Rate Limits on Nonqueuing Packet Forwarding Engines
- Applying Scheduler Maps and Shaping Rate to DLCIs and VLANs
- Example: Applying Scheduler Maps and Shaping Rate to DLCIs
- Example: Applying Scheduling and Shaping to VLANs
- Applying a Shaping Rate to Physical Interfaces Overview
- Configuring the Shaping Rate for Physical Interfaces
- Example: Limiting Egress Traffic on an Interface Using Port Shaping for CoS
- Configuring Input Shaping Rates for Both Physical and Logical Interfaces
- play_arrow Setting Transmission Order with Scheduler Priorities and Hierarchical Scheduling
- Priority Scheduling Overview
- Configuring Schedulers for Priority Scheduling
- Associating Schedulers with Fabric Priorities
- Hierarchical Class of Service Overview
- Hierarchical Class of Service Network Scenarios
- Understanding Hierarchical Scheduling
- Priority Propagation in Hierarchical Scheduling
- Hierarchical CoS for Metro Ethernet Environments
- Hierarchical Schedulers and Traffic Control Profiles
- Example: Building a Four-Level Hierarchy of Schedulers
- Hierarchical Class of Service for Network Slicing
- Configuring Ingress Hierarchical CoS
- play_arrow Controlling Congestion with Scheduler RED Drop Profiles, Buffers, PFC, and ECN
- RED Drop Profiles for Congestion Management
- Determining Packet Drop Behavior by Configuring Drop Profile Maps for Schedulers
- Managing Congestion by Setting Packet Loss Priority for Different Traffic Flows
- Mapping PLP to RED Drop Profiles
- Managing Congestion on the Egress Interface by Configuring the Scheduler Buffer Size
- Managing Transient Traffic Bursts by Configuring Weighted RED Buffer Occupancy
- Example: Managing Transient Traffic Bursts by Configuring Weighted RED Buffer Occupancy
- Understanding PFC Using DSCP at Layer 3 for Untagged Traffic
- Configuring DSCP-based PFC for Layer 3 Untagged Traffic
- PFC Watchdog
- CoS Explicit Congestion Notification
- Example: Configuring Static and Dynamic ECN
- play_arrow Altering Outgoing Packet Headers Using Rewrite Rules
- Rewriting Packet Headers to Ensure Forwarding Behavior
- Applying Default Rewrite Rules
- Configuring Rewrite Rules
- Configuring Rewrite Rules Based on PLP
- Applying IEEE 802.1p Rewrite Rules to Dual VLAN Tags
- Applying IEEE 802.1ad Rewrite Rules to Dual VLAN Tags
- Rewriting IEEE 802.1p Packet Headers with an MPLS EXP Value
- Setting IPv6 DSCP and MPLS EXP Values Independently
- Configuring DSCP Values for IPv6 Packets Entering the MPLS Tunnel
- Setting Ingress DSCP Bits for Multicast Traffic over Layer 3 VPNs
- Applying Rewrite Rules to Output Logical Interfaces
- Rewriting MPLS and IPv4 Packet Headers
- Rewriting the EXP Bits of All Three Labels of an Outgoing Packet
- Defining a Custom Frame Relay Loss Priority Map
- Example: Per-Node Rewriting of EXP Bits
- Example: Rewriting CoS Information at the Network Border to Enforce CoS Strategies
- Example: Remarking Diffserv Code Points to MPLS EXPs to Carry CoS Profiles Across a Service Provider’s L3VPN MPLS Network
- Example: Remarking Diffserv Code Points to 802.1P PCPs to Carry CoS Profiles Across a Service Provider’s VPLS Network
- Assigning Rewrite Rules on a Per-Customer Basis Using Policy Maps
- Host Outbound Traffic IEEE802.1p Rewrite
- play_arrow Altering Class of Service Values in Packets Exiting the Network Using IPv6 DiffServ
- Resources for CoS with DiffServ for IPv6
- System Requirements for CoS with DiffServ for IPv6
- Terms and Acronyms for CoS with DiffServ for IPv6
- Default DSCP Mappings
- Default Forwarding Classes
- Juniper Networks Default Forwarding Classes
- Roadmap for Configuring CoS with IPv6 DiffServ
- Configuring a Firewall Filter for an MF Classifier on Customer Interfaces
- Applying the Firewall Filter to Customer Interfaces
- Assigning Forwarding Classes to Output Queues
- Configuring Rewrite Rules
- DSCP IPv6 Rewrites and Forwarding Class Maps
- Applying Rewrite Rules to an Interface
- Configuring RED Drop Profiles
- Configuring BA Classifiers
- Applying a BA Classifier to an Interface
- Configuring a Scheduler
- Configuring Scheduler Maps
- Applying a Scheduler Map to an Interface
- Example: Configuring DiffServ for IPv6
-
- play_arrow Configuring Platform-Specific Functionality
- play_arrow Configuring Class of Service on ACX Series Universal Metro Routers
- CoS on ACX Series Routers Features Overview
- Understanding CoS CLI Configuration Statements on ACX Series Routers
- DSCP Propagation and Default CoS on ACX Series Routers
- Configuring CoS on ACX Series Routers
- Classifiers and Rewrite Rules at the Global, Physical, and Logical Interface Levels Overview
- Configuring Classifiers and Rewrite Rules at the Global and Physical Interface Levels
- Applying DSCP and DSCP IPv6 Classifiers on ACX Series Routers
- Schedulers Overview for ACX Series Routers
- Shared and Dedicated Buffer Memory Pools on ACX Series Routers
- CoS for PPP and MLPPP Interfaces on ACX Series Routers
- CoS for NAT Services on ACX Series Routers
- Hierarchical Class of Service in ACX Series Routers
- Storm Control on ACX Series Routers Overview
- play_arrow Configuring Class of Service on MX Series 5G Universal Routing Platforms
- Junos CoS on MX Series 5G Universal Routing Platforms Overview
- CoS Features and Limitations on MX Series Routers
- Configuring and Applying IEEE 802.1ad Classifiers
- Scheduling and Shaping in Hierarchical CoS Queues for Traffic Routed to GRE Tunnels
- Example: Performing Output Scheduling and Shaping in Hierarchical CoS Queues for Traffic Routed to GRE Tunnels
- CoS-Based Interface Counters for IPv4 or IPv6 Aggregate on Layer 2
- Enabling a Timestamp for Ingress and Egress Queue Packets
- play_arrow Configuring Class of Service on PTX Series Packet Transport Routers
- CoS Features and Limitations on PTX Series Routers
- CoS Feature Differences Between PTX Series Packet Transport Routers and T Series Routers
- Understanding Scheduling on PTX Series Routers
- Virtual Output Queues on PTX Series Packet Transport Routers
- Example: Configuring Excess Rate for PTX Series Packet Transport Routers
- Identifying the Source of RED Dropped Packets on PTX Series Routers
- Configuring Queuing and Shaping on Logical Interfaces on PTX Series Routers
- Example: Configuring Queuing and Shaping on Logical Interfaces in PTX Series Packet Transport Routers
- Example: Configuring Strict-Priority Scheduling on a PTX Series Router
- CoS Support on EVPN VXLANs
- Understanding CoS CLI Configuration Statements on PTX Series Routers
- Classification Based on Outer Header of Decapsulation Tunnel
-
- play_arrow Configuration Statements and Operational Commands
Configuring Excess Bandwidth Sharing
When using the Enhanced Queuing DPC on an MX Series router, there are circumstances when you should configure excess bandwidth sharing and minimum logical interface shaping. This section details some of the guidelines for configuring excess bandwidth sharing.
Excess Bandwidth Sharing and Minimum Logical Interface Shaping
The default excess bandwidth sharing proportional rate is 32.65 Mbps (128 Kbps x 255). In order to have better weighed fair queuing (WFQ) accuracy among queues, the shaping rate configured should be larger than the excess bandwidth sharing proportional rate. Some examples are shown in Table 1.
Shaping Rate | Configured Queue Transmit Rate | WFQ Weight | Total Weights |
---|---|---|---|
10 Mbps | (30, 40, 25, 5) | (22, 30, 20, 4) | 76 |
33 Mbps | (30, 40, 25, 5) | (76, 104, 64, 13) | 257 |
40 Mbps | (30, 40, 25, 5) | (76, 104.64, 13) | 257 |
With a 10-Mbps shaping rate, the total weights are 76. This is divided among the four queues according to the configured transmit rate. Note that when the shaping rate is larger than the excess bandwidth sharing proportional rate of 32.65 Mbps, the total weights on the logical interface are 257 and the WFQ accuracy is the same.
Selecting Excess Bandwidth Sharing Proportional Rates
A good excess bandwidth sharing proportional rate to configure is to choose the largest CIR (guaranteed rate) among all the logical interfaces (units). If the logical units have PIRs (shaping rates) only, then choose the largest PIR rate. However, this is not ideal if a single logical interface has a large weighed round-robin (WRR) rate. This can skew the distribution of traffic across the queues of the other logical interfaces. To avoid this issue, set the excess bandwidth sharing proportional rate to a lower value on the logical interfaces where the WRR rates are concentrated. This improves the bandwidth sharing accuracy among the queues on the same logical interface. However, the excess bandwidth sharing for the logical interface with the larger WRR rate is no longer proportional.
As an example, consider five logical interfaces on the same physical port, each with four queues, all with only PIRs configured and no CIRs. The WRR rate is the same as the PIR for the logical interface. The excess bandwidth is shared proportionally with a rate of 40 Mbps. The traffic control profiles for the logical interfaces are shown in Table 2.
Shaping Rate | Configured Queue Transmit Rate | WFQ Weight | Total Weights |
---|---|---|---|
(Unit 0) 10 Mbps | (95, 0, 0, 5) | (60, 0, 0, 3) | 63 |
(Unit 1) 20 Mbps | (25, 25, 25, 25) | (32, 32, 32, 32) | 128 |
(Unit 2) 40 Mbps | (40, 30, 20, 10) | (102, 77, 51, 26) | 255 |
(Unit 3) 200 Mbps | (70, 10, 10, 10) | (179, 26, 26, 26) | 255 |
(Unit 4) 2 Mbps | (25, 25, 25, 25) | (5, 5, 5, 5) | 20 |
Even though the maximum transmit rate for the queue on logical interface unit 3 is 200 Mbps, the excess bandwidth sharing proportional rate is kept at a much lower value. Within a logical interface, this method provides a more accurate distribution of weights across queues. However, the excess bandwidth is now shared equally between unit 2 and unit 3 (total weight of each = 255).
Mapping Calculated Weights to Hardware Weights
The calculated weight in a traffic control profile is mapped to hardware weight, but the hardware only supports a limited WFQ profile. The weights are rounded to the nearest hardware weight according to the values in Table 3.
Traffic Control Profile Number | Number of Traffic Control Profiles | Weights | Maximum Error |
---|---|---|---|
1–16 | 16 | 1–16 (interval of 1) | 50.00% |
17–29 | 13 | 18–42 (interval of 2) | 6.25% |
30–35 | 6 | 45–60 (interval of 3) | 1.35% |
36–43 | 8 | 64–92 (interval of 4) | 2.25% |
44–49 | 6 | 98–128 (interval of 6) | 3.06% |
50–56 | 7 | 136–184 (interval of 8) | 3.13% |
57–62 | 6 | 194–244 (interval of 10) | 2.71% |
63–63 | 1 | 255–255 (interval of 11) | 2.05% |
From the table, as an example, the calculated weight of 18.9 is mapped to a hardware weight of 18, because 18 is closer to 18.9 than 20 (an interval of 2 applies in the range 18–42).
Allocating Weight with Only Shaping Rates or Unshaped Logical Interfaces
Logical interfaces with only shaping rates (PIRs) or unshaped logical interfaces (units) are given a weight of 10. A logical interface with a small guaranteed rate (CIR) might get an overall weight less than 10. In order to allocate a higher share of the excess bandwidth to logical interfaces with a small guaranteed rate in comparison to the logical interfaces with only shaping rates configured, a minimum weight of 20 is given to the logical interfaces with guaranteed rates configured.
For example, consider a logical interface configuration with five units, as shown in Table 4.
Logical Interface (Unit) | Traffic Control Profile | WRR Percentages | Weights |
---|---|---|---|
Unit 1 | PIR 100 Mbps | 95, 0, 0, 5 | 10, 1, 1, 1 |
Unit 2 | CIR 20 Mbps | 25, 25, 25, 25 | 64, 64, 64, 64 |
Unit 3 | PIR 40 Mbps, CIR 20 Mbps | 50, 30, 15, 5 | 128, 76, 38, 13 |
Unit 4 | Unshaped | 95, 0, 0, 5 | 10, 1, 1, 1 |
Unit 5 | CIR 1 Mbps | 95, 0, 0, 5 | 10, 1, 1, 1 |
The weights for these units are calculated as follows:
Select the excess bandwidth sharing proportional rate to be the maximum CIR among all the logical interfaces: 20 Mbps (unit 2).
Unit 1 has a PIR and unit 4 is unshaped. The weight for these units is 10.
The weight for unit 1 queue 0 is 9.5 (10 x 95%), which translates to a hardware weight of 10.
The weight for unit 1 queue 1 is 0 (0 x 0%), but although the weight is zero, a weight of 1 is assigned to give minimal bandwidth to queues with zero WRR.
Unit 5 has a very small CIR (1 Mbps), and a weight of 20 is assigned to units with a small CIR.
The weight for unit 5 queue 0 is 19 (20 x 95%), which translates to a hardware weight of 18.
Unit 3 has a CIR of 20 Mbps, which is the same as the excess bandwidth sharing proportional rate, so it has a total weight of 255.
The weight of unit 3 queue 0 is 127.5 (255 x 50%), which translates to a hardware weight of 128.
Sharing Bandwidth Among Logical Interfaces
As a simple example showing how bandwidth is shared among the logical interfaces, assume that all traffic is sent on queue 0. Assume also that there is a 40-Mbps load on all of the logical interfaces. Configuration details are shown in Table 5.
On the MX960 router, bandwidth sharing across high priority and strict-high priority schedulers configured on logical interfaces might not be as expected. This is a hardware limitation.
Logical Interface (Unit) | Traffic Control Profile | WRR Percentages | Weights |
---|---|---|---|
Unit 1 | PIR 100 Mbps | 95, 0, 0, 5 | 10, 1, 1, 1 |
Unit 2 | CIR 20 Mbps | 25, 25, 25, 25 | 64, 64, 64, 64 |
Unit 3 | PIR 40 Mbps, CIR 20 Mbps | 50, 30, 15, 5 | 128, 76, 38, 13 |
Unit 4 | Unshaped | 95, 0, 0, 5 | 10, 1, 1, 1 |
When the port is shaped at 40 Mbps, because units 2 and 3 have a guaranteed rate (CIR) configured, both units 2 and 3 get 20 Mbps of shared bandwidth.
When the port is shaped at 100 Mbps, because units 2 and 3 have a guaranteed rate (CIR) configured, each of them can transmit 20 Mbps. On units 1, 2, 3, and 4, the 60 Mbps of excess bandwidth is shaped according to the values shown in Table 6.
Logical Interface (Unit) | Calculation | Bandwidth |
---|---|---|
Unit 1 | 10 / (10+64+128+10) x 60 Mbps | 2.83 Mbps |
Unit 2 | 64 / (10+64+128+10) x 60 Mbps | 18.11 Mbps |
Unit 3 | 128 / (10+64+128+10) x 60 Mbps | 36.22 Mbps |
Unit 4 | 10 (10+64+128+10) x 60 Mbps | 2.83 Mbps |
However, unit 3 only has 20 Mbps extra (PIR and CIR) configured. This means that the leftover bandwidth of 16.22 Mbps (36.22 Mbps – 20 Mbps) is shared among units 1, 2, and 4. This is shown in Table 7.
Logical Interface (Unit) | Calculation | Bandwidth |
---|---|---|
Unit 1 | 10 / (10+64+128+10) x 16.22 Mbps | 1.93 Mbps |
Unit 2 | 64 / (10+64+128+10) x 16.22 Mbps | 12.36 Mbps |
Unit 4 | 10 (10+64+128+10) x 16.22 Mbps | 1.93 Mbps |
Finally, Table 8 shows the resulting allocation of bandwidth among the logical interfaces when the port is configured with a 100-Mbps shaping rate.
Logical Interface (Unit) | Calculation | Bandwidth |
---|---|---|
Unit 1 | 2.83 Mbps + 1.93 Mbps | 4.76 Mbps |
Unit 2 | 20 Mbps + 18.11 Mbps + 12.36 Mbps | 50.47 Mbps |
Unit 3 | 20 Mbps + 20 Mbps | 40 Mbps |
Unit 4 | 2.83 Mbps + 1.93 Mbps | 4.76 Mbps |