I have to make sure that the loopback interface of R1(22.214.171.124/32) is learnt on R2 but with a few constraints.
Step1: The loopback of R1 is learnt in global routing table of R2 via ospf
Step2: R2 and R3 are ebgp neighbors for address-family ipv4 (on interface f0/2--which is in global routing table) and address-family ipv4 vrf (on interface f0/1 which is part of vrf TEST on both R2 and R3)
Step3: At R2, I redistribute the ospf learnt routes to BGP (ipv4 address-family).
Step4: R3 learns the bgp routes from R2 via ebgp (with a next hop of 126.96.36.199) in global routing table.
Step5: At R3, I do a route-leaking from the bgp ipv4 address family to bgp vpnv4 vrf TEST address family for 188.8.131.52/32
So, R3 has a route to 184.108.40.206/32 in vrf TEST with a next hop of 220.127.116.11 (which is in global routing table)
Step 6: R2 learns again the 18.104.22.168/32 route via ebgp address-family ipv4 vrf TEST with a next hop of 22.214.171.124
Now my objective is to make sure R2 can ping the 126.96.36.199/32 via the vrf TEST(but as expected it fails)
Any suggestions on how to get the above scenario working. (One of the ways,this can be done is to configure the interface f0/2 on both R2 and R3 as below:
int f0/2 ip vrf receive TEST