Page 1 of 1

ROS V7 FILTER RULE

Posted: Mon Jan 16, 2023 11:40 am
by TUNG0407
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

Re: ROS V7 FILTER RULE

Posted: Mon Jan 16, 2023 12:21 pm
by mrz
bgp-as-path-slow-legacy has the same syntax as regexps in ROSv6, so the same regexp should work in ROSv7.

Re: ROS V7 FILTER RULE

Posted: Mon Jan 16, 2023 12:53 pm
by TUNG0407
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.

Re: ROS V7 FILTER RULE

Posted: Tue Jan 17, 2023 11:50 am
by TUNG0407
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?

Re: ROS V7 FILTER RULE  [SOLVED]

Posted: Tue Jan 17, 2023 12:01 pm
by mrz
You can find examples on how to do this here:
https://help.mikrotik.com/docs/display/ ... ingFilters

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