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 to 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 web UI or
in the file encap.py
.
The following shows the web UI location for setting the encapsulation method priorities from Configure > Infrastructure > Forwarding Options, in which the user has selected the priority order to be VXLAN first, then MPLS over GRE, and last priority is MPLS over UDP.

Use the following procedure to change the default encapsulation method to VXLAN.
![]() | Note:
VXLAN is only supported for EVPN
unicast. It is not supported for IP traffic or multicast traffic.
VXLAN priority and presence in |
To set the priority of encapsulation methods to VXLAN:
- Modify the file
encap.py
found in/opt/contrail/utils/
.The default encapsulation line is:
encap_obj=EncapsulationPrioritiesType(encapsulation=['MPLSoUDP','M PLSoGRE'])
Modify the line to:
encap_obj=EncapsulationPrioritiesType(encapsulation=['VXLAN', 'MPLSoUDP','MPLSoGRE'])
- Once the status is modified, execute the following script:
python encap_set.py <add|update|delete> <username> <password> <tenant_name> <config_node_ip>
The configuration is applied globally for all virtual networks.