Configuring a VRF Target
Configuring a VRF target community using the
vrf-targetstatement causes default VRF import and export policies to be generated that accept and tag routes with the specified target community. You can still create more complex policies by explicitly configuring VRF import and export policies. These policies override the default policies generated when you configure thevrf-targetstatement.If you do not configure the
importandexportoptions of thevrf-targetstatement, the specified community string is applied in both directions. Theimportandexportkeywords give you more flexibility, allowing you to specify a different community for each direction.The syntax for the VRF target community is not a name. You must specify it in the format
target:x:y. A community name cannot be specified because this would also require you to configure the community members for that community using thepolicy-optionsstatement. If you define thepolicy-optionsstatements, then you can just configure VRF import and export policies as usual. The purpose of thevrf-targetstatement is to simplify the configuration by allowing you to configure most statements at the[edit routing-instances]hierarchy level.To configure a VRF target, include the
vrf-targetstatement:vrf-targetcommunity;You can include the
vrf-targetstatement at the following hierarchy levels:
[edit routing-instancesrouting-instance-name][edit logical-routerslogical-router-namerouting-instancesrouting-instance-name]An example of how you might configure the
vrf-targetstatement follows:[edit routing-instances sample]vrf-target target:69:102;To configure the
vrf-targetstatement with theexportandimportoptions, include the following statements:vrf-target {exportcommunity-name;importcommunity-name;}You can include the
vrf-targetstatement at the following hierarchy levels: