I have a MPLS network running BGP redistributing into OSPF as external type 2 routes. I am setting up a DMVPN over DSL as secondary. They come in as inter area routes so are always preferred. I even placed a higher cost on the interface connecting to the DMVPN Hub. I also tried changing the administrative distance for external routes to 105, which would be less than the inter area, but neither worked...
Anyone have any ideas how I can prefer the MPLS links over the inter area DMVPN links?
OSPF uses its own hierarchy of route types to choice the best path:
O > O IA > O E1 > O E2.
If the routes come in as O IA routes, that is remote site DMVPN routers are ABR if your addressing plan permits it you should summarize at area border with
area x range 10.10.10.0 255.255.254.0.
If this is not possible you need to:
use O E1 type for primary MPLS redistribution into primary OSPF process
use a secondary OSPF process for the DMVPN cloud that you redistribute in primary OSPF process as O E2.
Because O E1 are preferred over O E2 you should be fine.
You may need some form of route tagging and route tags based filtering for safety.
Hope to help