- 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 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 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 and Verifying Two-Rate Tricolor Marking
This topic provides several examples of how you can configure and verify two-rate tricolor marking policers and includes the following sections:
Requirements
No special configuration beyond device initialization is required before configuring this example.
Overview
This example configures a two-rate tricolor marking policer on an input Gigabit Ethernet interface and shows commands to verify its operation.
Traffic enters the Gigabit Ethernet interface and exits a SONET/SDH OC12 interface. Oversubscription occurs when you send line-rate traffic from the Gigabit Ethernet interface out the OC12 interface.
Configuration
To configure two-rate tricolor marking policers, perform these tasks:
- CLI Quick Configuration
- Example: Applying a Policer to an Input Interface
- Example: Applying Profiles to an Output Interface
- Example: Marking Packets with Medium-Low Loss Priority
- Results
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.
Applying a Policer to an Input Interface
set interfaces ge-1/2/1 unit 0 family inet filter input trtcm-filter set firewall three-color-policer trtcm1 two-rate color-aware set firewall three-color-policer trtcm1 two-rate committed-information-rate 100m set firewall three-color-policer trtcm1 two-rate committed-burst-size 65536 set firewall three-color-policer trtcm1 two-rate peak-information-rate 200m set firewall three-color-policer trtcm1 two-rate peak-burst-size 131072 set firewall filter trtcm-filter term one then three-color-policer two-rate trtcm1
Applying Profiles to an Output Interface
set class-of-service drop-profiles low-tcm fill-level 80 drop-probability 100 set class-of-service drop-profiles med-tcm fill-level 40 drop-probability 100 set class-of-service drop-profiles high-tcm fill-level 10 drop-probability 100 set class-of-service tri-color set class-of-service interfaces so-1/1/0 scheduler-map tcm-sched set class-of-service scheduler-maps tcm-sched forwarding-class queue-0 scheduler q0-sched set class-of-service scheduler-maps tcm-sched forwarding-class queue-3 scheduler q3-sched set class-of-service schedulers q0-sched transmit-rate percent 50 set class-of-service schedulers q0-sched buffer-size percent 50 set class-of-service schedulers q0-sched drop-profile-map loss-priority low protocol any drop-profile low-tcm set class-of-service schedulers q0-sched drop-profile-map loss-priority medium-high protocol any drop-profile med-tcm set class-of-service schedulers q0-sched drop-profile-map loss-priority high protocol any drop-profile high-tcm set class-of-service schedulers q3-sched transmit-rate percent 50 set class-of-service schedulers q3-sched buffer-size percent 50
Marking Packets with Medium-Low Loss Priority
set interfaces ge-1/2/1 unit 0 family inet filter input 4PLP set interfaces ge-1/2/1 unit 0 family inet policer input 4PLP set interfaces ge-1/2/1 unit 0 family inet address 10.45.10.2/30 set firewall three-color-policer trTCM two-rate color-blind set firewall three-color-policer trTCM two-rate committed-information-rate 400m set firewall three-color-policer trTCM two-rate committed-burst-size 100m set firewall three-color-policer trTCM two-rate peak-information-rate 1g set firewall three-color-policer trTCM two-rate peak-burst-size 500m set firewall policer 4PLP if-exceeding bandwidth-limit 40k set firewall policer 4PLP if-exceeding burst-size-limit 4k set firewall policer 4PLP then loss-priority medium-low set firewall family inet filter 4PLP term 0 from precedence 1 set firewall family inet filter 4PLP term 0 then loss-priority medium-low set firewall family inet filter filter_trTCM term default then three-color-policer two-rate trTCM
Example: Applying a Policer to an Input Interface
Step-by-Step Procedure
In the following example, the tricolor marking and policer are applied on the ingress Gigabit Ethernet interface. Incoming packets are metered. Packets that do not exceed the CIR are marked with low loss priority. Packets that exceed the CIR, but do not exceed the PIR, are marked with medium-high loss priority. Packets that exceed the PIR are marked with high loss priority.
The following example requires that you navigate various levels in the configuration hierarchy. For information about navigating the CLI, see Using the CLI Editor in Configuration Mode in the Junos OS CLI User Guide.
Configure the three-color policer.
content_copy zoom_out_map[edit] user@host# edit firewall three-color-policer trtcm1 two-rate user@host# set committed-information-rate 100m user@host# set committed-burst-size 65536 user@host# set peak-information-rate 200m user@host# set peak-burst-size 131072
Configure the policer in a firewall filter.
content_copy zoom_out_map[edit] user@host# set firewall filter trtcm-filter term one then three-color-policer two-rate trtcm1
Apply the firewall filter (policer) as an input filter on the logical interface.
content_copy zoom_out_map[edit] user@host# edit interfaces ge-1/2/1 unit 0 family inet user@host# set filter input trtcm-filter
Confirm the configuration.
content_copy zoom_out_map[edit] user@host# show
content_copy zoom_out_mapinterfaces { ge-1/2/1 { unit 0 { family inet { filter { input trtcm-filter; } } } } firewall { three-color-policer trtcm1 { two-rate { color-aware; committed-information-rate 100m; committed-burst-size 65536; peak-information-rate 200m; peak-burst-size 131072; } } filter trtcm-filter { term one { then { three-color-policer { two-rate trtcm1; } } } } }
Save the configuration.
content_copy zoom_out_map[edit] user@host# commit
Example: Applying Profiles to an Output Interface
Step-by-Step Procedure
In the following example, transmission scheduling and weighted random early detection (WRED) profiles are applied on the output OC12 interface. The software drops traffic in the low, medium-high, and high drop priorities proportionally to the configured drop profiles.
Define the drop profile.
content_copy zoom_out_map[edit] user@host# edit class-of-service user@host# set drop-profiles low-tcm fill-level 80 drop-probability 100 user@host# set drop-profiles med-tcm fill-level 40 drop-probability 100 user@host# set drop-profiles high-tcm fill-level 10 drop-probability 100 user@host# set tri-color
Specify the scheduler name and parameter values.
content_copy zoom_out_map[edit class-of-service] user@host# set schedulers q0-sched transmit-rate percent 50 user@host# set schedulers q0-sched buffer-size percent 50 user@host# set schedulers q0-sched drop-profile-map loss-priority low protocol any drop-profile low-tcm user@host# set schedulers q0-sched drop-profile-map loss-priority medium-high protocol any drop-profile med-tcm user@host# set schedulers q0-sched drop-profile-map loss-priority high protocol any drop-profile high-tcm user@host# set schedulers q3-sched transmit-rate percent 50 user@host# set schedulers q3-sched buffer-size percent 50
Specify a scheduler map name and associate it with the scheduler configuration and forwarding class.
content_copy zoom_out_map[edit class-of-service] user@host# set scheduler-maps tcm-sched forwarding-class queue-0 scheduler q0-sched user@host# set scheduler-maps tcm-sched forwarding-class queue-3 scheduler q3-sched
Apply the scheduler map to the interface.
content_copy zoom_out_map[edit class-of-service] user@host# set interfaces so-1/1/0 scheduler-map tcm-sched
Verify the configuration.
content_copy zoom_out_map[edit class-of-service]
user@host show
drop-profiles { low-tcm { fill-level 80 drop-probability 100; } med-tcm { fill-level 40 drop-probability 100; } high-tcm { fill-level 10 drop-probability 100; } } tri-color; interfaces { so-1/1/0 { scheduler-map tcm-sched; } scheduler-maps { tcm-sched { forwarding-class queue-0 scheduler q0-sched; forwarding-class queue-3 scheduler q3-sched; } } schedulers { q0-sched { transmit-rate percent 50; buffer-size percent 50; drop-profile-map loss-priority low protocol any drop-profile low-tcm; drop-profile-map loss-priority medium-high protocol any drop-profile med-tcm; drop-profile-map loss-priority high protocol any drop-profile high-tcm; } q3-sched { transmit-rate percent 50; buffer-size percent 50; } }Save the configuration.
content_copy zoom_out_map[edit] user@host# commit
Example: Marking Packets with Medium-Low Loss Priority
Step-by-Step Procedure
In the following example, the 4PLP filter and policer causes certain packets to be marked with medium-low loss priority.
The following example requires that you navigate various levels in the configuration hierarchy. For information about navigating the CLI, see Using the CLI Editor in Configuration Mode in the Junos OS CLI User Guide.
Configure the firewall filter.
Define the three-color policer.
content_copy zoom_out_map[edit] user@host# edit firewall three-color-policer trTCM two-rate user@host# set color-blind user@host# set committed-information-rate 400m user@host# set committed-burst-size 100m user@host# set peak-information-rate 1g user@host# set peak-burst-size 500m
Configure policer rate limits and actions.
content_copy zoom_out_map[edit] user@host# edit firewall policer 4PLP user@host# set if-exceeding bandwidth-limit 40k user@host# set if-exceeding burst-size-limit 4k user@host# set then loss-priority medium-low
Configure the IPv4 firewall filter.
content_copy zoom_out_map[edit] user@host# edit firewall family inet filter 4PLP term 0 user@host# set from precedence 1 user@host# set then loss-priority medium-low
Define the terms of the IPv4 firewall filter.
content_copy zoom_out_map[edit] user@host# edit firewall family inet filter filter_trTCM user@host# set term default then three-color-policer two-rate trTCM
Apply the filter to the interface.
content_copy zoom_out_map[edit] user@host# edit interfaces ge-1/2/1 unit 0 family inet user@host# set filter input 4PLP user@host# set policer input 4PLP user@host# set address 10.45.10.2/30
Results
Confirm your configuration by entering the show
interfaces
and show firewall
commands. If the output
does not display the intended configuration, repeat the instructions
in this example to correct the configuration.
[edit] user@host# show
interfaces { ge-1/2/1 { unit 0 { family inet { filter { input 4PLP; } policer { input 4PLP; } address 10.45.10.2/30; } } } } firewall { three-color-policer trTCM { two-rate { color-blind; committed-information-rate 400m; committed-burst-size 100m; peak-information-rate 1g; peak-burst-size 500m; } } policer 4PLP { if-exceeding { bandwidth-limit 40k; burst-size-limit 4k; } then loss-priority medium-low; } family inet { filter 4PLP { term 0 { from { precedence 1; } then loss-priority medium-low; } } filter trtcm-filter { term one { then { three-color-policer { two-rate trtcm1; } } } } }
Verification
Confirm that the configuration is working properly.
Verifying Two-Rate Tricolor Marking Operation
Purpose
Action
The following operational mode commands are useful for checking the results of your configuration:
show class-of-service forwarding-table classifiers
show interfaces interface-name extensive
show interfaces queue interface-name
For information about these commands, see the CLI Explorer.