Mapping CoS Component Inputs to Outputs
Some CoS components map one set of values to another set of values. Each mapping contains one or more inputs and one or more outputs.
Figure 1 shows the components of the Junos OS CoS features, illustrating the sequence in which they interact.
Component mapping enables you to define forwarding classes and packet loss priorities for various traffic flows and then map those forwarding classes to output queues with specific shaping and scheduling characteristics.
When you configure a mapping, you set the outputs for a given set of inputs, as shown in Table 1.
CoS Mappings |
Inputs |
Outputs |
Comments |
---|---|---|---|
The map sets the forwarding class and PLP for a specific set of code points. |
|||
The map sets the drop profile for a specific PLP and protocol type. |
|||
This map assigns a forwarding class to a specific scheduler. |
|||
The map sets the code points for a specific forwarding class and PLP. |
Following are sample configurations for classifiers, drop-profile maps, scheduler maps, and rewrite rules.
In the following classifier sample configuration, packets with
EXP bits 000
are assigned to the data-queue
forwarding
class with a low
loss priority, and packets with EXP bits 001
are assigned to the data-queue
forwarding class
with a high
loss priority.
[edit class-of-service] classifiers { exp exp_classifier { forwarding-class data-queue { loss-priority low code-points 000; loss-priority high code-points 001; } } }
See Configuring Behavior Aggregate Classifiers for more information on setting the forwarding class and loss priority for a specific set of code-point aliases and bit patterns
In the following drop-profile map sample configuration, the
scheduler includes two drop-profile maps, which specify that packets
are evaluated by the low-drop
drop profile if they have
a low
loss priority and are from any protocol. Packets
are evaluated by the high-drop
drop profile if they have
a high
loss priority and are from any protocol.
[edit class-of-service] schedulers { best-effort { drop-profile-map loss-priority low protocol any drop-profile low-drop; drop-profile-map loss-priority high protocol any drop-profile high-drop; } }
See Determining Packet Drop Behavior by Configuring Drop Profile Maps for Schedulers for more information on mapping drop profiles to a scheduler.
In the following scheduler maps configuration sample, each of the default forwarding classes is mapped to a scheduler specifically designed for that forwarding class.
scheduler-maps { basic { forwarding-class best-effort scheduler be; forwarding-class assured-forwarding scheduler af; forwarding-class expedited-forwarding scheduler ef; forwarding-class network-control scheduler nc; } }
See Configuring Scheduler Maps for more information on mapping forwarding classes to schedulers.
In the following rewrite rule configuration sample, packets
in the be
forwarding class with low
loss priority
are assigned the EXP bits 000
, and packets in the be
forwarding class with high
loss priority are
assigned the EXP bits 001
.
[edit class-of-service] rewrite-rules { exp exp-rw { forwarding-class be { loss-priority low code-point 000; loss-priority high code-point 001; } } }
See Configuring Rewrite Rules for more information on setting the code-point aliases and bit patterns for specific forwarding classes and loss priorities as packets leave the device.