- 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 Line Card-Specific and Interface-Specific Functionality
- play_arrow Feature Support of Line Cards and Interfaces
- play_arrow Configuring Class of Service for Tunnels
- play_arrow Configuring Class of Service on Services PICs
- CoS on Services PICs Overview
- Configuring CoS Rules on Services PICs
- Configuring CoS Rule Sets on Services PICs
- Example: Configuring CoS Rules on Services PICs
- Packet Rewriting on Services Interfaces
- Multiservices PIC ToS Translation
- Fragmentation by Forwarding Class Overview
- Configuring Fragmentation by Forwarding Class
- Configuring Drop Timeout Interval for Fragmentation by Forwarding Class
- Example: Configuring Fragmentation by Forwarding Class
- Allocating Excess Bandwidth Among Frame Relay DLCIs on Multiservices PICs
- Configuring Rate Limiting and Sharing of Excess Bandwidth on Multiservices PICs
- play_arrow Configuring Class of Service on IQ and Enhanced IQ (IQE) PICs
- CoS on Enhanced IQ PICs Overview
- Calculation of Expected Traffic on IQE PIC Queues
- Configuring the Junos OS to Support Eight Queues on IQ Interfaces for T Series and M320 Routers
- BA Classifiers and ToS Translation Tables
- Configuring ToS Translation Tables
- Configuring Hierarchical Layer 2 Policers on IQE PICs
- Configuring Excess Bandwidth Sharing on IQE PICs
- Configuring Rate-Limiting Policers for High Priority Low-Latency Queues on IQE PICs
- Applying Scheduler Maps and Shaping Rate to Physical Interfaces on IQ PICs
- Applying Scheduler Maps to Chassis-Level Queues
- play_arrow Configuring Class of Service on Ethernet IQ2 and Enhanced IQ2 PICs
- CoS on Enhanced IQ2 PICs Overview
- CoS Features and Limitations on IQ2 and IQ2E PICs (M Series and T Series)
- Differences Between Gigabit Ethernet IQ and Gigabit Ethernet IQ2 PICs
- Shaping Granularity Values for Enhanced Queuing Hardware
- Ethernet IQ2 PIC RTT Delay Buffer Values
- Configuring BA Classifiers for Bridged Ethernet
- Setting the Number of Egress Queues on IQ2 and Enhanced IQ2 PICs
- Configuring the Number of Schedulers per Port for Ethernet IQ2 PICs
- Applying Scheduler Maps to Chassis-Level Queues
- CoS for L2TP Tunnels on Ethernet Interface Overview
- Configuring CoS for L2TP Tunnels on Ethernet Interfaces
- Configuring LNS CoS for Link Redundancy
- Example: Configuring L2TP LNS CoS Support for Link Redundancy
- Configuring Shaping on 10-Gigabit Ethernet IQ2 PICs
- Configuring Per-Unit Scheduling for GRE Tunnels Using IQ2 and IQ2E PICs
- Understanding Burst Size Configuration on IQ2 and IQ2E Interfaces
- Configuring Burst Size for Shapers on IQ2 and IQ2E Interfaces
- Configuring a CIR and a PIR on Ethernet IQ2 Interfaces
- Example: Configuring Shared Resources on Ethernet IQ2 Interfaces
- Configuring and Applying IEEE 802.1ad Classifiers
- Configuring Rate Limits to Protect Lower Queues on IQ2 and Enhanced IQ2 PICs
- Simple Filters Overview
- Configuring a Simple Filter
- play_arrow Configuring Class of Service on 10-Gigabit Ethernet LAN/WAN PICs with SFP+
- CoS on 10-Gigabit Ethernet LAN/WAN PIC with SFP+ Overview
- BA and Fixed Classification on 10-Gigabit Ethernet LAN/WAN PIC with SFP+ Overview
- DSCP Rewrite for the 10-Gigabit Ethernet LAN/WAN PIC with SFP+
- Configuring DSCP Rewrite for the 10-Gigabit Ethernet LAN/WAN PIC
- Queuing on 10-Gigabit Ethernet LAN/WAN PICs Properties
- Mapping Forwarding Classes to CoS Queues on 10-Gigabit Ethernet LAN/WAN PICs
- Scheduling and Shaping on 10-Gigabit Ethernet LAN/WAN PICs Overview
- Example: Configuring Shaping Overhead on 10-Gigabit Ethernet LAN/WAN PICs
- play_arrow Configuring Class of Service on Enhanced Queuing DPCs
- Enhanced Queuing DPC CoS Properties
- Configuring Rate Limits on Enhanced Queuing DPCs
- Configuring WRED on Enhanced Queuing DPCs
- Configuring MDRR on Enhanced Queuing DPCs
- Configuring Excess Bandwidth Sharing
- Configuring Customer VLAN (Level 3) Shaping on Enhanced Queuing DPCs
- Simple Filters Overview
- Configuring Simple Filters on Enhanced Queuing DPCs
- Configuring a Simple Filter
- play_arrow Configuring Class of Service on MICs, MPCs, and MLCs
- CoS Features and Limitations on MIC and MPC Interfaces
- Dedicated Queue Scaling for CoS Configurations on MIC and MPC Interfaces Overview
- Verifying the Number of Dedicated Queues Configured on MIC and MPC Interfaces
- Scaling of Per-VLAN Queuing on Non-Queuing MPCs
- Increasing Available Bandwidth on Rich-Queuing MPCs by Bypassing the Queuing Chip
- Flexible Queuing Mode
- Multifield Classifier for Ingress Queuing on MX Series Routers with MPC
- Example: Configuring a Filter for Use as an Ingress Queuing Filter
- Ingress Queuing Filter with Policing Functionality
- Ingress Rate Limiting on MX Series Routers with MPCs
- Rate Shaping on MIC and MPC Interfaces
- Per-Priority Shaping on MIC and MPC Interfaces Overview
- Example: Configuring Per-Priority Shaping on MIC and MPC Interfaces
- Configuring Static Shaping Parameters to Account for Overhead in Downstream Traffic Rates
- Example: Configuring Static Shaping Parameters to Account for Overhead in Downstream Traffic Rates
- Traffic Burst Management on MIC and MPC Interfaces Overview
- Understanding Hierarchical Scheduling for MIC and MPC Interfaces
- Configuring Ingress Hierarchical CoS on MIC and MPC Interfaces
- Configuring a CoS Scheduling Policy on Logical Tunnel Interfaces
- Per-Unit Scheduling and Hierarchical Scheduling for MPC Interfaces
- Managing Dedicated and Remaining Queues for Static CoS Configurations on MIC and MPC Interfaces
- Excess Bandwidth Distribution on MIC and MPC Interfaces Overview
- Bandwidth Management for Downstream Traffic in Edge Networks Overview
- Scheduler Delay Buffering on MIC and MPC Interfaces
- Managing Excess Bandwidth Distribution on Static Interfaces on MICs and MPCs
- Drop Profiles on MIC and MPC Interfaces
- Intelligent Oversubscription on MIC and MPC Interfaces Overview
- Jitter Reduction in Hierarchical CoS Queues
- Example: Reducing Jitter in Hierarchical CoS Queues
- CoS on Ethernet Pseudowires in Universal Edge Networks Overview
- CoS Scheduling Policy on Logical Tunnel Interfaces Overview
- Configuring CoS on an Ethernet Pseudowire for Multiservice Edge Networks
- CoS for L2TP LNS Inline Services Overview
- Configuring Static CoS for an L2TP LNS Inline Service
- CoS on Circuit Emulation ATM MICs Overview
- Configuring CoS on Circuit Emulation ATM MICs
- Understanding IEEE 802.1p Inheritance push and swap from a Transparent Tag
- Configuring IEEE 802.1p Inheritance push and swap from the Transparent Tag
- CoS on Application Services Modular Line Card Overview
- play_arrow Configuring Class of Service on Aggregated, Channelized, and Gigabit Ethernet Interfaces
- Limitations on CoS for Aggregated Interfaces
- Policer Support for Aggregated Ethernet Interfaces Overview
- Understanding Schedulers on Aggregated Interfaces
- Examples: Configuring CoS on Aggregated Interfaces
- Hierarchical Schedulers on Aggregated Ethernet Interfaces Overview
- Configuring Hierarchical Schedulers on Aggregated Ethernet Interfaces
- Example: Configuring Scheduling Modes on Aggregated Interfaces
- Enabling VLAN Shaping and Scheduling on Aggregated Interfaces
- Class of Service on demux Interfaces
- Example: Configuring Per-Unit Schedulers for Channelized Interfaces
- Applying Layer 2 Policers to Gigabit Ethernet Interfaces
-
- play_arrow Configuration Statements and Operational Commands
ON THIS PAGE
Example: Configuring Strict-Priority Scheduling on a PTX Series Router
This example shows how to configure strict-priority scheduling for a physical interface on a PTX Series router.
Requirements
This example uses the following hardware and software components:
One PTX Series Packet Transport Router
One or more routers that provide input packets and receive output packets
Junos OS Release 13.3 or later
Overview
This example illustrates how you configure strict-priority scheduling for a physical interface on a PTX Series router to perform processing of queues in strict-priority order. Queues in the guaranteed region with the same priority are processed in round-robin fashion. Queues in the excess region are processed based on the WRR algorithm.
When you configure strict-priority scheduling, use the following guidelines:
The configured
transmit-rate
does not affect the queue drain rate because packets are processed in order of queue priority.You can configure only one queue with
strict-high
priority at the[edit class-of-service schedulers scheduler-name priority]
hierarchy level.You cannot configure both
transmit-rate exact
andstrict-high
priority at the[edit class-of-service schedulers scheduler-name]
hierarchy level.You cannot configure
scheduler-map
orshaping-rate
on an interface where you configure an output traffic control profile.You cannot configure
transmit-rate
on a queue withlow
priority or the commit will fail.
If a strict-high priority queue is constantly loaded to 100 percent of traffic capacity, other queues are starved. Queue starvation can cause the interface hardware to generate critical interrupts.
Topology
In Figure 1, the PTX Series router has inputs from Router A, et-1/1/15 and et-1/1/12, and an output to Router B, et-7/1/12. This example configures classification on the two ingress Interfaces and configures strict-priority scheduling on the egress interface.

