Community discussions

MikroTik App
 
User avatar
nickb
Member
Member
Topic Author
Posts: 406
Joined: Thu Jan 26, 2006 6:24 pm
Location: Southeast Kansas
Contact:

OSPF: Is it possible to originate a default route?

Wed Aug 08, 2012 9:23 am

Is it possible to originate a default route with OSPF? Note that I DO NOT mean "redistribute".

In the network, there are two edge routers which receive a default route from their BGP peers; one is primary and the other is failure-only redundancy. The rest of the network communicates routing with OSPF.

If I set "redistribute default route always as type 1" in the backup router, the default route from OSPF in the backup router disappears, the BGP route takes over as the default route, and the other routers on the network completely lose their default routes.

Setting "redistribute BGP routes" doesn't seem to do anything. I think this is because the BGP route has a lower weight, it is highlighted in blue: I suspect that means it won't redistribute that route.

What I would like to see happen is, on my router with the backup link to simply inject a route for 0.0.0.0/0 with a very low priority (e.g. 254). Is this possible? It doesn't seem to be according to the documentation, but I may have missed something.

In this way, the primary router would get all traffic, unless it goes down or the BGP link is lost, in which case it will stop announcing default route. When this happens, all other routers would have a fallback default route to use.
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 7053
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: OSPF: Is it possible to originate a default route?

Wed Aug 08, 2012 9:44 am

OSPF can always advertise route with distribute-default=always-as-type-x

Currently it is not possible to redistribute default route received from BGP, even if it is active.
 
User avatar
nickb
Member
Member
Topic Author
Posts: 406
Joined: Thu Jan 26, 2006 6:24 pm
Location: Southeast Kansas
Contact:

Re: OSPF: Is it possible to originate a default route?

Wed Aug 08, 2012 7:55 pm

OSPF can always advertise route with distribute-default=always-as-type-x

Currently it is not possible to redistribute default route received from BGP, even if it is active.
When I enable that setting, my network goes stupid.

On the router that the setting is enabled, the default route learned from the primary gateway (via OSPF) is removed, and the BGP route takes over as default.

All other routers on the OSPF network completely lose their default route.
 
User avatar
StubArea51
Trainer
Trainer
Posts: 1739
Joined: Fri Aug 10, 2012 6:46 am
Location: stubarea51.net
Contact:

Re: OSPF: Is it possible to originate a default route?

Fri Aug 10, 2012 7:10 am

When you originate a default route in OSPF, it is treated as a redistributed route and send as a Type 5 External LSA. This means it will appear throughout the entire OSPF domain. If you choose Type-1, it will increment the cost from the ABR (the router that originates it) as it is advertised through the network. If you choose Type-2, it will advertise a fixed metric regardless of the distance from the ABR.

If you don't want BGP to advertise a default route and let OSPF take care of that, then filter out the default route in the BGP advertisement.
 
User avatar
nickb
Member
Member
Topic Author
Posts: 406
Joined: Thu Jan 26, 2006 6:24 pm
Location: Southeast Kansas
Contact:

Re: OSPF: Is it possible to originate a default route?

Fri Aug 10, 2012 6:46 pm

When you originate a default route in OSPF, it is treated as a redistributed route and send as a Type 5 External LSA. This means it will appear throughout the entire OSPF domain. If you choose Type-1, it will increment the cost from the ABR (the router that originates it) as it is advertised through the network. If you choose Type-2, it will advertise a fixed metric regardless of the distance from the ABR.
OK, I understand that's what's supposed to happen. However that is *not what happened*

What actually happened is that all of the default routes were completely lost - I'm sure you can agree that's entirely different than having the additional route appear.
 
User avatar
nickb
Member
Member
Topic Author
Posts: 406
Joined: Thu Jan 26, 2006 6:24 pm
Location: Southeast Kansas
Contact:

Re: OSPF: Is it possible to originate a default route?

Fri Aug 10, 2012 7:06 pm

OSPF can always advertise route with distribute-default=always-as-type-x

Currently it is not possible to redistribute default route received from BGP, even if it is active.
The first time I read and replied to your post, the part about not redistributing the default from BGP didn't sink in. Pretty important thing to miss @_@.

Interesting, since these IP's are static and stable, I could just add a static route for it with a lower weight and redistribute that.
 
User avatar
nickb
Member
Member
Topic Author
Posts: 406
Joined: Thu Jan 26, 2006 6:24 pm
Location: Southeast Kansas
Contact:

Re: OSPF: Is it possible to originate a default route?

Sat Aug 11, 2012 7:02 am

OSPF can always advertise route with distribute-default=always-as-type-x

Currently it is not possible to redistribute default route received from BGP, even if it is active.
The first time I read and replied to your post, the part about not redistributing the default from BGP didn't sink in. Pretty important thing to miss @_@.

Interesting, since these IP's are static and stable, I could just add a static route for it with a lower weight and redistribute that.
I didn't quite think that all the way through.... Maybe why I skipped over it the first time is because my primary router is redistributing the default route received from BGP, which you say is not 'currently' possible - though I suppose it could be because that router is running 3.30, so it's a little less than 'current' :).
 
User avatar
StubArea51
Trainer
Trainer
Posts: 1739
Joined: Fri Aug 10, 2012 6:46 am
Location: stubarea51.net
Contact:

Re: OSPF: Is it possible to originate a default route?

Sat Aug 11, 2012 5:33 pm

Does the default route you are trying to redistribute show up in the LSAs for OSPF? If it is in the LSAs but not in the routing table, then something is preventing it from becoming the best route for network 0.0.0.0/0 -likely a metric. Can you post the LSAs and the routing table for one of the routers this is happening to?

Who is online

Users browsing this forum: No registered users and 12 guests