Community discussions

MikroTik App
 
hufhendr
just joined
Topic Author
Posts: 11
Joined: Wed Sep 07, 2022 10:27 pm

Let OSPF ignore the default route

Wed Sep 07, 2022 11:10 pm

Hi, I'm trying to get OSPF up and running
and would like to ask if I can somehow set it to ignore the default route and leave it as is.

Everything is between 2 routers, both connected to the internet, one has a DHCP address and this other one has a dynamic address via PPPoE. The OpenVPN server is running on this one. The first one is a client so I can easily set the route on the interface. For this server also, but after a connection failure the route disappears. Hence OSPF.
As you can see in the green entry, it works.
image.png
Unfortunately, OSPF also tries to create a new default route 2) via OpenVPN, which cuts a branch underneath itself, since everything is connected to the Internet via 1) Cetin PPPoE. So it gets into a cycle and keeps repeating.

I'd use Wireguard, but it only runs between 2 other routers in my current RouterOS v7.5 version, and I can't add a third.
Is there a way to set it to leave the default route albeit dynamic as is?
You do not have the required permissions to view the files attached to this post.
 
joegoldman
Forum Veteran
Forum Veteran
Posts: 766
Joined: Mon May 27, 2013 2:05 am

Re: Let OSPF ignore the default route  [SOLVED]

Thu Sep 08, 2022 2:16 am

I'm not sure I am understanding the problem, you are learning the OSPF route via the ovpn tunnel sure, but it comes at higher distance and is not currently Active in your screenshot, so shouldn't be getting used at all. Or does it sometimes become the active route?

Either way, you can filter out default route in ospf route filters (ospf-out) on the far end (or possibly on the ospf-in on local end)
 
hufhendr
just joined
Topic Author
Posts: 11
Joined: Wed Sep 07, 2022 10:27 pm

Re: Let OSPF ignore the default route

Thu Sep 08, 2022 7:03 pm

Great, thanks for the kick in the right direction, it led me to /routing/ospf/instance where I had all redistribute options enabled.
I left just static and it's working normally now.
/routing/ospf/instance> print 
Flags: X - disabled, I - inactive 
 0   name="default-v2" version=2 vrf=main router-id=192.168.7.1 redistribute=static

Who is online

Users browsing this forum: No registered users and 12 guests