Community discussions

MikroTik App
User avatar
Member Candidate
Member Candidate
Topic Author
Posts: 125
Joined: Wed Apr 25, 2012 5:50 pm
Location: Huldange,LUX

BGP filter

Thu Aug 01, 2013 1:53 pm

Hi all,

How to set localpref for prefixe coming from AS9269 coming from a carrier

chain=BGP-IN bgp-as-path=9269 invert-match=no action=accept set-bgp-local-pref=105 set-bgp-prepend-path=""


Armand Fumal
MikroTik & Ubiquity
User avatar
Posts: 1189
Joined: Fri Aug 10, 2012 6:46 am
Location: Jackson, MS, USA

Re: BGP filter

Fri Aug 02, 2013 4:34 pm

Take a look at POSIX REGEX for matching on an AS PATH. The underscore will match any AS in the path and the $ signals the end of the string. Haven't tried this particular REGEX in Mikrotik, but it is valid POSIX and works in Cisco with no issue - let us know how it goes!

ros code

chain=BGP-IN bgp-as-path="_9269\$" invert-match=no action=accept set-bgp-local-pref=105 set-bgp-prepend-path=""
Global - MikroTik Support & Consulting - English | Francais | Español | Portuguese +1 855-645-7684 ... l-support/

Who is online

Users browsing this forum: No registered users and 13 guests