Customer might want to understand the expected behavior for FlowSpec after configuring the standard term-order.
routing-options {
flow {
term-order standard;
}
In case one BGP neighbor sends all types of traffic discard (or rate limiting) and redirects to the same prefix. What rule will be active?
When your router is configured to handle FlowSpec in the RFC-defined way using
The order of FlowSpec filter rules is determined by comparing their components as specified in section 5.1 of RFC 5575.
Here is a summary of the rule ordering:
Given this, if one BGP neighbor sends all types of traffic discard (or rate limiting) and redirects to the same prefix, the rule that will be active is determined by the above ordering algorithm. The specific rule that matches the traffic based on the lowest type, most specific prefix, or binary string comparison will be the one that is applied. In a scenario where multiple actions (discard, rate limiting, redirect) are specified for the same prefix, the order of the rules as determined by the RFC will dictate which rule is applied first.
By default, Junos OS does not follow the RFC-defined rule ordering. However, since you have configured the term-order standard, it will adhere to the RFC ordering.
For more detailed information on the BGP FlowSpec standard, you can refer to the RFC 5575 document: RFC 5575.
Additionally, you can find more information on how to configure BGP FlowSpec in the Junos OS in the Juniper TechLibrary: Juniper TechLibrary.