This document shows how to redistribute Internal BGP routes into OSPF process. Like in other IGP to IGP redistribution the behavior is different when redistributing IBGP into OSPF. IBGP learned routes are not forwarded to an IGP routing protocol through the redistribute command. Use command “bgp redistribute-internal” under the BGP process on the redistributing router.
In the scenario depicted here, router R1 and R2 are running IBGP and router R2/R3 running OSPF Area 0. R1 is advertising two routes (184.108.40.206 /32 and 172.16.0.0 /16) through network command. R2 is redistributing BGP into OSPF area 0. It is required to redistribute selected internal routes (172.16.0.0 /16). The task is achieved by making use of prefix-list and route-map.
A prefix-list, named B2O, is configured on R2 to match the prefix 172.16.0.0
ip prefix-list B2O seq 5 permit 172.16.0.0/16
A route-map, named BGP-To_OSPF, is configured on R2
route-map BGP-To_OSPF permit 10
match ip address prefix-list B2O
In the vrification section, please check the output of "show ip route" command on R3.