Community discussions

MikroTik App
 
User avatar
armandfumal
Member Candidate
Member Candidate
Topic Author
Posts: 159
Joined: Wed Apr 25, 2012 5:50 pm
Location: Weiswampach,LUX
Contact:

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=""

?
regards

Armand
 
User avatar
StubArea51
Trainer
Trainer
Posts: 1739
Joined: Fri Aug 10, 2012 6:46 am
Location: stubarea51.net
Contact:

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=""

Who is online

Users browsing this forum: No registered users and 26 guests