Configuration
Configuring Strict-Priority Scheduling
CLI Quick Configuration
To quickly configure this example, copy the
following commands, paste them into a text file, remove any line breaks,
change any details necessary to match your network configuration,
and then copy and paste the commands into the CLI at the [edit]
hierarchy level.
set class-of-service classifiers dscp cls forwarding-class be loss-priority high code-points 000000 set class-of-service classifiers dscp cls forwarding-class ef loss-priority medium-high code-points 000001 set class-of-service classifiers dscp cls forwarding-class af loss-priority medium-low code-points 000010 set class-of-service classifiers dscp cls forwarding-class nc loss-priority low code-points 000011 set class-of-service classifiers dscp cls forwarding-class af11 loss-priority low code-points 000100 set class-of-service classifiers dscp cls forwarding-class af12 loss-priority low code-points 000101 set class-of-service classifiers dscp cls forwarding-class af13 loss-priority low code-points 000110 set class-of-service classifiers dscp cls forwarding-class nc2 loss-priority low code-points 000111 set class-of-service forwarding-classes queue 0 be set class-of-service forwarding-classes queue 1 ef set class-of-service forwarding-classes queue 2 af set class-of-service forwarding-classes queue 3 nc set class-of-service forwarding-classes queue 4 af11 set class-of-service forwarding-classes queue 5 af12 set class-of-service forwarding-classes queue 6 af13 set class-of-service forwarding-classes queue 7 nc2 set class-of-service traffic-control-profiles tcp1 scheduler-map sch0 set class-of-service traffic-control-profiles tcp1 strict-priority-scheduler set class-of-service interfaces et-1/1/12 unit 0 classifiers dscp cls set class-of-service interfaces et-1/1/15 unit 0 classifiers dscp cls set class-of-service interfaces et-7/1/12 output-traffic-control-profile tcp1 set class-of-service scheduler-maps sch0 forwarding-class be scheduler be_sch set class-of-service scheduler-maps sch0 forwarding-class ef scheduler ef_sch set class-of-service scheduler-maps sch0 forwarding-class af scheduler af_sch set class-of-service scheduler-maps sch0 forwarding-class nc scheduler nc_sch set class-of-service scheduler-maps sch0 forwarding-class af11 scheduler af11_sch set class-of-service scheduler-maps sch0 forwarding-class af12 scheduler af12_sch set class-of-service scheduler-maps sch0 forwarding-class af13 scheduler af13_sch set class-of-service scheduler-maps sch0 forwarding-class nc2 scheduler nc2_sch set class-of-service schedulers be_sch transmit-rate percent 60 set class-of-service schedulers be_sch priority high set class-of-service schedulers ef_sch transmit-rate percent 5 set class-of-service schedulers ef_sch priority medium-high set class-of-service schedulers af_sch transmit-rate percent 5 set class-of-service schedulers af_sch priority high set class-of-service schedulers nc_sch transmit-rate percent 5 set class-of-service schedulers nc_sch priority strict-high set class-of-service schedulers af11_sch transmit-rate percent 5 set class-of-service schedulers af11_sch priority high set class-of-service schedulers af12_sch transmit-rate percent 5 set class-of-service schedulers af12_sch priority medium-high set class-of-service schedulers af13_sch transmit-rate percent 5 set class-of-service schedulers af13_sch priority medium-low set class-of-service schedulers nc2_sch priority low
Step-by-Step Procedure
In this example, eight schedulers are configured based on eight DSCP classifier configurations. Each associated scheduler is assigned a priority and transmit rate, although the transmit rate is ignored by the strict-priority scheduler. The scheduler map sch0 is configured with the mapping of forwarding classes to schedulers. Within the traffic control profile tcp1, the scheduler map and the strict-priority scheduler feature are configured. Two input interfaces on the PTX Series router, et-1/1/12 and et-1/1/15, are configured with the DSCP classifiers. The output traffic control profile on et-7/1/12 is configured with the traffic control profile tcp1.
The following example requires you to navigate various levels in the configuration hierarchy. For instructions on how to do that, see Using the CLI Editor in Configuration Mode in the CLI User Guide.
To configure strict-priority scheduling:
Configure the DSCP forwarding classes.
content_copy zoom_out_map[edit class-of-service dscp cls] user@host# set forwarding-class be loss-priority high code-points 000000 user@host# set forwarding-class ef loss-priority medium-high code-points 000001 user@host# set forwarding-class af loss-priority medium-low code-points 000010 user@host# set forwarding-class nc loss-priority low code-points 000011 user@host# set forwarding-class af11 loss-priority low code-points 000100 user@host# set forwarding-class af12 loss-priority low code-points 000101 user@host# set forwarding-class af13 loss-priority low code-points 000110 user@host# set forwarding-class nc2 loss-priority low code-points 000111
Configure the mapping of queues to forwarding classes.
content_copy zoom_out_map[edit class-of-service forwarding-classes] user@host# set queue 0 be user@host# set queue 1 ef user@host# set queue 2 af user@host# set queue 3 nc user@host# set queue 4 af11 user@host# set queue 5 af12 user@host# set queue 6 af13 user@host# set queue 7 nc2
Configure the transmit rate and priority for each scheduler.
Although you can configure a transmit rate, the value that you configure is overridden by the strict-priority scheduler.
content_copy zoom_out_map[edit class-of-service] user@host# set schedulers be_sch transmit-rate percent 60 user@host# set schedulers be_sch priority high user@host# set schedulers ef_sch transmit-rate percent 5 user@host# set schedulers ef_sch priority medium-high user@host# set schedulers af_sch transmit-rate percent 5 user@host# set schedulers af_sch priority high user@host# set schedulers nc_sch transmit-rate percent 5 user@host# set schedulers nc_sch priority strict-high user@host# set schedulers af11_sch transmit-rate percent 5 user@host# set schedulers af11_sch priority high user@host# set schedulers af12_sch transmit-rate percent 5 user@host# set schedulers af12_sch priority medium-high user@host# set schedulers af13_sch transmit-rate percent 5 user@host# set schedulers af13_sch priority medium-low user@host# set schedulers nc2_sch priority low
Configure the scheduler map with the mapping of forwarding classes to schedulers.
content_copy zoom_out_map[edit class-of-service scheduler-maps sch0] user@host# set forwarding-class be scheduler be_sch user@host# set forwarding-class ef scheduler ef_sch user@host# set forwarding-class af scheduler af_sch user@host# set forwarding-class nc scheduler nc_sch user@host# set forwarding-class af11 scheduler af11_sch user@host# set forwarding-class af12 scheduler af12_sch user@host# set forwarding-class af13 scheduler af13_sch user@host# set forwarding-class nc2 scheduler nc2_sch
Configure the traffic control profile to do strict-priority scheduling and define the scheduler map to use.
content_copy zoom_out_map[edit class-of-service traffic-control-profiles tcp1] user@host# set scheduler-map sch0 user@host# set strict-priority-scheduler
Apply the classifiers to the input interfaces, and the traffic control profile to the output interface.
content_copy zoom_out_map[edit class-of-service interfaces] user@host# set et-1/1/12 unit 0 classifiers dscp cls user@host# set et-1/1/15 unit 0 classifiers dscp cls user@host# set et-7/1/12 output-traffic-control-profile tcp1
Results
From configuration mode, confirm your configuration
by entering the show class-of-service
command. If the output
does not display the intended configuration, repeat the configuration
instructions in this example to correct it.
[edit] user@host# show class-of-service forwarding-classes { queue 0 be; queue 1 ef; queue 2 af; queue 3 nc; queue 4 af11; queue 5 af12; queue 6 af13; queue 7 nc2; } interfaces { et-1/1/12 { unit 0 { classifiers { dscp cls; } } } et-1/1/15 { unit 0 { classifiers { dscp cls; } } } et-7/1/12 { output-traffic-control-profile tcp1; } } scheduler-maps { sch0 { forwarding-class be scheduler be_sch; forwarding-class ef scheduler ef_sch; forwarding-class af scheduler af_sch; forwarding-class nc scheduler nc_sch; forwarding-class af11 scheduler af11_sch; forwarding-class af12 scheduler af12_sch; forwarding-class af13 scheduler af13_sch; forwarding-class nc2 scheduler nc2_sch; } } schedulers { be_sch { transmit-rate percent 60; priority high; } ef_sch { transmit-rate percent 5; priority medium-high; } af_sch { transmit-rate percent 5; priority high; } nc_sch { transmit-rate percent 5; priority strict-high; } af11_sch { transmit-rate percent 5; priority high; } af12_sch { transmit-rate percent 5; priority medium-high; } af13_sch { transmit-rate percent 5; priority medium-low; } nc2_sch { priority low; } } traffic-control-profiles { tcp1 { scheduler-map sch0; strict-priority-scheduler; } }
Verification
Verifying Strict-Priority Scheduling
Purpose
Verify that the strict-priority scheduling configuration is producing the results you expect.
Action
From operational mode, enter the show interfaces
queue interface-name interface-name
command
and select the output physical interface to verify.
user@host> show interfaces queue interface-name et-7/1/12 Physical interface: et-7/1/12, Enabled, Physical link is Up Interface index: 231, SNMP ifIndex: 612 Forwarding classes: 16 supported, 8 in use Egress queues: 8 supported, 8 in use Queue: 0, Forwarding classes: be Queued: Packets : 394488 131507 pps Bytes : 591732000 1578084848 bps Transmitted: Packets : 394488 131507 pps Bytes : 591732000 1578084848 bps Tail-dropped packets : 0 0 pps RL-dropped packets : 0 0 pps RL-dropped bytes : 0 0 bps RED-dropped packets : 0 0 pps RED-dropped bytes : 0 0 bps Queue: 1, Forwarding classes: ef Queued: Packets : 234498 82115 pps Bytes : 352963584 988886784 bps Transmitted: Packets : 82425 27551 pps Bytes : 123637500 330618176 bps Tail-dropped packets : 0 0 pps RL-dropped packets : 0 0 pps RL-dropped bytes : 0 0 bps RED-dropped packets : 152073 54564 pps RED-dropped bytes : 229326084 658268608 bps Queue: 2, Forwarding classes: af Queued: Packets : 345175 115068 pps Bytes : 517762500 1380824240 bps Transmitted: Packets : 345175 115068 pps Bytes : 517762500 1380824240 bps Tail-dropped packets : 0 0 pps RL-dropped packets : 0 0 pps RL-dropped bytes : 0 0 bps RED-dropped packets : 0 0 pps RED-dropped bytes : 0 0 bps Queue: 3, Forwarding classes: nc Queued: Packets : 986224 328769 pps Bytes : 1479336000 3945236360 bps Transmitted: Packets : 986224 328769 pps Bytes : 1479336000 3945236360 bps Tail-dropped packets : 0 0 pps RL-dropped packets : 0 0 pps RL-dropped bytes : 0 0 bps RED-dropped packets : 0 0 pps RED-dropped bytes : 0 0 bps Queue: 4, Forwarding classes: af11 Queued: Packets : 493110 164383 pps Bytes : 739665000 1972606056 bps Transmitted: Packets : 493110 164383 pps Bytes : 739665000 1972606056 bps Tail-dropped packets : 0 0 pps RL-dropped packets : 0 0 pps RL-dropped bytes : 0 0 bps RED-dropped packets : 0 0 pps RED-dropped bytes : 0 0 bps Queue: 5, Forwarding classes: af12 Queued: Packets : 461830 164375 pps Bytes : 695777416 1981272728 bps Transmitted: Packets : 82778 27543 pps Bytes : 124167000 330521208 bps Tail-dropped packets : 0 0 pps RL-dropped packets : 0 0 pps RL-dropped bytes : 0 0 bps RED-dropped packets : 379052 136832 pps RED-dropped bytes : 571610416 1650751520 bps Queue: 6, Forwarding classes: af13 Queued: Packets : 462258 164556 pps Bytes : 696421280 1983445256 bps Transmitted: Packets : 82973 27637 pps Bytes : 124459500 331648480 bps Tail-dropped packets : 0 0 pps RL-dropped packets : 0 0 pps RL-dropped bytes : 0 0 bps RED-dropped packets : 379285 136919 pps RED-dropped bytes : 571961780 1651796776 bps Queue: 7, Forwarding classes: nc2 Queued: Packets : 227750 82215 pps Bytes : 343447000 991843712 bps Transmitted: Packets : 0 0 pps Bytes : 0 0 bps Tail-dropped packets : 0 0 pps RL-dropped packets : 0 0 pps RL-dropped bytes : 0 0 bps RED-dropped packets : 227750 82215 pps RED-dropped bytes : 343447000 991843712 bps
Meaning
The show
command output lists the traffic
by queue and forwarding class names. The Bytes field under the Transmitted
field for each queue shows the actual bytes transmitted.
From the sample output, you can see that the strict-high queue gets the highest priority and transmits without drops. The high-priority queues are then transmitted. The medium-high and medium-low priority queues are processed in a round-robin fashion. The low-priority queue is starved.
Keep in mind the following conditions that apply to strict-priority scheduling:
If the traffic on the output interface is undersubscribed, no queue should show dropped traffic.
The strict-high queue is processed first, followed by the high-priority queues (in a round-robin fashion), and finally all remaining queues in the guaranteed region (in a round-robin fashion).
If the ingress traffic exceeds the capacity of the output interface, the queues are processed in strict-priority order.
Queues in the excess region are processed based on the WRR algorithm.