Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Example: Configuring VNI Route Targets Automatically with Manual Override

This example shows how to automatically set route targets for multiple VNIs, and manually override the route target for a single VNI in an EVPN-VXLAN topology.

Requirements

This example uses the following hardware and software components:

  • A QFX Series switch.

  • Junos OS version 15.1X53-D30

Overview

You can configure the vrf-target statement to automatically derive route targets for each VNI or you can configure route targets manually. You can also manually override the auto-derived route target specifically for one or more VNIs.

This example explains how to enable auto-derivation of route targets and manually override the automatically assigned route targets for a specific VNI.

To manually assign a route target for a specific VNI, you configure the vrf-target statement with a route target value at either of the following hierarchy levels:

  • In the default switch instance—[edit protocols evpn vni-options vni vni]

  • In a configured routing instance—[edit routing-instances name protocols evpn vni-options vni vni]

When you manually set a route target for a specific VNI, the setting applies only to EVPN Type 2 and Type 3 routes.

Note:

To set a route target for other EVPN route types, such as Type 1 routes, you must also manually configure the vrf-target statement with a route target value at the global level, as follows:

  • In the default switch instance—[edit switch-options] hierarchy level

  • In a configured routing instance—[edit routing-instances name] hierarchy level

For EVPN Type 2 and Type 3 routes only, the auto route target setting or a VNI level route target setting overrides a route target you set manually at the global level.

Configuration

To manually override an automatically configured VNI route target, perform these tasks:

Configuring Automatic VNI Route Targets with Manual Override

Step-by-Step Procedure

To configure automatic VNI route targets with manual override:

  1. At the [switch-options] hierarchy level, configure the vtep-source-interface, and route-distiguisher statements. Then configure the vrf-import statement with a policy that will be configured in a later step. Next, configure the vrf-target statement with a target and the auto option. The route target configured under vrf-target will be used by Type 1 EVPN routes and all Type 2 and Type 3 EVPN routes for all VLANs except the ones that do not match the VNI under vni-options in the next step.

  2. The [evpn] hierarchy level is where you can override the automatic assignment of VNI route targets. Configure the vni-options statement for VNI 100 with an export target of 1234:11. This route target will be used by Type 2 and Type 3 EVPN routes for all VLANs that match VNI 100. Next, configure the encapsulation and extended-vni-list statements. For the purposes of this example, the extended-vni-list statement will be configured with only two VNIs.

  3. Configure two communities at the [edit policy-options community] hierarchy level. The first community is named comglobal, and the next community is named com1234. Configure an import policy at the [edit policy-options policy-statement] hierarchy level. The policy is named import-policy, which you apply in the first step in this procedure. The communities and policy function as an import filter that accepts routes using the auto-derived route target and the manual override route target.

Results

After following the steps above, use the show command to verify the results of your configuration.