NoteEVPN feature is currently supported on X86 platforms only. |
When the switch learns about a local VNI and there is no configuration available in the system regarding this VNI then the import and export route targets (RTs) and route distinguisher (RD) for this VNI will be automatically calculated. The RTs are automatically derived as AS:VNI, whereas RD is derived as Router-ID:VNI-Index. For Type-2 and Type-3 routes coming from the layer 2 VNI, the RD is calculated as VXLAN-local0-tunnelip:VNI instead of Router-ID:VNI. Since EVPN routes may have the same MAC and/or the IP address; RDs are used to remove ambiguity in such cases. RTs are used to identify the VPN membership of routes.
For eBGP EVPN peering, since the peers belong to different ASes, using an automatic RT of AS:VNI is not suitable for route import. As a result, PICOS uses *:VNI for the import RT to identify which received routes are relevant to a specific VNI. This behavior occurs only when the switch automatically derives the import RT.
If you do not want that route distinguisher (RD) to be automatically derived, use the command below to manually set the of RD value.
set protocols bgp [vrf <vrf-name>] evpn vni <vni-id> rd <rd>
If you want route target (RT) to be configured manually instead of being auto-configured, run the command below. The value of parameter route-target can have three values, export, import or both. If you choose both then the RT is used as both import and export route target.
set protocols bgp [vrf <vrf-name>] evpn vni <vni-id> route-target <route-target> type <both | export | import>
Example Configuration
Here’s an example of how to configure EVPN RD and RT for a specific VNI in a BGP configuration:
Configuring the Route Distinguisher (RD):
The Route Distinguisher is used to distinguish between different VPNs in the BGP table. For example, for VNI 100, you can configure RD as 10.10.10.1:100
.
set protocols bgp vrf tenant1 evpn vni 100 rd 10.10.10.1:100 |
In this command:
vrf "tenant1"
specifies the VRF instance name.
vni 100
indicates the VNI for which the RD is being configured.
rd 10.10.10.1:100
defines the Route Distinguisher as 10.10.10.1:100
.
Configuring the Route Target (RT):
Route Targets control the import and export of routes in a VRF. You can configure the Route Target for a particular VNI using the following command. For example, we will configure an RT with the value 65000:100
and set it for both import and export.
set protocols bgp vrf tenant1 evpn vni 100 route-target 65000:100 type both |
In this command:
vrf "tenant1"
refers to the same VRF.
vni 100
is the same VNI configured earlier.
route-target 65000:100
sets the Route Target value.
type both
specifies that this RT will be used for both import and export. You could also set it for import
or export
only, depending on the use case.