Community discussions

MikroTik App
 
penwell
just joined
Topic Author
Posts: 1
Joined: Mon Jul 24, 2023 5:18 pm
Contact:

Version 7 BGP Filters Conversion

Mon Jul 24, 2023 5:26 pm

I have this this filter in version 6 called “BGP-OUT” which basically only sends out only my IP block to all my BGP peers and works perfectly. The question is now how do we create the same filter in version 7 which is a bit confusion on how to write the syntax. Below is my current filter in version 6

add action=accept chain=bgp-out prefix=123.123.123.0/24 prefix-length=24-32
add action=discard chain=bgp-out prefix=!123.123.123.0/24
 
g22113
just joined
Posts: 11
Joined: Sat Aug 19, 2017 3:21 pm

Re: Version 7 BGP Filters Conversion

Mon Jul 24, 2023 9:07 pm

Probably something like this:
add chain=foo rule="if (dst in 123.123.123.0/24 && dst-len in 24-32) { accept }"
# or?
add chain=foo rule="if (dst in 123.123.123.0/24 && dst-len >= 24) { accept }"
# although that seems to be redundant, you could probably just do
add chain=foo rule="if (dst in 123.123.123.0/24) { accept }"
# or if you want only the /24 exactly
add chain=foo rule="if (dst == 123.123.123.0/24) { accept }"
# finally
add chain=foo rule="reject"
https://help.mikrotik.com/docs/display/ ... -Operators

Who is online

Users browsing this forum: No registered users and 1 guest