I'm peering with an other AS in vrf, and when I tried to redistribute the routes to bgp-vpls-vpn, it became unreachable, look like not doing recursive calculation.
/routing/route> print detail where 172.20.19.81 in dst-address
Flags: X - disabled, F - filtered, U - unreachable, A - active;
c - connect, s - static, r - rip, b - bgp, n - bgp-net, o - ospf, i - isis, d - dhcp, v - vpn, m - modem, a - ldp-address, l - ldp-mapping, g - slaac, y - bgp-mpls-vpn, e - evpn;
H - hw-offloaded; + - ecmp, B - blackhole
Ab afi=ip contribution=active dst-address=172.20.19.64/27 routing-table=dn42 gateway=172.20.19.81@dn42 immediate-gw=172.20.19.81%dn42.routebits distance=20 scope=40 target-scope=30
belongs-to="bgp-IP-172.20.19.81@*1" rpki=valid
bgp.session=dn42.routebits.v4-1 .aggregator="4242420207:172.20.19.81" .as-path="4242420207" .communities=64511:51
.large-communities=4242420207:120:18,4242420207:140:51,4242423077:1:52,4242423077:1:1344 .weight=8000 .med=0 .atomic-aggregate=yes .origin=igp
debug.fwp-ptr=0x20444660
As afi=ip contribution=active dst-address=172.20.19.81/32 routing-table=dn42 gateway=dn42.routebits@dn42 immediate-gw=dn42.routebits distance=1 scope=30 target-scope=10 vrf-interface=dn42
belongs-to="static"
debug.fwp-ptr=0x204421E0
Uy afi=vpnv4 contribution=unreachable dst-address=172.20.19.64/27&65000:4242423077 routing-table=main label=1224 gateway=172.20.19.81@dn42 distance=200 scope=40 target-scope=10
belongs-to="dn42-bgp-IP-172.20.19.81@*1-export"
bgp.session=dn42.routebits.v4-1 .aggregator="4242420207:172.20.19.81" .as-path="4242420207" .communities=64511:51 .ext-communities=rt:65000:4242423077
.large-communities=4242420207:120:18,4242420207:140:51,4242423077:1:52,4242423077:1:1344 .med=0 .origin=igp
debug.fwp-ptr=0x20445360
Ay afi=vpnv4 contribution=active dst-address=172.20.19.81/32&65000:4242423077 routing-table=main label=630 gateway=dn42.routebits@dn42 immediate-gw=dn42.routebits distance=200 scope=40
target-scope=10 belongs-to="dn42-static-export"
bgp.ext-communities=rt:65000:4242423077 .origin=incomplete
debug.fwp-ptr=0x20442D80
likes above, route 1 is active because next_hop is reachable via static route 2, but after bgp-mpls-vpn export, route 3 is unreachable while route 4 is active.
After digging a little deeper, I've found that the problem maybe cause by "target-scope".
/routing/nexthop> print where address~"172.20.19.81"
Flags: R - REACHABLE
Columns: ADDRESS, SCOPE, TARGET-SCOPE, IMMEDIATE-GW.ADDRESS, IMMEDIATE-GW.WEIGHT, IMMEDIATE-GW.FLAP-COUNT, IMMEDIATE-GW.INTERFACE-IDX, IMMEDIATE-GW.MPLS-PEER-ID, IMMEDIATE-GW.MPLS-LABEL, IMMEDIA>
ADDRESS SCOPE TARGET-SCOPE IMMEDIATE-GW.ADDRESS IMMEDIATE-GW.WEIGHT IMMEDIATE-GW.FLAP-COUNT IM I IMMEDIATE-GW.MPLS-LABEL IMMEDIATE-GW.BLACKHOLE
R 172.20.19.81@dn42 40 30 172.20.19.81%dn42.routebits@dn42 1 1309757501 17 0 4294967295 no
172.20.19.81@dn42 40 10
route 1's target-scope is 30, but after copyed to route 3, target-scope had been set to 10.