can't change bgp-local-pref after update 6.32 > 6.35.4

I have a problem with routing filters after upgrade x86 from 6.32 to 6.35.4, before update everything works fine.
I filter all prefix from AS, my filter look like this:

;;; ASXXXX7 Comment
     chain=OP1-IN protocol=bgp bgp-as-path=XXXX7$ invert-match=no action=accept 
     set-bgp-local-pref=300

But now, after update the same filters doesn’t work, i set set-bgp-local-pref=300 but still is 100:

/ip route print detail where received-from=OP1 dst-address=91.XXX.XXX.X/23
Flags: X - disabled, A - active, D - dynamic, 
C - connect, S - static, r - rip, b - bgp, o - ospf, m - mme, 
B - blackhole, U - unreachable, P - prohibit 
 0 ADb  dst-address=91.XXX.XXX.X/23 gateway=89.XX.XX.X 
        gateway-status=89.XX.XX.X reachable via  ether8 distance=20 scope=40 
        target-scope=10 bgp-as-path="XXX8,XXX7" bgp-local-pref=100 bgp-origin=igp 
        bgp-communities="" received-from=OP1 

Maybe syntax will change or something… Please help.

Try disabling then enabling the routing filter.

There is a well known bug in RouterOS v6 where the filters sometimes are not actioned.

Failing the above, try moving the filters order, then moving it back.


It seems crazy, but it often works! :slight_smile:

  1. Moving up and down the list filter doesn’t help , still bgp-local-pref is not 300 :
/ip route print detail where received-from=OP1 dst-address=91.XXX.XXX.X/23
Flags: X - disabled, A - active, D - dynamic, 
C - connect, S - static, r - rip, b - bgp, o - ospf, m - mme, 
B - blackhole, U - unreachable, P - prohibit 
 0 ADb  dst-address=91.XXX.XXX.X/23 gateway=89.XX.XX.X 
        gateway-status=89.XX.XX.X reachable via  ether8 distance=20 scope=40 
        target-scope=10 bgp-as-path="XXX8,XXX7" bgp-local-pref=100 bgp-origin=igp 
        bgp-communities="" received-from=OP1 
  1. Removing and add new filter doesn’t help
  2. Disable/enable filters and still the same :frowning: Just can’t change any value.
    Not work but i’m sure work before update prepend, and local preference, med and community :frowning:

How to fix it ?

Deleting all routing filters and adding all over again helps.
But only for 10 minutes :frowning: , now all routing filters are ignored again.

Export the entire filters chain and post it here.
/routing filter export compact

(for readability, delete any rules that aren’t in the OP1-IN chain or any chain that OP1-IN jumps into)

It sounds like some earlier rule in the chain might be matching your target prefix and causing the chain to finish processing before reaching the local_pref rule.

Also - is OP1 a transit provider, or a peer (such as an IX), or a customer? The design of the filter chain can take different forms based on the answer to this question - for instance, a “Default-accept” behavior is fine and dandy for a transit provider, but highly-inadvisable on a customer link.

Do you have more rules like that?
I notice you use action=accept in the rule, when there are other rules like that it will not reach your filter.
Best practice is to separate rules that do something like local-pref modification, and use action=passthrough
with those rules, putting them at the top. Then follow your rules that limit e.g. the network ranges and
use action=accept or action=discard with those.

I am using BGP with route filters that set bgp-local-pref after matching a community value, and it works OK.

Edit: what ZeroByte wrote a few minutes ago is essentially the same.