Skip to main content

BGP FlowSpec

BGP FlowSpec advertises traffic filtering and handling rules through BGP. In Peresvet ST, FlowSpec rules are defined within a BGP session. They let you verify how equipment accepts rules matching destination/source, protocol, ports, ICMP, TCP flags, packet length, DSCP, and fragmentation.

Table 223 — BGP FlowSpec Parameters

NameDescriptionValue
RuleIndividual FlowSpec ruleAdd one or more rules
AFIRule address familyIPv4 or IPv6
ComponentsMatch components in the ruleAdd destination, source, protocol, ports, and other conditions
AND with previousLogical relationship to the previous componentEnable when multiple conditions must apply together
OperatorComparison operator==, !=, <, >, <=, >=
ValueComparison valueCIDR for source/destination; a number for other types

Table 224 — BGP FlowSpec Component Types

TypePurposeExample value
destinationDestination prefix10.10.0.0/16
sourceSource prefix192.0.2.0/24
protocolIP protocol number6 for TCP, 17 for UDP
destination-portDestination port443
source-portSource port1024
icmp-typeICMP type8 for echo request
icmp-codeICMP code0
tcp-flagsTCP flagsNumeric flag value
packet-lengthPacket lengthFor example, 1500
dscpDSCPFor example, 46 for EF
fragmentFragmentation attributeNumeric component value

Before starting, make sure that the BGP session has negotiated the FlowSpec address family and that the DUT supports the selected FlowSpec type. After starting, verify that the BGP peer has accepted the rules and applied them to the intended traffic. For a safe initial test, use narrow prefixes and a small number of rules.