You can redistribute default route from EBGP into OSPF, but you should form IBGP neighbor between your uplinks routers and either use local preference or AS_Path to control the the outbound traffic, Below simple setup for this
ISP ISP
|(BGP) |(BGP)
R1 R2
|----(my_network/cloud)-----|
R1 ------ IBGP ------------- R2
R1 ------ OSPF ------------- R2
The scenario will be like this:
R1 receive default in EBGP from ISP 1 and redistribute it into OSPF
As EBGP AD is 20 R1 will install default route from EBGP and keep the redistributed default in the OSPF DB, R2 will receive default from ISP also here you need to modify either set local preference on R1 to ensure all your traffic will go via R1 or Prepend your ISP AS to the incoming default route from the ISP like
route-map FromISP permit 10
match ip address 1
set as-path prepend ISPAS ISPAS ISPAS
router bgp xxx
neighbour xxxx remote-as xxx
neighboor xxx route-map FromISP in
Now your are receiving 2 Default in 2 routers each router will receive 2 default one from the ISP directly (EBGP) and one from the IBGP neighbour.
Depending on the AS_Path length the router will decide to install one of these defaults routes, R1 will install the one that came from the EBGP because AS-Path length is shorter than that received from the IBGP, R2 will install the default that came from IBGP in the BGP table because it's the AS_Path shorter but will not use it like R1. Why? Because IBGP Administrative distance is 200, OSPF 110 for summary:
R1 - have 3 Default routes : 1 EBGP 1 IBGP 1 OSFP (redistributed from BGP)
- Routing table of BGP will install the one from EBGP , shorter AS path.
- Routing table of R1 will install the default from EBGP because AD = 20
R2 - have 3 Default routes : 1 EBGP 1 IBGP 1 OSFP (redistributed from BGP)
- Routing table of BGP will install the one from IBGP , shorter AS path.
- Routing table of R2 will install the default from OSPF because AD = 110
Hope this will help to understand