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

This example shows how to automatically derive route targets for multiple VNIs 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 with the auto option to automatically derives route targets in a routing instance. Devices auto-derive route targets only for EVPN Type 2 and Type 3 routes. As a result, in some cases you must also manually configure route targets for other EVPN route types such as Type 1 (in L2 routing instances) or Type 5 (in L3 routing instances). See Example: Configuring VNI Route Targets Manually for manual route target configuration examples.

You can also manually set specific route targets for individual virtual network identifiers (VNIs) if you configure the vrf-target statement at the [edit <routing-instances name> protocols evpn vni-options vni vni] hierarchy level. Like auto-derived route targets, VNI level route targets apply only to EVPN Type 2 and Type 3 routes. See Example: Configuring VNI Route Targets Manually and Example: Configuring VNI Route Targets Automatically with Manual Override for VNI-level route target configuration examples.

In this example we show how to configure auto-derived route targets for EVPN Type 2 and Type 3 routes for all VNIs in an EVPN instance.

Note:

We also include configuring a route target manually to support EVPN Type 1 routes in the instance.

Configuration

To configure the vrf-target statement with the auto option, perform these tasks:

Configuring VNI Route Target Automatic Derivation

Step-by-Step Procedure

To configure the automatic derivation of VNI route targets:

  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. Type 1 EVPN routes will use the route target you configure under vrf-target. Type 2 and Type 3 EVPN routes will use the auto-derived route target for export and import for all VNIs.

  2. At the [evpn] hierarchy level, configure the encapsulation and extended-vni-list statements. For the purposes of this example, the extended-vni-list statement will be configured with all, to apply automatic route targets to all VNIs.

  3. Configure a community at the [edit policy-options] hierarchy level named comglobal. Configure an import policy named import-policy at the [edit policy-options policy-statement] hierachy level. This community and this policy function as an import filter that accepts routes with the auto-derived route target. You apply the policy in step 1.

Results

Use the show command to verify the results of your configuration.