Community discussions

MikroTik App
 
User avatar
BrateloSlava
Member Candidate
Member Candidate
Topic Author
Posts: 168
Joined: Mon Aug 09, 2021 10:33 am
Location: Ukraine, Kharkiv

How to filter routes that are advertised via OSPF?

Sun Jul 03, 2022 10:42 am

There are several networks, that are connected via L2TP/SSTP/IPIP/etc. OSPF configured. ROS 7.3.1 Everything is fine. Some routers redistribute their static routes.

Question: how can I set up filtering of these advertised routes on some routers?

For example: there is a router R1 that redistributes routes to addresses 1.1.1.1, 2.2.2.2, 3.3.3.3. And there is a router R2 that does not need such routes through R1 to 1.1.1.1 and 2.2.2.2.

On R2 tried to filter:
/routing filter rule add chain=ospf-in comment="Test block" disabled=no rule="if ( protocol ospf && dst in 1.1.1.1 ) { reject }"
But such a filter generally breaks the entire OSPF on this router.
 
paolobyte
newbie
Posts: 28
Joined: Wed Apr 05, 2017 6:00 am

Re: How to filter routes that are advertised via OSPF?

Sun Jul 03, 2022 4:50 pm

I'm curious.. How does it "break" ospf? Does adjacency drop? Or just all OSPF routes disappear?
 
User avatar
BrateloSlava
Member Candidate
Member Candidate
Topic Author
Posts: 168
Joined: Mon Aug 09, 2021 10:33 am
Location: Ukraine, Kharkiv

Re: How to filter routes that are advertised via OSPF?

Sun Jul 03, 2022 5:52 pm

I'm curious.. How does it "break" ospf? Does adjacency drop? Or just all OSPF routes disappear?
Special for you. :D
Before.png
After.png
You do not have the required permissions to view the files attached to this post.
 
aleksis
newbie
Posts: 25
Joined: Wed Apr 30, 2014 12:13 pm

Re: How to filter routes that are advertised via OSPF?  [SOLVED]

Mon Jul 04, 2022 11:25 am

Filter default action is 'reject'.
rule="if ( protocol ospf && dst in 1.1.1.1 ) { reject } else { accept }"
 
User avatar
BrateloSlava
Member Candidate
Member Candidate
Topic Author
Posts: 168
Joined: Mon Aug 09, 2021 10:33 am
Location: Ukraine, Kharkiv

Re: How to filter routes that are advertised via OSPF?

Mon Jul 04, 2022 2:12 pm

It's really simple... Thank you.

Who is online

Users browsing this forum: No registered users and 15 guests