Community discussions

MikroTik App
 
User avatar
loloski
Member
Member
Topic Author
Posts: 351
Joined: Mon Mar 15, 2021 9:10 pm

routing filter set administrative distance question

Mon Jan 15, 2024 3:22 am

We have a situation where our 2 edge router is both originating default route in OSPF domain we want to match the gateway and set appropriate distance just
like i shown below is this possible? it was not clear in the documentation how to use the "gw" or can it be used in OSPF context, thanks in advance

/routing filter rule
add chain=ospf-in \
rule="if (protocol ospf && dst-len == 0 && gw 192.168.110.1) {set distance -1; accept}"
rule="if (protocol ospf && dst-len == 0 && gw 192.168.110.2) {set distance -2; accept}"


edit: I solved this using gw==192.168.110.1

BR

Who is online

Users browsing this forum: No registered users and 2 guests