Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

vrf-target

Syntax

Hierarchy Level

Description

Specify a virtual routing and forwarding (VRF) target community. This value is a route target extended community.

The vrf-target statement simplifies configuring a route target by enabling you to configure the statements for route sharing in a routing instance at the [edit routing-instances] hierarchy level. In effect, this statement configures a single policy for import and a single policy for export to replace per routing instance policies for every community.

If you configure this statement with only the community option, the device generates default VRF import and export policies to import and export routes with the specified route target community. In this case, you can configure matching route targets for corresponding routing instances on different devices. Then those devices can share routes without requiring you to explicitly configure import and export routing policies.

You can explicitly specify import and export route target communities for the routing instance using the import or export options. Or, if you use the auto option, the device automatically derives the route target community value. For example, see Auto-derived Route targets for EVPN routing instances.

You can create more complex policies by explicitly configuring routing instance import and export policies using the vrf-import and vrf-export statements. With those statements, you define the extended community as a routing policy option using the community (Policy Options) statement, which includes a community-name and one or more community values.

If you don't configure matching route targets with default import and export policies for a routing instance on devices where you want to share routes, you must ensure that for each routing instance, you configure the export target on each device to match the import target on the other devices, and vice versa, as needed.

Options

community—Community name in the format target:community-id, where target is a required keyword followed by a colon, and community-id consists of two numbers (each in the range 0 through 65535) separated by another colon in the format x:y. The first number, x, is often (but not required to be) a related autonomous system (AS) number. See community (Policy Options) for more on defining communities (including route targets), and Configuring EVPN Routing Instances for more on configuring EVPN instances.

auto—Automatically derives the route target. The auto-derived route targets have higher precedence over manually configured route targets in vrf-target, vrf-export policies, and vrf-import policies.

Note:

Auto-derived route targets are supported only in virtual switch and EVPN routing instances.

import community—Accept routes from neighbor devices with the specified route target community.

export community—Advertise routes with the specified route target community to neighbor devices.

Required Privilege Level

routing—To view this statement in the configuration.

routing-control—To add this statement to the configuration.

Release Information

Statement introduced before Junos OS Release 7.4.

auto option added in Junos OS Release 19.1R1 for MX series.

Support at the following hierarchy levels introduced in Junos OS Release 20.3R1 on QFX Series switches: [edit protocols evpn interconnect] and [edit routing-instances routing-instance-name protocols evpn interconnect].