How to Use Code Point Aliases in COS on Junos Routers
Memorizing bit patterns of forwarding classes can be painful. A better way is to use code point aliases. When determining your Class of Service (CoS) policy, instead of specifying the bit pattern, you can define the alias name that represents the bit patters. Such aliases are called code point aliases.
Put simply, use code point aliases, not bit patterns. If you assign English phrases or words to a particular pattern, it’s far easier to go back and understand the configuration at a later date. Try looking at 101110; you know immediately that it refers to expedited forwarding.
Additionally, if you create a set of rules that you apply to a particular pattern and that pattern changes, changing the definition of the alias is far easier.
To simplify things even more, some well-known bit patterns already have aliases built into the software. Here are the common Differentiated Services Code Point (DSCP) aliases along with the corresponding bit patterns, forwarding classes, and PLP values.
| Code Point Alias | Forwarding Class | PLP | Bit pattern |
|---|---|---|---|
| ef | expedited-forwarding | low | 101110 |
| af11 | assured-forwarding | low | 001010 |
| af12 | assured-forwarding | high | 001100 |
| af13 | assured-forwarding | high | 001110 |
| af21 | best-effort | low | 010010 |
| af22 | best-effort | low | 010100 |
| af23 | best-effort | low | 010110 |
| af31 | best-effort | low | 011010 |
| af32 | best-effort | low | 011100 |
| af33 | best-effort | low | 011110 |
| af41 | best-effort | low | 100010 |
| af42 | best-effort | low | 100100 |
| af43 | best-effort | low | 100110 |
| be | best-effort | low | 000000 |
| cs1 | best-effort | low | 001000 |
| cs2 | best-effort | low | 010000 |
| cs3 | best-effort | low | 011000 |
| cs4 | best-effort | low | 100000 |
| cs5 | best-effort | low | 101000 |
| nc1/cs6 | network-control | low | 110000 |
| nc2/cs7 | network-control | low | 111000 |
| other | best-effort | low | (none) |
These combinations aren’t exhaustive, but they represent the well-known patterns that you can leverage in your classification of traffic. If you want to add a pattern that isn’t already present, you can configure that pattern and name it whatever you want:
[edit class-of-service]
code-point aliases {
dscp {
my-dscp-alias 110001;
}
}
Using this configuration, you can assign a name to a particular DSCP bit pattern. Every time you want to match on that bit pattern in the rest of the CoS configuration, you need to reference only the alias name.









