I would like to filter prefixes not belonging to my own AS to external peers (to prevent IP-transit between them). Usually you can do this based on the AS path by matching the empty path (output filter rule). This works fine (ROS 6):
Code: Select all
/routing filter
add action=accept bgp-as-path="^\$" chain=TEST-OUT
add action=discard chain=TEST-OUT
Code: Select all
/routing/filter/rule
add chain=TEST-OUT disabled=no rule="if (bgp-as-path ^\$) {accept}"
add chain=TEST-OUT disabled=no rule=reject
Best Regard,
Heino