Page 1 of 1
ospf allow default only!
Posted: Wed Jun 08, 2011 9:01 am
by johndjmix
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
Re: ospf allow default only!
Posted: Wed Jun 08, 2011 10:29 am
by mrz
You can filter only external routes.
Re: ospf allow default only!
Posted: Wed Jun 08, 2011 6:53 pm
by johndjmix
external routes? External to what....as in a different OSPF area?
--John
Re: ospf allow default only!
Posted: Wed Jun 08, 2011 7:30 pm
by fewi
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.
Re: ospf allow default only!
Posted: Wed Jun 15, 2011 1:19 am
by johndjmix
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
Re: ospf allow default only!
Posted: Wed Jun 15, 2011 1:45 am
by fewi
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.
Re: ospf allow default only!
Posted: Fri Jun 17, 2011 11:03 pm
by johndjmix
fewi, want a job? In sunny NY? -))
Thanks again!
--John
Re: ospf allow default only!
Posted: Fri Jun 17, 2011 11:16 pm
by johndjmix
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
Re: ospf allow default only!
Posted: Fri Jun 17, 2011 11:41 pm
by fewi
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.
Re: ospf allow default only!
Posted: Mon Jun 20, 2011 10:05 am
by johndjmix
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