- 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 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: Classifying All Traffic from a Remote Device by Configuring Fixed Interface-Based Classification
This example shows the configuration of fixed classification based on the incoming interface. Fixed classification can be based on the physical interface (such as an ATM or Gigabit Ethernet interface) or a logical interface (such as an Ethernet VLAN, a Frame Relay DLCI, or an MPLS tunnel).
Requirements
To verify this procedure, this example uses a traffic generator. The traffic generator can be hardware-based or it can be software running on a server or host machine.
The functionality in this procedure is widely supported on devices that run Junos OS. The example shown here was tested and verified on SRX Series Firewalls running Junos OS Release 12.1. The SRX Series Firewalls are configured to run as routers.
If you are performing tests on SRX Series Firewalls, you might need to configure the devices to run as unsecured routers in your test environment. You do not typically do this in a production environment.
Overview
A fixed interface classifier is the simplest way to classify all packets from a specific interface to a forwarding class. You typically use this approach on edge routers to classify all traffic from a remote router or server to a certain forwarding class and queue. A fixed interface classifier simply looks at the ingress interface on which the packet arrives and assigns all traffic received on that interface to a certain class of service.
The fixed interface classifier cannot set the locally-meaningful packet-loss-priority, which is used by rewrite rules and drop profiles. The implicit packet-loss-priority is low for all fixed interface classifiers.
A fixed interface classifier is inadequate for scenarios in which interfaces receive traffic that belongs to multiple classes of service. However, interface-based classification can be useful when it is combined with other classification processes. Filtering based on the inbound interface can improve the granularity of classification, for example, when combined with filtering based on code point markings. Combining the processes for interface and code point marking classification allows a single code point marking to have different meanings, depending on the interface on which the packet is received. If you want to combine a fixed interface classifier with a code point classifier, this is in effect a multifield classifier.
More Granular Alternative to Fixed Interface Classifier
In Junos OS, you can combine interface-based classification and code-point classification by using a multifield classifier, as follows:
[edit firewall family inet filter MF_CLASSIFIER term 1] from { dscp ef; interface ge-0/0/0.0; } then forwarding-class Voice;
The following Juniper Networks Learning Byte video describes classifiers in more detail.
Video 1: Class of Service Basics, Part 2: Classification Learn...
Topology
Figure 1 shows the sample network.

