Community discussions

MikroTik App
 
shdwmstff
newbie
Topic Author
Posts: 48
Joined: Wed May 30, 2012 12:00 am

BGP Filter

Thu Jun 01, 2023 10:09 pm

Using a this on an IBGP peer
For Clarity
The IBGP-LOCAL-PREF-LIST has test ip range on it. 192.168.0.0/24
Filter script.
if (dst in IBGP-LOCAL-PREF-50-LIST) {set bgp-local-pref 51; set bgp-igp-metric 23; accept} else{accept}

ON the PEERED Router
The bgp-local-pref gets set to "51" as defined. SO that part of the script is correct.
The bgp-igp-metric doesn't get set to "23" though

any Ideas on why.. I have actually tried other properties but nothing gets set other than the first action.
Tried distance,bgp-weight is this because its an IBGP link not an external BGP peer?
Thanx
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 7038
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: BGP Filter

Thu Jun 01, 2023 10:19 pm

To clarify things, you are setting that in output and you expect that remote peer will somehow receive bgp-igp-metric?
 
shdwmstff
newbie
Topic Author
Posts: 48
Joined: Wed May 30, 2012 12:00 am

Re: BGP Filter

Thu Jun 01, 2023 10:34 pm

Yes, exactly this is an BGP output filter..
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 7038
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: BGP Filter

Thu Jun 01, 2023 10:39 pm

,,,
 
shdwmstff
newbie
Topic Author
Posts: 48
Joined: Wed May 30, 2012 12:00 am

Re: BGP Filter

Thu Jun 01, 2023 10:53 pm

Based on the Mikrotik docs I says that BGP-IGP-METRIC, along with scope,distance bgp-weight are writeable properties that can be used in filters like this.

Initially I just needed to adjust the bgp-local-pref, but wanted to ensure other options would be available later on.
So I am trying to get other properties to be passed.

Am I using this in the wrong way? (which may be the case) or I may have mis-interpreted the documentation.
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 7038
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: BGP Filter

Fri Jun 02, 2023 8:55 am

IGP metic is used only internally, it cannot be sent to remote peers.
 
shdwmstff
newbie
Topic Author
Posts: 48
Joined: Wed May 30, 2012 12:00 am

Re: BGP Filter

Fri Jun 02, 2023 1:54 pm

Ok. The docs don't give that much of an explanation on this.
What can be passed on an output filter other than bgp-local-pref ?
The "Writable Properties" section in the route filters section doesn't say which can or can't
Thanx
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 7038
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: BGP Filter

Mon Jun 05, 2023 9:51 am

Who is online

Users browsing this forum: No registered users and 19 guests