FlowSpec
Support for BGP Flow-Specification Algorithm Version 7 and Later
Understanding BGP Flow Routes for Traffic Filtering
https://www.juniper.net/documentation/en_US/junos/topics/concept/flow-routes-understanding.html
1- Creat a policy
2- apply to BGP
set policy-options policy-statement NO-VALIDATION term 2 from protocol direct
set policy-options policy-statement NO-VALIDATION term 2 from route-filter 192.168.10.0/24 exact
set policy-options policy-statement NO-VALIDATION term 2 from route-filter 192.168.11.0/24 exact
set policy-options policy-statement NO-VALIDATION term 2 then accept
2- apply to BGP
MX:
set protocols bgp group internal type internal
set protocols bgp group internal description "MX to SRX"
set protocols bgp group internal local-address 192.168.231.2
set protocols bgp group internal family inet unicast
set protocols bgp group internal family inet flow no-validate NO-VALIDATION
set protocols bgp group internal export NO-VALIDATION
set protocols bgp group internal neighbor 192.168.231.1
set routing-options autonomous-system 65000
SRX:
set protocols bgp group internal type internal
set protocols bgp group internal description "SRX to MX"
set protocols bgp group internal local-address 192.168.231.1
set protocols bgp group internal family inet unicast
set protocols bgp group internal family inet flow no-validate NO-VALIDATION
set protocols bgp group internal export NO-VALIDATION
set protocols bgp group internal neighbor 192.168.231.2
set routing-options autonomous-system 65000