Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?


Configuring Encapsulation Methods


The default encapsulation mode for EVPN is MPLS over UDP. All packets on the fabric are encapsulated with the label allocated for the virtual machine interface. The label encoding and decoding is the same as for IP forwarding. Additional encapsulation methods supported for EVPN include MPLS over GRE and VXLAN. MPLS over UDP is different from MPLS over GRE only in the method of tunnel header encapsulation.

VXLAN has its own header and uses a VNID label to carry the traffic over the fabric. A VNID is assigned with every virtual network and is shared by all virtual machines in the virtual network. The VNID is mapped to the VRF of the virtual network to which it belongs.

The priority order in which to apply encapsulation methods is determined by the sequence of methods set either from the Contrail Web UI or in the file.

To configure the global VXLAN identifier mode:

  • From the Contrail Web UI, select Configure > Infrastucture > Global Config.

  • The Global Config options are displayed.

  • Click the edit icon .

The Edit Global Config window is displayed as shown in Figure 1.

Figure 1: Edit Global Config Window for Encapsulation Priority Order
Edit Global Config
Window for Encapsulation Priority Order

Under Encapsulation Priority Order select one of the following:

  • MPLS over UDP

  • MPLS over GRE

  • VxLAN

Click the + plus symbol to the right of the first priority to add a second priority or third priority.

Use the following procedure to change the default encapsulation method to VXLAN by editing the file.


VXLAN is only supported for EVPN unicast. It is not supported for IP traffic or multicast traffic. VXLAN priority and presence in the file or configured in the Web UI is ignored for traffic not supported by VXLAN.

To set the priority of encapsulation methods to VXLAN:

  1. Modify the file found in the /opt/contrail/utils/ directory.

    The default encapsulation line is:

    encap_obj=EncapsulationPrioritiesType(encapsulation=['MPLSoUDP','M PLSoGRE'])

    Modify the line to:

    encap_obj=EncapsulationPrioritiesType(encapsulation=['VXLAN', 'MPLSoUDP','MPLSoGRE'])

  2. After the status is modified, execute the following script:

    python <add|update|delete> <username> <password> <tenant_name> <config_node_ip>

    The configuration is applied globally for all virtual networks.