Configuring Basic Packet Flow Through the Junos OS CoS Process

 

Figure 1 and Figure 2 show the components of the Junos OS CoS features, illustrating the sequence in which they interact.

Figure 1: CoS Classifier, Queues, and Scheduler
CoS Classifier, Queues,
and Scheduler
Figure 2: Packet Flow Through CoS- Configurable Components
Packet Flow Through CoS-
Configurable Components

The following configuration demonstrates the packet flow through the CoS process:

Define Classifiers

If you trust the CoS values in the packet headers, you can use behavior aggregate classification to map those values to a forwarding class and drop priority. For example:

If you do not trust the CoS values in the packet headers, you can use the more complex multifield classification to map ingress traffic to a forwarding class and drop priority. For example:

Apply Classifiers to Incoming Packets on Interfaces

You apply behavior aggregate classifiers to logical interfaces at the [edit class-of-service interfaces] hierarchy level. For example:

You apply multifield classifiers as input filters to logical interfaces at the [edit interfaces] hierarchy level. For example:

Define Policers to Limit Traffic and Control Congestion

If you need to rate-limit a traffic flow, either by discarding excess traffic (hard policing) or reassign excess traffic to a different forwarding class and/or loss priority (soft policing), define a policier and apply the policer to a firewall filter for that traffic flow. For example:

Define Drop Profiles

Use drop profiles to define the drop probabilities across the range of delay-buffer occupancy, supporting the random early detection (RED) process.

Assign Each Forwarding Class to a Queue

To provide differentiated services to each forwarding class, assign each forwarding class to it’s own output queue. For example:

Define Schedulers

Define the scheduler characteristics for each forwarding class. For example:

Define Scheduler Maps

Use scheduler maps to map schedulers to forwarding classes. For example:

Define CoS Header Rewrite Rules

Use rewrite rules to redefine the CoS bit pattern of outgoing packets. For example:

Apply Scheduler Maps and Rewrite Rules to Egress Interfaces