There are two options to leak routes between VRF's:
1) auto export
2) Rib groups
Easiest one is auto export
Here is the link for the same:
http://www.juniper.net/techpubs/en_US/junos12.3/information-products/topic-collections/nce/auto-export-understanding/auto-export-understanding.pdf
Basically you have to add auto-export knob in both vrf under vrf x routing-options and also have a common route target
between both VPN's in addition to their own/native unique route targets.
You can export/import route targets via policy something like
VPNA {
instance-type vrf;
interface ge-4/0/1.35;
interface ge-2/1/1.70;
route-distinguisher 7777:1111;
vrf-import import-vpn-a
vrf-export export-vpn-a
routing-options {
auto-export
}
VPNB {
instance-type vrf;
interface ge-1/1/1.40;
interface ge-3/2/2.50;
route-distinguisher 7777:2222;
vrf-import import-vpn-b
vrf-import export-vpn-b
routing-options {
auto-export
}
VPN A route-target policy :
vrf import:
policy-options{
policy-statement import-vpn-a {
term 1 {
from {
protocol bgp ;
community vpn-a;
}
then {
accept;
}
}
}
community vpn-a member target:7777:1111;>>>>vpn-a native rt
community vpn-a member target:4:4;>>common rt for both vpn
vrf-export:
policy-options{
policy-statement export-vpn-a {
term 1 {
from {
protocol [bgp direct];
}
then
{
community add vpn-a;
}
}
}
VPN B route-target policy :
vrf import:
policy-options{
policy-statement import-vpn-b {
term 1 {
from {
protocol bgp ;
community vpn-b;
}
then {
accept;
}
}
}
community vpn-a member target:8888:2222;>>>>vpn-B native rt
community vpn-a member target:4:4;>>common rt for both vpn
vrf-export:
policy-options{
policy-statement export-vpn-b {
term 1 {
from {
protocol [bgp direct];
}
then
{
community add vpn-b;
}
}
}