Configuring a VPN routing and forwarding (VRF) target provides a configurable community within a VRF routing instance and allows a single policy for import and a single policy for export to replace the per-VRF policies for every community.
To configure a VRF target, include the vrf-target statement. Use the import and export options to specify the allowed communities to accept from neighbors and to send to neighbors:
-
vrf-target {
-
community;
- export community-name;
- import community-name;
- }
You can configure the statements at the following hierarchy levels:
Within a hub-and-spoke configuration, you can configure a PE router not to advertise VPN routes from the primary (hub) instance. Instead, these routes are advertised from the secondary (downstream) instance. You can do this without configuring routing table groups, by using the no-vrf-advertise statement.
![]() |
Note: This statement does not prevent the exportation of VPN routes to other VRF instances on the same router by configuring the [edit routing-options auto-export] statement. |
To prevent advertising VPN routes from the primary instance, include the no-vrf-advertise statement:
-
no-vrf-advertise;
You can configure the statement at the following hierarchy levels:
For more information about configuring VPNs, see the JUNOS VPNs Configuration Guide.