Network routed with OSPF with 2 default routes

Hello,

I have a network, routed with OSPF, I have 2 routers with separate internet connection. I want to have failover, if one internet is down, then to access it through second internet.

I have enabled distribute-default if-installed-as-type-2 on each router, set cost to prefer the primary internet and enabled ping of gateway.

Everything is working in first hour, if I disconnect the primary, then everywhere on the network the default route changes to backup. But after approximately on hour more, If I do the same, the default to primary disappears from routing table and the backup way does not appear and the network is without internet.

This happens even in case I switch secondary internet router to act as primary by changing the COST.

If I look into OSPF LSA, i see there the default route of the backup, but it is not transfered to ROUTING table.

ROS v 4.16

Any idea what to do?

Upgraded to 5beta all routers and remains the same, route in LSA, not in route table, if main route fails, there is no default in routing table.

I’ve the same issue. It will install if i disable the redistribuite and enable right after.

Me too. I thought I was doing something wrong. Maybe a bug?

Maris suggested me to upgrade to 5.x there are fixes on route selection.
I will upgrade soon

If anyone can repeat the same problem on version 5 please contact supports.

Hi,

I have been seeing this problem with version 5.14. Primary router and backup routers injecting into OSPF type 2 default routes, learned by BGP. OSPF inject default metrics are 1 and 20 respective to the primary and backup routers. The other routers within the OSPF area will not receive a default-information-originate from either of the two routers after a router were to drop off (from a power outage as an example).

To clarify, it is the other routers in the OSPF area (non-BGP routers) that are no longer receiving a default route.

First experienced with version 3.14. Upgraded to latest to try to resolve this issue but still seeing this occur.

Gabe

This problem is still actual on MT RB1100AHx2, v5.22

We are seeing this same issue.

Has anyone solved it???

I think they are planning to fix this in RouterOS 7.x. I have a flakey BGP transit provider who takes down half my network at least once per month when the BGP peering session drops or the default route is withdrawn. I moved to 6.x because it was supposed to be better. Maybe it is, maybe my flakey peer is getting better, but we still get bitten by this issue.

ROS 6.x fixed my issue

I am having this issue as well.

Here is my setup. I have three Mikrotik RB450G routers. Two are acting as “Edge” routers for peering using BGP, and the third is connected to the first two using OSPF.

Router 1 (Connects to Primary Provider):
Running ROS 5.24
BGP to Provider 1 (Receives a Default Route Only)
OSPF to Router 2 (OSPF Redistribute Default Route: if installed (as type 1))

Router 2:
Running ROS 5.22
OSPF to Router 1
OSPF to Router 3 (Manual OSPF cost of 100 on interface, so the incoming default route will be a last resort in the routing table)
Also, OSPF to many other OSPF routers on our network (provides them with the default route using OSPF)

Router 3 (Connects to Backup Provider):
Running ROS 5.24
BGP to Provider 2 (Receives a Default Route Only)
OSPF to Router 2 (OSPF Redistribute Default Route: if installed (as type 1))

No secondary routing tables are in use (just the one main routing table). Only a single OSPF area and a single OSPF instance are used. OSPF adjacencies are stable between routers.


Everything works as expected. I can add subnets and routes all day long and everything propagates throughout the entire network as expected.

The exception to this is the default route:
Router 2 can see the default route LSA’s from Router 1 and Router 3 correctly. The LSA from Router 1 has a lower metric, so it’s used in the routing table (correctly). However, if I remove Router 1’s BGP session, and therefore the default route it was sending to Router 2, Router 2 doesn’t switch over and use the high-cost backup default route provided by Router 3. Even though the default route LSA from Router 3 exists in the LSA table of Router 2. And Router 2 now doesn’t have any default route in it’s routing table (and the internet goes down for R2 and any downstream devices).

I’ve been reading up on v6, but it seems like there are many bugs that are unresolved still. ROS 5.2x is working extremely well for us, with the exception of this single issue. So I’m not inclined to upgrade the RB450G’s to ROS v6 since it may very well introduce new bugs.

Minimization of downtime is a must for us. Having a redundant default route is critical.

What can I do?

I would like to add: this isn’t a consistent issue. It’s difficult to reproduce. I can disable BGP peers on Router 1 and Router 3 (which removes the default route from being advertised) and it works perfectly (the default route on Router 2 fails over to the remaining route).

I believe this may be an issue related to the OSPF daemon being changed after the BGP default route was learned. It appears as though at times Router 1 or Router 3 will stop advertising a default route to Router 2, even though it has a working BGP peer and is receiving a default route. As such, when the other edge router has a BGP failure, we have lost all default routes in Router 2. I can reproduce this if I change a setting on the OSPF instance on Router 1 or Router 3. I have to restart the BGP session in order for OSPF to redistribute the default route. Otherwise the default route is in the routing table, but OSPF won’t distribute it out.

Is there a way to make OSPF distribute the default route if it’s already been learned by the router when the OSPF process starts?