Ingress policing
To perform ingress policing, 7730 SXR platforms support two two-rate-three-color marker (trTCM) algorithms using the following algorithm-type parameters:
- trtcm1: RFC 2698 trTCM
- trtcm2 (default): RFC 4115 trTCM
trtcm1
The trtcm1 option refers to the policing algorithm defined in RFC 2698. With trtcm1, packets are marked green only after evaluation against both the CIR bucket (Tc) depth and PIR bucket depth (Tp).
Two token buckets are used, the CBS bucket and the MBS bucket. Tokens are added to the buckets based on the CIR and PIR rates. The algorithm deducts tokens from both the CBS and the MBS buckets to determine a profile for the packet.
The following diagram shows the token bucket operation for packets classified as green or uncolored at ingress.
When a packet of size B bytes arrives at time t, the policer processes the packet as follows:
- If the packet is precolored as red or if P – B < 0, the packet is red (violating) and no tokens are drained from Tp or Tc.
- If the packet is precolored as yellow or if C – B < 0, the packet is yellow (exceeding), and B bytes are drained from Tp.
- Otherwise, the packet is green (conforming), and B bytes are drained from Tp and Tc.
trtcm2
The trtcm2 option refers to the policing algorithm defined in RFC 4115. With trtcm2, packets that are below the CIR bucket (Tc) depth are immediately colored green, without the need to evaluate the packets against a second bucket depth. This behavior is the principal differentiator between the RFC 4115 and RFC 2698 algorithms.
Two token buckets are used, the CBS bucket and the EBS bucket. Tokens are added to the buckets based on the CIR and EIR rates.
When a green or uncolored packet of size B bytes arrives at time t, the algorithm processes the packet as follows:
- If C – B > 0, the packet is green (conforming), and B bytes are drained from Tc.
- If E – B > 0, the packet is yellow (exceeding), and B bytes are drained from Te.
- Otherwise, the packet is red (violating) and no tokens are drained from Tc or Te.
The algorithm deducts tokens from either the CBS bucket (when the algorithm identifies the packet as in-profile or green) or the EBS bucket (when the algorithm identifies the packet as out-of-profile or yellow).
For yellow packets, the token bucket operation differs as shown in the following diagram. In this case, only the EBS bucket is used.
When a yellow packet arrives at ingress, the algorithm deducts tokens only from the EBS bucket.
When a yellow packet of size B bytes arrives at time t, the algorithm processes the packet as follows:
- If E – B > 0, the packet is yellow (exceeding), and B bytes are drained from Te.
- Otherwise, the packet is red (violating) and no tokens are drained from Te.
Color aware policing
By default, trTCM policing on 7730 SXR platforms operates in color-aware mode based on RFC 4115. In this mode, the trTCM algorithm processes ingress packets based on the profile that is previously applied to the packets by the input classifier. Nokia recommends to classify ingress traffic to one of the following profiles: in-plus, in, out, or exceed.
Policer profile marking
The following tables describe the color aware operation of both trTCM policers.
input-profile | CIR conform | PIR conform | output-profile | CIR bucket decrement | PIR bucket decrement |
---|---|---|---|---|---|
in-plus | conform | conform | in-plus | true | true |
conform | non-conform | exceed | false | false | |
non-conform | conform | out | false | true | |
non-conform | non-conform | exceed | false | false | |
in/in-low | conform | conform | in | true | true |
conform | non-conform | exceed | false | false | |
non-conform | conform | out | false | true | |
non-conform | non-conform | exceed | false | false | |
out/out-low | conform | conform | out | false | true |
conform | non-conform | exceed | false | false | |
non-conform | conform | out | false | true | |
non-conform | non-conform | exceed | false | false | |
exceed | conform | conform | exceed | false | true |
conform | non-conform | exceed | false | false | |
non-conform | conform | exceed | false | true | |
non-conform | non-conform | exceed | false | false |
input-profile | CIR conform | EIR conform | output-profile | CIR bucket decrement | EIR bucket decrement |
---|---|---|---|---|---|
in-plus | conform | conform | in-plus | true | false |
conform | non-conform | in-plus | true | false | |
non-conform | conform | out | false | true | |
non-conform | non-conform | exceed | false | false | |
in/in-low | conform | conform | in | true | false |
conform | non-conform | in | true | true | |
non-conform | conform | out | false | false | |
non-conform | non-conform | exceed | false | false | |
out/out-low | conform | conform | out | false | true |
conform | non-conform | exceed | false | false | |
non-conform | conform | out | false | true | |
non-conform | non-conform | exceed | false | false | |
exceed | conform | conform | exceed | false | true |
conform | non-conform | exceed | false | false | |
non-conform | conform | exceed | false | true | |
non-conform | non-conform | exceed | false | false |
CIR vs PIR or EIR
The CIR value must not be greater than PIR (trtcm1) or EIR (trtcm2). Otherwise, the system adjusts the CIR value to the respective PIR or EIR value. The operational values for these rates are available in state for a specified policer instance.
CIR vs PIR bucket sizes
A packet can be non-conforming to a PIR bucket, while still conforming to a CIR bucket. This seemingly contradictory condition can occur when the CBS is quite large relative to MBS, while the difference between CIR and PIR is very small (or for example, when CIR = PIR).
Color-blind emulation
To emulate color-blind mode, the input classifier can mark all incoming packets to the same profile, for example in. In this case, all incoming packets have the same color and the policer operation is the same for all.
Single-rate emulation
To emulate a single-rate algorithm using trtcm1, set the CIR value to 0. This causes null-CIR to be set to TRUE for child policers. (A non-zero rate sets this flag to FALSE). This CIR setting is supported only for trtcm1 policers.
Policing policies
There are four groups of policies describing policer parameters:
- Policer policies (policer-policy)
- CIR threshold separation policies (cir-threshold-separation-policy)
- PIR/EIR threshold separation policies (pir-threshold-separation-policy)
- Parent policer threshold policy (parent-policer-threshold-policy)
The CIR and PIR/EIR policies are defined based on the algorithm-type and threshold-separation parameters configured at the policer level. The policer policies and parent policer threshold policy are explicitly configured under the qos policer-policies context.
Policer policy
The policer policy is the basic policy defining individual policers used at subinterface level and their respective parameters. Every policer policy is identified by a unique name. Up to 64 policer policies can be defined on the system.
Each policy contains multiple policers, which are defined by algorithm type (trtcm1 or trtcm2), CIR/PIR/EIR and CBS/MBS/EBS values, and a violate action for red packets.
Every policer policy instance at subinterface level is allocated 32 policers, regardless of the number of policers explicitly defined within the policer policy.
Input class map
While the policer policy defines the parameters for policers, the input class map defines the mapping of FCs to those defined policers. The input class map may not map all FCs to policers. In this case, mapping from the default input class map applies. As a consequence, the state for subinterfaces always displays statistics for all policers, even though they may not be specified explicitly.
Parent policer
The individual policers can be aggregated by a parent policer enforcing an aggregate rate. The parent policer is defined by its PIR and its inputs. The parent policer is also defined by a parent policer threshold policy defining the bucket depths and their separation between different profiles.
If a policer policy includes policers that are not declared as inputs to a parent policer, such policers are considered as orphaned and their rate is not included in the aggregate rate of the parent policer.
In addition, the parent policer configuration does not accept as input a policer that is not explicitly defined. Policers that are not explicitly defined in the policer policy inherit default parameters, equal to the maximum values. In other words, they do not affect traffic and they are by definition orphaned.
When the policers are parented by a parent policer, they can be assigned to one of six priority levels (0 to 5), with priority level 0 having the lowest priority. If two or more policers are assigned the same priority level, the bandwidth of the parent policer is distributed equally, provided all policers are receiving equal amounts of traffic.
Policer policy example
The following figure shows a policer policy example where the parent policer aggregates policers 0, 1, and 2, and where policer 3 is an orphaned policer.
The following output shows the configuration for the example policer policy.
--{ candidate shared default }--[ ]--
# info qos policer-policies
qos {
policer-policies {
parent-policer-threshold-policy example-parent {
threshold-separation 18000
}
policer-policy example-policer {
policer 0 {
algorithm-type trtcm1
peak-rate-kbps 1000
committed-rate-kbps 1000
maximum-burst-size 40000
violate-action drop
statistics-mode extended
adaptation-rules {
peak-rate closest
maximum-burst-size closest
}
pir-threshold-separation {
inplus-separated false
}
}
policer 1 {
algorithm-type trtcm1
peak-rate-kbps 500
committed-rate-kbps 500
maximum-burst-size 50000
violate-action drop
statistics-mode extended
adaptation-rules {
peak-rate closest
maximum-burst-size closest
}
pir-threshold-separation {
inplus-separated false
}
}
policer 2 {
algorithm-type trtcm1
peak-rate-kbps 250
committed-rate-kbps 250
maximum-burst-size 25000
violate-action drop
statistics-mode extended
adaptation-rules {
peak-rate closest
maximum-burst-size closest
}
pir-threshold-separation {
inplus-separated false
}
}
policer 3 {
algorithm-type trtcm2
excess-rate-kbps 20000
excess-burst-size 40000
violate-action mark-exceed
statistics-mode extended
adaptation-rules {
peak-rate closest
committed-rate lower
maximum-burst-size closest
committed-burst-size higher
}
pir-threshold-separation {
inplus-separated true
}
}
parent-policer {
parent-policer-threshold-policy example-parent
rate {
peak-rate-kbps 1500
adaptation-rule closest
burst-allowance 40000
}
inputs {
policer 0 {
priority-level 0
}
policer 1 {
priority-level 1
}
policer 2 {
priority-level 1
}
}
}
}
}
}
Threshold separation policy
Policer operation is determined in part by how the policer bucket depths (PIR, EIR, and CIR) are partitioned and available for use by individual packet profiles.
On 7730 SXR platforms, the bucket depths are defined using policer threshold separation policies, defined in relation to the configured CBS, MBS, or EBS values. However, rather than enable custom definitions of policer threshold separation policies, 7730 SXR platforms support system-defined threshold separation policies, as defined in the following table.
Policer bucket | Threshold separation policy name (system-reserved) | Definition |
---|---|---|
CIR | cir-default | Default (and only) CIR threshold separation policy |
PIR (trtcm1) | trtcm1-pir-default | PIR policy for trtcm1 with no inplus threshold |
trtcm1-pir-inplus | PIR policy for trtcm1 including a threshold for the inplus profile | |
EIR (trtcm2) | trtcm2-eir-default | EIR policy for trtcm2 with no inplus threshold (the default PIR/EIR policy) |
trtcm2-eir-inplus | EIR policy for trtcm2 including a threshold for the inplus profile |
The following sections provide additional details about these default threshold separation policies.
CIR default policy
The following table shows the settings for the cir-default threshold separation policy.
Input profiles | Threshold CBS value |
---|---|
in-plus | 1.33 x CBS |
in | 1 x CBS |
in-low | 0.67 x CBS |
out, out-low, exceed | 0 x CBS |
PIR threshold policies (trtcm1-pir-default)
The following tables describe the system-defined PIR threshold separation policies for trtcm1.
Input profiles | Threshold MBS value |
---|---|
in-plus, in, out | 1 x MBS |
in-low, out-low | 0.75 x MBS |
exceed | 0 x MBS |
Input profiles | Threshold MBS value |
---|---|
in-plus | 1 x MBS |
in, out | 0.75 x MBS |
in-low, out-low | 0.5 x MBS |
exceed | 0 x MBS |
EIR threshold policies (trtcm2)
The following tables describe the system-defined EIR trtcm2 threshold separation policies.
Input profiles |
Threshold EBS value |
---|---|
in-plus, in, out | 1 x EBS |
in-low, out-low | 0.75 x EBS |
exceed | 0 x EBS |
Input profiles | Threshold EBS value |
---|---|
in-plus | 1 x EBS |
in, out | 0.75 x EBS |
in-low, out-low | 0.5 x EBS |
exceed | 0 x EBS |
Threshold separation policy settings
The selected trTCM algorithm is determined per-policer using the algorithm-type command: either trtcm1 or trtcm2.
By default, no in-plus profile is defined for either PIR or EIR thresholds. To enable in-plus thresholds, use the pir-threshold-separation inplus-separated command in the following context:
qos policer-policies policer-policy policer pir-threshold-separation
State information
Information related to the operational CIR, PIR, and EIR threshold separation policies and to the operational separation threshold values per profile is available for every policer using the info from state command under the qos interfaces interface context.
Display operational threshold separation policy values
--{ running }--[ ]--
# info from state qos interfaces interface eth1.10 input policer-policies policer 1
qos {
interfaces {
interface eth1.10 {
input {
policer-policies {
policer 1 {
pir-policer-threshold-separation-policy trtcm1-pir-default
cir-policer-threshold-separation-policy cir-default
peak-rate-kbps 8000000
committed-rate-kbps 0
maximum-burst-size 180000
committed-burst-size 180000
forwarding-class af1 {
forwarding-type [
unicast
]
}
operational-separation-thresholds in {
pir-operational-separation-threshold 180000
cir-operational-separation-threshold 180000
}
operational-separation-thresholds out {
pir-operational-separation-threshold 180000
cir-operational-separation-threshold 0
}
operational-separation-thresholds exceed {
pir-operational-separation-threshold 0
cir-operational-separation-threshold 0
}
operational-separation-thresholds in-plus {
pir-operational-separation-threshold 180000
cir-operational-separation-threshold 239400
}
operational-separation-thresholds in-low {
pir-operational-separation-threshold 135000
cir-operational-separation-threshold 120600
}
operational-separation-thresholds out-low {
pir-operational-separation-threshold 135000
cir-operational-separation-threshold 0
}
policer-statistics {
aggregate-statistics {
accepted-packets 0
accepted-octets 0
accepted-inplus-packets 0
accepted-inplus-octets 0
accepted-in-packets 0
accepted-in-octets 0
accepted-out-packets 0
accepted-out-octets 0
exceed-packets 0
exceed-octets 0
}
}
}
}
}
}
}
}
Parent policer threshold policy
The parent policer threshold policy defines the basic parameters for the parent policer. Only one parameter is supported:
- threshold-separation: defines the separation (in bytes) between different priority levels of child policers. This is the amount of headroom the higher-priority level child policer gets in relation to its lower-priority peers. The ultimate MBS of the parent policer is then calculated as follows: MBS= burst-allowance + threshold-separation * 6; where the burst-allowance is configured under qos policer-policies policer-policy parent-policer rate burst-allowance. For any intermediate level child policer, the multiplication factor corresponds to its configured priority-level.
The operation of counters for the parent policer is as follows:
- A packet that arrives from the child policer with an exceed profile retains the exceed setting and does not consume tokens from the PIR bucket of the parent policer. The exceed counter is incremented at the child policer level instead.
- A packet that arrives from the child policer with any other profile, but that violates the PIR bucket size of the parent policer is classified with the exceed profile. The exceed counter is incremented at the child policer level.
- A packet that arrives from the child policer with any other profile but does not violate the PIR of the parent policer keeps the profile and it increments the corresponding counter at the child policer level.
The following shows the default parent-policer-threshold-policy:
--{ candidate shared default }--[ ]--
# info from state qos policer-policies parent-policer-threshold-policy default
qos {
policer-policies {
parent-policer-threshold-policy default {
threshold-separation 18000
}
}
}
LAG operation and statistics
If subinterfaces are created on a LAG, one policer is always instantiated per forwarding complex. The settings of the individual policer instances are set to the administrative values configured in the corresponding policer policy. The state information displays aggregate statistics (per subinterface) as well as per LAG member using the following commands:
-
info from state qos interfaces interface input policer-policies policer policer-statistics per-lag-member-statistics
-
info from state qos interfaces interface input policer-policies policer policer-statistics aggregate-statistics
Default policing policy
While the policer policy defines the parameters for policers, the input class map defines the mapping of FCs to those defined policers. To apply a policer to a subinterface, both a policer policy and an input class map are assigned to the subinterface. However, if a mismatch exists such that the input class map references a policer that is not explicitely defined in the corresponding policer policy, the system applies the default policer with the corresponding ID.
For every policer policy, the system always reserves a block of 32 policers. The policers that are not defined within a custom defined policer policy inherit the parameters set according to the definition in the default policer policy.
Default policer policy and input class map
The system provides a default policer policy named default that defines 32 policers with maximum rates. Similarly, a default input class map named default maps each forwarding class to a corresponding unicast policer and each broadcast/multicast/unknown-broadcast traffic to a corresponding policer per forwarding class. These default policies allow ingress statistics to be collected, as the statistics are dependent on the existence of a policer policy. Both default policies are attached to every subinterface created on the system, with no requirement for an explicit subinterface declaration under the qos interfaces context. Similarly, state-related information is available without an explicit subinterface declaration under the qos interfaces tree.
If a default policer policy is attached to a subinterface, the system allocates a single counter set per policer, but no actual policing action takes place.
When a new custom policy is created, every parameter is set to the default value.
The configuration of the default policer policy and input class map is as follows:
--{ running }--[ ]--
# info from state qos policer-policies policer-policy default
qos {
policer-policies {
policer-policy default {
policer 0 {
algorithm-type trtcm2
excess-rate-kbps 800000000
excess-burst-size 180000
violate-action mark-exceed
statistics-mode extended
adaptation-rules {
excess-rate closest
excess-burst-size closest
}
pir-threshold-separation {
inplus-separated false
}
}
policer 1 {
algorithm-type trtcm2
excess-rate-kbps 800000000
excess-burst-size 180000
violate-action mark-exceed
statistics-mode extended
adaptation-rules {
excess-rate closest
excess-burst-size closest
}
pir-threshold-separation {
inplus-separated false
}
}
policer 2 {
algorithm-type trtcm2
excess-rate-kbps 800000000
excess-burst-size 180000
violate-action mark-exceed
statistics-mode extended
adaptation-rules {
excess-rate closest
excess-burst-size closest
}
pir-threshold-separation {
inplus-separated false
}
}
policer 3 {
algorithm-type trtcm2
excess-rate-kbps 800000000
excess-burst-size 180000
violate-action mark-exceed
statistics-mode extended
adaptation-rules {
excess-rate closest
excess-burst-size closest
}
pir-threshold-separation {
inplus-separated false
}
}
policer 4 {
algorithm-type trtcm2
excess-rate-kbps 800000000
excess-burst-size 180000
violate-action mark-exceed
statistics-mode extended
adaptation-rules {
excess-rate closest
excess-burst-size closest
}
pir-threshold-separation {
inplus-separated false
}
}
policer 5 {
algorithm-type trtcm2
excess-rate-kbps 800000000
excess-burst-size 180000
violate-action mark-exceed
statistics-mode extended
adaptation-rules {
excess-rate closest
excess-burst-size closest
}
pir-threshold-separation {
inplus-separated false
}
}
policer 6 {
algorithm-type trtcm2
excess-rate-kbps 800000000
excess-burst-size 180000
violate-action mark-exceed
statistics-mode extended
adaptation-rules {
excess-rate closest
excess-burst-size closest
}
pir-threshold-separation {
inplus-separated false
}
}
policer 7 {
algorithm-type trtcm2
excess-rate-kbps 800000000
excess-burst-size 180000
violate-action mark-exceed
statistics-mode extended
adaptation-rules {
excess-rate closest
excess-burst-size closest
}
pir-threshold-separation {
inplus-separated false
}
}
policer 8 {
algorithm-type trtcm2
excess-rate-kbps 800000000
excess-burst-size 180000
violate-action mark-exceed
statistics-mode extended
adaptation-rules {
excess-rate closest
excess-burst-size closest
}
pir-threshold-separation {
inplus-separated false
}
}
policer 9 {
algorithm-type trtcm2
excess-rate-kbps 800000000
excess-burst-size 180000
violate-action mark-exceed
statistics-mode extended
adaptation-rules {
excess-rate closest
excess-burst-size closest
}
pir-threshold-separation {
inplus-separated false
}
}
policer 10 {
algorithm-type trtcm2
excess-rate-kbps 800000000
excess-burst-size 180000
violate-action mark-exceed
statistics-mode extended
adaptation-rules {
excess-rate closest
excess-burst-size closest
}
pir-threshold-separation {
inplus-separated false
}
}
policer 11 {
algorithm-type trtcm2
excess-rate-kbps 800000000
excess-burst-size 180000
violate-action mark-exceed
statistics-mode extended
adaptation-rules {
excess-rate closest
excess-burst-size closest
}
pir-threshold-separation {
inplus-separated false
}
}
policer 12 {
algorithm-type trtcm2
excess-rate-kbps 800000000
excess-burst-size 180000
violate-action mark-exceed
statistics-mode extended
adaptation-rules {
excess-rate closest
excess-burst-size closest
}
pir-threshold-separation {
inplus-separated false
}
}
policer 13 {
algorithm-type trtcm2
excess-rate-kbps 800000000
excess-burst-size 180000
violate-action mark-exceed
statistics-mode extended
adaptation-rules {
excess-rate closest
excess-burst-size closest
}
pir-threshold-separation {
inplus-separated false
}
}
policer 14 {
algorithm-type trtcm2
excess-rate-kbps 800000000
excess-burst-size 180000
violate-action mark-exceed
statistics-mode extended
adaptation-rules {
excess-rate closest
excess-burst-size closest
}
pir-threshold-separation {
inplus-separated false
}
}
policer 15 {
algorithm-type trtcm2
excess-rate-kbps 800000000
excess-burst-size 180000
violate-action mark-exceed
statistics-mode extended
adaptation-rules {
excess-rate closest
excess-burst-size closest
}
pir-threshold-separation {
inplus-separated false
}
}
policer 16 {
algorithm-type trtcm2
excess-rate-kbps 800000000
excess-burst-size 180000
violate-action mark-exceed
statistics-mode extended
adaptation-rules {
excess-rate closest
excess-burst-size closest
}
pir-threshold-separation {
inplus-separated false
}
}
policer 17 {
algorithm-type trtcm2
excess-rate-kbps 800000000
excess-burst-size 180000
violate-action mark-exceed
statistics-mode extended
adaptation-rules {
excess-rate closest
excess-burst-size closest
}
pir-threshold-separation {
inplus-separated false
}
}
policer 18 {
algorithm-type trtcm2
excess-rate-kbps 800000000
excess-burst-size 180000
violate-action mark-exceed
statistics-mode extended
adaptation-rules {
excess-rate closest
excess-burst-size closest
}
pir-threshold-separation {
inplus-separated false
}
}
policer 19 {
algorithm-type trtcm2
excess-rate-kbps 800000000
excess-burst-size 180000
violate-action mark-exceed
statistics-mode extended
adaptation-rules {
excess-rate closest
excess-burst-size closest
}
pir-threshold-separation {
inplus-separated false
}
}
policer 20 {
algorithm-type trtcm2
excess-rate-kbps 800000000
excess-burst-size 180000
violate-action mark-exceed
statistics-mode extended
adaptation-rules {
excess-rate closest
excess-burst-size closest
}
pir-threshold-separation {
inplus-separated false
}
}
policer 21 {
algorithm-type trtcm2
excess-rate-kbps 800000000
excess-burst-size 180000
violate-action mark-exceed
statistics-mode extended
adaptation-rules {
excess-rate closest
excess-burst-size closest
}
pir-threshold-separation {
inplus-separated false
}
}
policer 22 {
algorithm-type trtcm2
excess-rate-kbps 800000000
excess-burst-size 180000
violate-action mark-exceed
statistics-mode extended
adaptation-rules {
excess-rate closest
excess-burst-size closest
}
pir-threshold-separation {
inplus-separated false
}
}
policer 23 {
algorithm-type trtcm2
excess-rate-kbps 800000000
excess-burst-size 180000
violate-action mark-exceed
statistics-mode extended
adaptation-rules {
excess-rate closest
excess-burst-size closest
}
pir-threshold-separation {
inplus-separated false
}
}
policer 24 {
algorithm-type trtcm2
excess-rate-kbps 800000000
excess-burst-size 180000
violate-action mark-exceed
statistics-mode extended
adaptation-rules {
excess-rate closest
excess-burst-size closest
}
pir-threshold-separation {
inplus-separated false
}
}
policer 25 {
algorithm-type trtcm2
excess-rate-kbps 800000000
excess-burst-size 180000
violate-action mark-exceed
statistics-mode extended
adaptation-rules {
excess-rate closest
excess-burst-size closest
}
pir-threshold-separation {
inplus-separated false
}
}
policer 26 {
algorithm-type trtcm2
excess-rate-kbps 800000000
excess-burst-size 180000
violate-action mark-exceed
statistics-mode extended
adaptation-rules {
excess-rate closest
excess-burst-size closest
}
pir-threshold-separation {
inplus-separated false
}
}
policer 27 {
algorithm-type trtcm2
excess-rate-kbps 800000000
excess-burst-size 180000
violate-action mark-exceed
statistics-mode extended
adaptation-rules {
excess-rate closest
excess-burst-size closest
}
pir-threshold-separation {
inplus-separated false
}
}
policer 28 {
algorithm-type trtcm2
excess-rate-kbps 800000000
excess-burst-size 180000
violate-action mark-exceed
statistics-mode extended
adaptation-rules {
excess-rate closest
excess-burst-size closest
}
pir-threshold-separation {
inplus-separated false
}
}
policer 29 {
algorithm-type trtcm2
excess-rate-kbps 800000000
excess-burst-size 180000
violate-action mark-exceed
statistics-mode extended
adaptation-rules {
excess-rate closest
excess-burst-size closest
}
pir-threshold-separation {
inplus-separated false
}
}
policer 30 {
algorithm-type trtcm2
excess-rate-kbps 800000000
excess-burst-size 180000
violate-action mark-exceed
statistics-mode extended
adaptation-rules {
excess-rate closest
excess-burst-size closest
}
pir-threshold-separation {
inplus-separated false
}
}
policer 31 {
algorithm-type trtcm2
excess-rate-kbps 800000000
excess-burst-size 180000
violate-action mark-exceed
statistics-mode extended
adaptation-rules {
excess-rate closest
excess-burst-size closest
}
pir-threshold-separation {
inplus-separated false
}
}
}
}
}
--{ running }--[ ]--
# info from state qos input-class-map default
qos {
input-class-map default {
forwarding-class fc0 {
policers {
unicast-policer 0
multicast-policer 16
broadcast-policer 16
unknown-unicast-policer 16
}
}
forwarding-class fc1 {
policers {
unicast-policer 1
multicast-policer 17
broadcast-policer 17
unknown-unicast-policer 17
}
}
forwarding-class fc10 {
policers {
unicast-policer 10
multicast-policer 26
broadcast-policer 26
unknown-unicast-policer 26
}
}
forwarding-class fc11 {
policers {
unicast-policer 11
multicast-policer 27
broadcast-policer 27
unknown-unicast-policer 27
}
}
forwarding-class fc12 {
policers {
unicast-policer 12
multicast-policer 28
broadcast-policer 28
unknown-unicast-policer 28
}
}
forwarding-class fc13 {
policers {
unicast-policer 13
multicast-policer 29
broadcast-policer 29
unknown-unicast-policer 29
}
}
forwarding-class fc14 {
policers {
unicast-policer 14
multicast-policer 30
broadcast-policer 30
unknown-unicast-policer 30
}
}
forwarding-class fc15 {
policers {
unicast-policer 15
multicast-policer 31
broadcast-policer 31
unknown-unicast-policer 31
}
}
forwarding-class fc2 {
policers {
unicast-policer 2
multicast-policer 18
broadcast-policer 18
unknown-unicast-policer 19
}
}
forwarding-class fc3 {
policers {
unicast-policer 3
multicast-policer 19
broadcast-policer 19
unknown-unicast-policer 19
}
}
forwarding-class fc4 {
policers {
unicast-policer 4
multicast-policer 20
broadcast-policer 20
unknown-unicast-policer 20
}
}
forwarding-class fc5 {
policers {
unicast-policer 5
multicast-policer 21
broadcast-policer 21
unknown-unicast-policer 21
}
}
forwarding-class fc6 {
policers {
unicast-policer 6
multicast-policer 22
broadcast-policer 22
unknown-unicast-policer 22
}
}
forwarding-class fc7 {
policers {
unicast-policer 7
multicast-policer 23
broadcast-policer 23
unknown-unicast-policer 23
}
}
forwarding-class fc8 {
policers {
unicast-policer 8
multicast-policer 24
broadcast-policer 24
unknown-unicast-policer 24
}
}
forwarding-class fc9 {
policers {
unicast-policer 9
multicast-policer 25
broadcast-policer 25
unknown-unicast-policer 25
}
}
}
}
Configuring ingress policer policies
Each policer policy specifies a policer ID (from 0 to 31), algorithm type (trtcm1 or trtcm2), and the following additional policer parameters:
- adaptation-rules: defines how individual configured values for PIR, CIR, EIR, MBS, EBS and CBS are mapped to hardware values: closest, lower, or higher
- committed-burst-size: defines the CBS in bytes. Note: When the trtcm1 algorithm is enabled, the system does not force the CBS value to be below the MBS value. CBS is a burst tolerance on CIR, which means that if the offered rate is smaller than the PIR but higher than the CIR, the CBS bucket depth is consumed, even if it is nominally larger than MBS.
- committed-rate-kbs: defines the CIR in kilobits per second
- excess-burst-size (trtcm2 only): defines the EBS in bytes
- excess-rate-kbs (trtcm2 only): defines the EIR in kilobits per second
- maximum-burst-size (trtcm1 only): defines the MBS in bytes
- packet-length-adjustment: defines what number of bytes to add to or subtract from the packet length for the policer calculation
- peak-rate-kbs (trtcm1 only): defines the PIR in kilobits per second
- pir-threshold-separation inplus-separated: determines whether the in-plus profile is defined for either PIR or EIR thresholds
-
statistics-mode:
-
extended (the only mode supported): counts forwarded packets/octets (accepted and exceeded) per profile and per policer. The discarded packets are accounted for at aggregate level per policer.
Whenever a new policer policy is assigned to a subinterface, all counters of policer instances using the given policer policy are reset.
-
-
violate-action: (applicable for either trtcm1 or trtcm2): defines the action for packets that violate the PIR (or EIR) of the policer: drop or mark-exceed.
Configure ingress policer policies using the qos policier-policies policer-policy command.
Configure ingress policer policy
The following example shows an ingress policer policy specifying the trctm2 algorithm, a violate action of mark-exceed, and in-plus pir-threshold-separation enabled.
--{ * candidate shared default }--[ ]--
# info qos policer-policies policer-policy policer-policy-test
qos {
policer-policies {
policer-policy policer-policy-test {
policer 0 {
algorithm-type trtcm2
excess-rate-kbps 8000000
excess-burst-size 180000
violate-action mark-exceed
statistics-mode extended
adaptation-rules {
excess-rate closest
excess-burst-size closest
}
pir-threshold-separation {
inplus-separated true
}
}
}
}
}
Configuring input class maps
Configure input class maps using the qos input-class-map command.
Configure input class map
The following example shows an input class map that maps a forwarding class to policers for unicast, multicast, broadcast, and unknown unicast traffic.
--{ +* candidate shared default }--[ ]--
# info qos input-class-map input-class-map-test
qos {
input-class-map input-class-map-test {
forwarding-class fc-test {
policers {
unicast-policer 0
multicast-policer 16
broadcast-policer 16
unknown-unicast-policer 16
}
}
}
}
Applying ingress policer policies and input class maps to a subinterface
Apply ingress policier policies and input class maps to a subinterface using the input-class-map and policer policies commands:
Apply ingress policer policies and input class maps to a subinterface
--{ +* candidate shared default }--[ ]--
# info qos interfaces interface eth-1/1.1 input
qos {
interfaces {
interface eth-1/1.1 {
input {
input-class-map input-class-map-test
policer-policies {
policer-policy policer-policy-test
}
}
}
}
}