I have two routers each connected to a different ISP. Router A acts as primary and Router B acts as secondary. Router A and Router B are not directly connected but are connected to boarders switches A and B that are interconnected. I want to use the ISPs in such a way that I will have automatic failover while at the same time being able to use them both. What is the best approach? Should I use BGP or will OSPF do?
the answer depends on what you get from the two ISPs:
if you get only two default routes you can simply have the two border routers to generate default routes in OSPF
router ospf 10
default-information originate route-map check_BGP
ip prefix-list only-default permit 0.0.0.0/0
route-map check_BGP permit 10
match ip address prefix-list only-default
set metric 50
set metric-type 1
if you receive specific routes in BGP and you want to have knowledge of this on core switches:
build an iBGP mesh with core switches acting as RR servers for the two border routers.
Hope to help