ROS V7 FILTER RULE

Dear ALL,

I’m migrating the routing rulte from ROSv6 to v7, i dont know how to re-write the reg exp, anyone can help?

ros v.6
if (bgp-as-path-slow-legacy “^111,222$”) { set bgp-local-pref 270; append bgp-communities 111:222; accept; }
if (bgp-as-path-slow-legacy “^111,222,([0-9]+)”) { set bgp-local-pref 270; append bgp-communities 111:222; accept; }

TungHo

bgp-as-path-slow-legacy has the same syntax as regexps in ROSv6, so the same regexp should work in ROSv7.

Yes, but i’m looking to use ROSv7.0 filter.

chain=AS-ISP1-Out prefix=202.73.32.0/19 prefix-length=19-24 bgp-communities=“” invert-match=no action=discard set-bgp-prepend-path=“” set-bgp-communities=“”

how to migrate to v7?

You can find examples on how to do this here:
https://help.mikrotik.com/docs/display/ROS/Moving+from+ROSv6+to+v7+with+examples#MovingfromROSv6tov7withexamples-RoutingFilters

and here, you can also find how to use new BGP as path matchers:
https://help.mikrotik.com/docs/display/ROS/Route+Selection+and+Filters