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 Manually

This example shows how to manually set route targets for multiple virtual network identifiers (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

If you configure the vrf-target statement with the auto option, the device automatically derives route targets in a routing instance. You can also configure vrf-target with a specific target value to configure a route target manually in a routing instance.

In this example we show how to configure route targets manually by specifying a target value. You can manually configure route targets using the vrf-target statement at the following levels:

  • Global level—For all VNIs extended in a routing instance.

    This setting applies to all EVPN route types.

  • vni-options level—For a specific VNI in a routing instance.

    This setting applies only to EVPN Type 2 and Type 3 routes. With this setting:

    • If you also manually configure a route target at the global level, for the specified VNIs, this setting overrides the global setting.

    • If you also set the auto option to auto-derive route targets, for the specified VNIs, this setting overrides the auto setting.

Table 1 shows the corresponding CLI hierarchies in which you can manually configure a route target:

Table 1: Configuration Levels for vrf-target Statement
Configuration Level Default Switch Instance Hierarchy Configured Routing Instance Hierarchy Applicable EVPN Route Types

Global (all VNIs) in Routing Instance

[edit switch-options]

[edit routing-instances name]

All EVPN Route Types

Specified VNI in Routing Instance

[edit protocols evpn vni-options vni vni]

[edit routing-instances name protocols evpn vni-options vni vni]

Type 2

Type 3

We include sample configurations at each level next.

Configuration

This section shows some use cases to manually configure VNI route targets at the supported configuration levels.

Configure VNI Route Targets Manually for all VNIs in the Default Switch Instance

Step-by-Step Procedure

This procedure shows how to configure a route target manually for all VNIs in the default switch instance. This is a global level manual route target configuration.

  1. At the [edit switch-options] hierarchy level, configure the vtep-source-interface and route-distiguisher statements. Next, configure the vrf-target statement with a target value. All EVPN routes for all VLANs and corresponding VNIs will use the vrf-target address configured in this step.

    Note:

    You can optionally include vrf-import and vrf-export policies to further distinguish the routes to import and export that match the route target.

  2. At the [edit protocols evpn] hierarchy level, configure EVPN with VXLAN encapsulation, and specify the VNIs you want to extend into the EVPN instance. In this example, we configure the extended-vni-list statement with the all option to apply the route target to all VNIs.

Results

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

Configure VNI Route Targets Manually for all VNIs and Specific VNIs in a MAC-VRF EVPN Instance

Step by Step Procedure

This procedure shows how to configure a route target manually in an EVPN-VXLAN fabric for all VNIs in a MAC-VRF instance (MAC-VRF1) with the vlan-aware service type. We also manually configure a different route target specifically for VNI 100 in the same instance.

  1. At the [edit routing-instances MAC-VRF1] hierarchy level, configure the routing instance with the mac-vrf instance type and service type vlan-aware. Set the vtep-source-interface and route-distiguisher statements for the instance. Manually configure a vrf-target value at the global level in the routing instance. This global level route target corresponds to EVPN Type 1, Type 2, and Type 3 routes for the VNIs you extend into the EVPN instance (see the next step).

  2. At the [edit routing instances MAC-VRF1 protocols evpn] hierarchy level, configure EVPN with VXLAN encapsulation. List the VNIs you want to extend into the EVPN instance using the extended-vni-list statement. In this example, we list two VNIs, 100 and 101. We also configure an export route target value at the [edit routing-instances name protocols evpn vni-options vni vni] hierarchy level specifically for VNI 100. As a result, the route target you set the previous step applies to any EVPN Type 1 routes and only to VNI 101 for EVPN Type 2 and Type 3 routes. The VNI level route target you set in this step applies to VNI 100 for EVPN Type 2 and Type 3 routes.

Note:

You can optionally include vrf-import and vrf-export policies to further distinguish the routes to import and export that match the route target.

Results

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