Just to give an example, lets take vrf A (source vrf) and vrf B (destination vrf where we are saying route-target import) and let x:y be the export route-target used by vrf A.
When i say route-target import x:y in vrf B, then what exactly am i importing?
Am i importing only routes for directly connected networks on vrf A and static routes redistributed into vrf A?
What about routes that are exported from other vrf's but set with the extcommunity that matches this route-target x:y. Are they also imported?
What about the other route-targets imported into vrf A? Do they also land into vrf B?
Thanks a lot
When you configure route-target import x:y under a VRF, you actually import into the PE VPNv4 table all the VPNv4 prefixes which has one of their RT set to x:y.
To export a route, the PE needs first to add it into the VRF BGP table. So you need to redistribute those routes into the address-family ipv4 vrf sub-mode configuration. The way those routes are learned from the CE depends of the configuration: could be dynamic via BGP, OSPF,.. or static
An imported route is never exported back to the backbone.