To allow OSPF route exchange between a specified VRF on a PE router and its associated CE router, the VRF must be enabled to redistribute OSPF routes. To enable the VRF VPN1 on PE 1 router in OSPF to CE network example to redistribute OSPF routes, enter the following commands.
device(config-bgp)# address-family ipv4 unicast vrf VPN1 device(config-bgp-ipv4u-vrf)# redistribute ospf match internal device(config-bgp-ipv4u-vrf)# redistribute ospf match external1 device(config-bgp-ipv4u-vrf)# redistribute ospf match external2