Community discussions

MikroTik App
 
johndjmix
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 60
Joined: Fri Aug 13, 2010 12:13 am

ospf allow default only!

Wed Jun 08, 2011 9:01 am

Hi, im trying to setup a route filter to allow only a default route to flow into my mikrotik from ospf:

#accept default route
add chain=ospf_only_def_in prefix=0.0.0.0/0 action=accept
#discard the rest
add chain=ospf_only_def_in action=discard

Then I set this as the in-filter in the OSPF instance. I disable then enable ospf.

Still i get all the routes.

So I tried removing the accept line, so everything should be discarded. Still get all the routes.

What am i missing here?

--John
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 7053
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: ospf allow default only!

Wed Jun 08, 2011 10:29 am

You can filter only external routes.
 
johndjmix
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 60
Joined: Fri Aug 13, 2010 12:13 am

Re: ospf allow default only!

Wed Jun 08, 2011 6:53 pm

external routes? External to what....as in a different OSPF area?

--John
 
fewi
Forum Guru
Forum Guru
Posts: 7717
Joined: Tue Aug 11, 2009 3:19 am

Re: ospf allow default only!

Wed Jun 08, 2011 7:30 pm

Routes external to any OSPF area in the OSPF domain. Routes that are redistributed from connected, static, another routing protocol, or another OSPF instance.

OSPF requires that all routers in an area have the same LSDB to run SPF on. If you filter LSAs then you violate that requirement.

You can summarize on area border routers, though. Maybe that will get you partially there? I don't use OSPF on RouterOS too much. Try summarizing to the default route - that might work, and does work with other vendors. Be aware that whenever you summarize an unreachable route for that destination is entered into the routing table, so make sure the ABR has a default route with a lower AD.
 
johndjmix
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 60
Joined: Fri Aug 13, 2010 12:13 am

Re: ospf allow default only!

Wed Jun 15, 2011 1:19 am

Ahh, got ya. Any idea on how to allow the mikrotik to accept 2 default routes...i.e. my borders are both advertising a default but the OSPF on the mikrotik seems to just use one, i was hoping i could get both to pop in there....

Or do I need to use 'mangle" to accomplish this?

--John
 
fewi
Forum Guru
Forum Guru
Posts: 7717
Joined: Tue Aug 11, 2009 3:19 am

Re: ospf allow default only!

Wed Jun 15, 2011 1:45 am

OSPF can accept more than one route. If only one is used it's because its cost is better. Make them equal cost by either making them type 2 with the same cost, or manipulating interface costs for type 1 external routes.
 
johndjmix
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 60
Joined: Fri Aug 13, 2010 12:13 am

Re: ospf allow default only!

Fri Jun 17, 2011 11:03 pm

fewi, want a job? In sunny NY? -))

Thanks again!

--John
 
johndjmix
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 60
Joined: Fri Aug 13, 2010 12:13 am

Re: ospf allow default only!

Fri Jun 17, 2011 11:16 pm

Took a look at it, both the ciscos pointing to the core (mikrotik) are configured the same:

router ospf 1
router-id 202.xxx.xx.1
log-adjacency-changes
network 0.0.0.0 255.255.255.255 area 0
default-information originate

router ospf 1
router-id 202.xxx.xx.2
log-adjacency-changes
network 0.0.0.0 255.255.255.255 area 0
default-information originate

The mikrotik is at 202.xxx.xx.13, and it refuses to see both default routes. It will only keep one. If i bring one router down the other route from the other router pops in. Both have a cost of "1" as shown in the OSPF route display in the mikrotik (Although, like i said only one is visable at a time).

Ideas? Thanks again....

--John
 
fewi
Forum Guru
Forum Guru
Posts: 7717
Joined: Tue Aug 11, 2009 3:19 am

Re: ospf allow default only!

Fri Jun 17, 2011 11:41 pm

Thanks, but Vegas is much sunnier :oP
http://wiki.mikrotik.com/wiki/Manual:IP ... .29_routes
OSPF is definitely eligible for ECMP. Can you post the LSAs from the Mikrotik router taken from "/routing ospf lsa print detail" (I think), if that's too much please filter it down to the relevant Cisco peers.
 
johndjmix
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 60
Joined: Fri Aug 13, 2010 12:13 am

Re: ospf allow default only!

Mon Jun 20, 2011 10:05 am

fewi: Got the setup complete tonight on my test network. Shut one of the border routers off. About 2.5 minutes later, my test machine was back online. Worked perfectly! Thanks a million times man. Both tik's are seeing 2 defaults (Dont really know what that started working but it did.

If you ever need colo let me know, ill hook you up big time. Or....ubiquiti help..I have a lot of their equipment and am very active over in that forum.

--John

Who is online

Users browsing this forum: No registered users and 36 guests