To simulate voice traffic, this example shows TCP packets sent from the host to a downstream device. On Device R2, a fixed interface classifier routes the packets into the queue defined for voice traffic.
The classifier is assigned to interface ge-0/0/0 on Device R2. As always, verification of queue assignment is done on the egress interface, which is ge-0/0/1 on Device R2.
CLI Quick Configuration shows the configuration for all of the Juniper Networks devices in Figure 1. The section Step-by-Step Procedure describes the steps on Device R2.
Configuration
Procedure
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.
Device R1
set interfaces ge-0/0/0 description to-R2 set interfaces ge-0/0/0 unit 0 family inet address 10.30.0.1/30 set interfaces ge-0/0/1 description to-host set interfaces ge-0/0/1 unit 0 family inet address 172.16.50.2/30 set interfaces lo0 unit 0 family inet address 192.168.0.1/32 set protocols ospf area 0.0.0.0 interface ge-0/0/0.0 set protocols ospf area 0.0.0.0 interface ge-0/0/1.0 passive set protocols ospf area 0.0.0.0 interface lo0.0 passive
Device R2
set interfaces ge-0/0/0 unit 0 family inet address 10.30.0.2/30 set interfaces ge-0/0/1 unit 0 family inet address 10.40.0.1/30 set interfaces lo0 unit 0 family inet address 192.168.0.2/32 set protocols ospf area 0.0.0.0 interface ge-0/0/0.0 set protocols ospf area 0.0.0.0 interface ge-0/0/1.0 set protocols ospf area 0.0.0.0 interface lo0.0 passive set class-of-service forwarding-classes queue 0 BE-data set class-of-service forwarding-classes queue 1 Premium-data set class-of-service forwarding-classes queue 2 Voice set class-of-service forwarding-classes queue 3 NC set class-of-service interfaces ge-0/0/0 unit 0 forwarding-class Voice
Device R3
set interfaces ge-0/0/0 unit 0 family inet address 10.50.0.1/30 set interfaces ge-0/0/1 unit 0 family inet address 10.40.0.2/30 set interfaces lo0 unit 0 family inet address 192.168.0.3/32 set protocols ospf area 0.0.0.0 interface ge-0/0/0.0 set protocols ospf area 0.0.0.0 interface ge-0/0/1.0 set protocols ospf area 0.0.0.0 interface lo0.0 passive
Step-by-Step Procedure
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 enable the default DSCP behavior aggregate classifier:
Configure the device interfaces.
content_copy zoom_out_map[edit interfaces] user@R2# set ge-0/0/0 unit 0 family inet address 10.30.0.2/30 user@R2# set ge-0/0/1 unit 0 family inet address 10.40.0.1/30 user@R2# set lo0 unit 0 family inet address 192.168.0.2/32
Configure an interior gateway protocol (IGP) or static routes.
content_copy zoom_out_map[edit protocols ospf area 0.0.0.0] user@R2# set interface ge-0/0/0.0 user@R2# set interface ge-0/0/1.0 user@R2# set interface lo0.0 passive
Configure a set of forwarding classes.
content_copy zoom_out_map[edit class-of-service forwarding-classes] user@R2# set queue 0 BE-data user@R2# set queue 1 Premium-data user@R2# set queue 2 Voice user@R2# set queue 3 NC
Map all traffic that arrives on ge-0/0/0.0 into the Voice queue.
content_copy zoom_out_map[edit class-of-service interfaces ge-0/0/0 unit 0] user@R2# set forwarding-class Voice
Results
From configuration mode, confirm your configuration by entering the show interfaces
and show class-of-service
commands. If the output does not display the intended configuration, repeat the instructions in this example to correct the configuration.
user@R2# show interfaces ge-0/0/0 { unit 0 { family inet { address 10.30.0.2/30; } } } ge-0/0/1 { unit 0 { family inet { address 10.40.0.1/30; } } } lo0 { unit 0 { family inet { address 192.168.0.2/32; } } }
user@R2# show protocols ospf { area 0.0.0.0 { interface ge-0/0/0.0; interface ge-0/0/1.0; interface lo0.0 { passive; } } }
user@R2# show class-of-service forwarding-classes { queue 0 BE-data; queue 1 Premium-data; queue 2 Voice; queue 3 NC; } interfaces { ge-0/0/0 { unit 0 { forwarding-class Voice; } } }
If you are done configuring the device, enter commit
from configuration mode.
Verification
Confirm that the configuration is working properly.
Verifying a Fixed-Interface Classifier
Purpose
Verify that the fixed interface classifier is enabled on the Device R2’s ingress interface. Keep in mind that although the classifier operates on incoming packets, you view the resulting queue assignment on the outgoing (egress) interface.
Action
Clear the interface statistics on Device R2’s egress interface.
content_copy zoom_out_mapuser@R2> clear interface statistics ge-0/0/1
Using a packet generator, send TCP packets to a device that is downstream of Device R2.
This example uses the packet generator hping.
content_copy zoom_out_maproot@host> sudo hping3 10.40.0.2 -c 25 –fast HPING 10.40.0.2 (eth0 10.40.0.2): NO FLAGS are set, 40 headers + 0 data bytes len=46 ip=10.40.0.2 ttl=62 id=8619 sport=0 flags=RA seq=0 win=0 rtt=1.9 ms len=46 ip=10.40.0.2 ttl=62 id=8620 sport=0 flags=RA seq=1 win=0 rtt=2.8 ms len=46 ip=10.40.0.2 ttl=62 id=8621 sport=0 flags=RA seq=2 win=0 rtt=1.9 ms len=46 ip=10.40.0.2 ttl=62 id=8623 sport=0 flags=RA seq=3 win=0 rtt=1.8 ms len=46 ip=10.40.0.2 ttl=62 id=8624 sport=0 flags=RA seq=4 win=0 rtt=7.1 ms len=46 ip=10.40.0.2 ttl=62 id=8625 sport=0 flags=RA seq=5 win=0 rtt=1.8 ms len=46 ip=10.40.0.2 ttl=62 id=8626 sport=0 flags=RA seq=6 win=0 rtt=1.8 ms len=46 ip=10.40.0.2 ttl=62 id=8627 sport=0 flags=RA seq=7 win=0 rtt=1.9 ms len=46 ip=10.40.0.2 ttl=62 id=8628 sport=0 flags=RA seq=8 win=0 rtt=2.0 ms len=46 ip=10.40.0.2 ttl=62 id=8634 sport=0 flags=RA seq=9 win=0 rtt=7.4 ms len=46 ip=10.40.0.2 ttl=62 id=8635 sport=0 flags=RA seq=10 win=0 rtt=1.8 ms len=46 ip=10.40.0.2 ttl=62 id=8636 sport=0 flags=RA seq=11 win=0 rtt=2.0 ms len=46 ip=10.40.0.2 ttl=62 id=8637 sport=0 flags=RA seq=12 win=0 rtt=7.8 ms len=46 ip=10.40.0.2 ttl=62 id=8639 sport=0 flags=RA seq=13 win=0 rtt=7.0 ms len=46 ip=10.40.0.2 ttl=62 id=8640 sport=0 flags=RA seq=14 win=0 rtt=1.8 ms len=46 ip=10.40.0.2 ttl=62 id=8641 sport=0 flags=RA seq=15 win=0 rtt=7.2 ms len=46 ip=10.40.0.2 ttl=62 id=8642 sport=0 flags=RA seq=16 win=0 rtt=2.1 ms len=46 ip=10.40.0.2 ttl=62 id=8643 sport=0 flags=RA seq=17 win=0 rtt=2.0 ms len=46 ip=10.40.0.2 ttl=62 id=8644 sport=0 flags=RA seq=18 win=0 rtt=7.3 ms len=46 ip=10.40.0.2 ttl=62 id=8645 sport=0 flags=RA seq=19 win=0 rtt=1.7 ms len=46 ip=10.40.0.2 ttl=62 id=8646 sport=0 flags=RA seq=20 win=0 rtt=7.1 ms len=46 ip=10.40.0.2 ttl=62 id=8647 sport=0 flags=RA seq=21 win=0 rtt=2.0 ms len=46 ip=10.40.0.2 ttl=62 id=8648 sport=0 flags=RA seq=22 win=0 rtt=1.7 ms len=46 ip=10.40.0.2 ttl=62 id=8649 sport=0 flags=RA seq=23 win=0 rtt=1.8 ms len=46 ip=10.40.0.2 ttl=62 id=8651 sport=0 flags=RA seq=24 win=0 rtt=1.8 ms
On Device R2, verify that the Voice queue is incrementing.
content_copy zoom_out_mapuser@R2> show interfaces extensive ge-0/0/1 | find "queue counters" Queue counters: Queued packets Transmitted packets Dropped packets 0 BE-data 0 0 0 1 Premium-data 0 0 0 2 Voice 25 25 0 3 NC 3 3 0 Queue number: Mapped forwarding classes 0 BE-data 1 Premium-data 2 Voice 3 NC ...
Meaning
The output shows that the Voice queue has incremented by 25 packets after sending 25 packets through the ge-0/0/0 interface on Device R2.