Description

Customer might want to understand the expected behavior for FlowSpec after configuring the standard term-order.

 

routing-options {

flow {

term-order standard;

}

}

 

 

Symptoms

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 

 

routing-options {

flow {

term-order standard;

}

}

 

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:

 

  1. Type Comparison: The algorithm starts by comparing the left-most component of each NLRI (Network Layer Reachability Information). If the types differ, the lowest type (by numeric value) is used. If they are the same, then the values within that component are compared.
  2. IP Prefix Values: For IP prefix values (types 1 (Destination Prefix), 2 (Source Prefix), and 3 (IP Protocol) ), the lowest IP is chosen. If the IP addresses are the same, the most specific prefix is used.
  3. Binary String Comparison: For all other types, the binary string of the contents is compared to determine the order.

 

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.

 

Solution

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.

 

The order of FlowSpec filter rules is determined by comparing their components as specified in section 5.1 of RFC 5575.

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.

Modification History

2024-09-25 : Article Created