yes, u can redistribute static into bgp or use network 0.0.0.0 (must add 1 more command for this to work).
but the easiest way to send u default route via bgp is using neighbor x.x.x.x. default-originate.
and yes, u can use BGP to OSPF redistribution for BGP default route. use redistribute ospf x route-map name. route map will point to a prefix list which tells to permit only 0.0.0.0./0
or u could use default information originate in ospf.
get a lab and try it.
I have the sample config below to only allow the default route advertised by my ISP BGP peer. Does it seem correct?
I have default originate and route-map under my OSPF. Do I need both or just the BGP redistribution with route-map?
router ospf 1
network 10.200.0.0 0.0.255.255 area 0
redistribute bgp 100 metric 100 metric-type 1 subnets route-map BGP_DEFAULT_ROUTE
default-information originate metric 100 metric-type 1
router bgp 65002
bgp router-id 10.200.255.200
neighbor 10.200.125.100 remote-as 65001
network 10.200.0.0 mask 255.255.0.0
redistribute ospf 1
ip prefix-list BGP_DEFAULT_ACL seq 5 permit 0.0.0.0/0
ip prefix-list BGP_DEFAULT_ROUTE permit 10
match ip address prefix-list BGP_DEFAULT_ACL
there is small error ( or typo) ; can u see it ?
0/0 will come from bgp; then ospf will redistribute it down to others (likely internal network). default-information originate will advertise 0/0 only if 0/0 is in routing table. so u must redistribute it from bgp.
in case u want to have 0/0 always advertised, add default-information originate always -if bgp link fails, u still advertise o.o.o.o via ospf.
"default-information originate will advertise 0/0 only if 0/0 is in routing table. so u must redistribute it from bgp." So it looks like I need to remove my "default-information originate metric 100 metric-type 1" because I only want to advertise the default route that I redistribute from BGP to OSPF.
My firewall is advertising a default route via OSPF also but with E2. So I do not think I need the always because if BGP goes down then OSPF will take the other default route from the FW.
I do not see the typo by the way. Thanks
redistribute bgp 100 ? where u got ospf 100 from?
firewall ! where did he come from? if u have default router form firewall , then why u need ospf to send one as well?
u do not have to redistribute bgp static. 0/0 will come from bgp. i mean bgp will place 0/0 in RIB. and then use default-information originate under ospf to tell internal network. send traffic to me . so, to use internet , i send it to ospf router via ospf default, then ospf router will use bgp default to ISP CE.
Sorry it is REDISTRIBUTE BGP 65002.
My Internet traffic will take the MPLS as the primary link with the default route advertised by BGP. The FW default route is the back route. That is why I have redistribute the default route as OSPF E1 type so that it has higher preference over the E2 default route from the FW.
"u do not have to redistribute bgp static" so you are saying that I only need "default-information originate metric 100 metric-type 1" and not "redistribute bgp 65002 metric 100 metric-type 1 subnets route-map BGP_DEFAULT_ROUTE". Correct?