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. When you configure a mapping, you set the outputs for a given set of inputs, as shown in Table 7.
Table 7: CoS Mappings—Inputs and Outputs
In the following classifier example, 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;
- }
- }
- }
In the following drop-profile map example, 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;
- }
- }
In the following rewrite rule example, 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;
- }
- }
- }