Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

per-route-accounting

Syntax

Hierarchy Level

Description

Typically, in the BGP FlowSpec filter, an individual counter was added for each FlowSpec term configured. As part of optimization to FlowSpec, starting from Junos OS Evolved Release 21.1R1 this behavior is changed, and counter action is not added by default. We now support a higher scale of flows in BGP FlowSpec filter. You can achieve this by reducing the number of terms in the BGP FlowSpec filter using the filter optimization techniques without affecting the functionality. The per-route-accounting is not configured by default. To create room for term compression, the default per-term counters are disabled. However, to enable per-term counter a new CLI command, per-route-accounting has been introduced under the existing [edit routing-options-flow] hierarchy level.

The new algorithm used for term compression does not need branching.

Algorithm for Term Compression

Consider the current term and the next term, if these two terms are capable of being merged (see "Term merging conditions" section), merge these two terms.

If the two terms are merged, use the merged term as the current term and repeat this process.

If the two terms cannot be merged, use the consecutive next term as the current term and repeat this process.

Term merging conditions: Case 1

  1. Both the terms have same set of actions.

  2. Both the terms have same type and same number of match conditions.

  3. If there are ’n’ match conditions, at least ’n-1’ match conditions must have identical values.

  4. In a term, maximum 1 match can have non-identical values. And the values of this match from the second term can be merged with the corresponding values in the first term.

  5. The second term will be eliminated if it is merged.

Example

Term merging conditions: Case 2

  1. For every match in first term there should be a corresponding match of same type in second term.

  2. All the match conditions in the first term have values which are identical to or superset of the values present in the corresponding match in the second term.

  3. The match conditions present in first term fully covers the corresponding matches in the second term. Hence the second term will not get hit. So, that leads to:

    1. The second term can have additional match conditions of different type.

    2. The action present in second term need not match with that of first term.

  4. If the above conditions are satisfied, then the second term will be eliminated.

Example

Required Privilege Level

routing—To view this statement in the configuration.

routing-control—To add this statement to the configuration.

Release Information

Statement introduced in Junos OS Evolved Release 21.1R1.