- Run evpn vpn-instance vpn-instance-name bd-mode
A BD EVPN instance is created, and the EVPN instance view is displayed.
- Run route-distinguisher route-distinguisher
An RD is configured for the EVPN instance.
- Run vpn-target vpn-target &<1-8> [ both | export-extcommunity | import-extcommunity ]
VPN targets are configured for the EVPN instance. The export VPN target of the local end must be the same as the import VPN target of the remote end, and the import VPN target of the local end must be the same as the export VPN target of the remote end.
- (Optional) Run import route-policy policy-name
The current EVPN instance is associated with an import routing policy.
To control route import more precisely, perform this step to associate the EVPN instance with an import routing policy and set attributes for eligible routes.
- (Optional) Run export route-policy policy-name
The current EVPN instance is associated with an export routing policy.
To control route export more precisely, perform this step to associate the EVPN instance with an export routing policy and set attributes for eligible routes.
- (Optional) Run tnl-policy policy-name
The EVPN instance is associated with a tunnel policy.
This configuration allows data packets between PEs to be forwarded through a TE tunnel.
- (Optional) Run mac limit number { simply-alert | mac-unchanged }
The maximum number of MAC addresses allowed by an EVPN instance is configured.
After a device learns a large number of MAC addresses, system performance may deteriorate when the device is busy processing services. This is because MAC addresses consume system resources. To improve system security and reliability, run the mac limit command to configure the maximum number of MAC addresses allowed by an EVPN instance. If the number of MAC addresses learned by an EVPN instance exceeds the maximum number, the system displays an alarm message, instructing you to check the validity of MAC addresses in the EVPN instance.
- (Optional) Run mac-route no-advertise
The device is disabled from sending local MAC routes with the current VNI to the EVPN peer.
In Layer 3 VXLAN gateway scenarios where Layer 2 traffic forwarding is not involved, perform this step to disable local MAC routes from being advertised to the EVPN peer. This configuration prevents the EVPN peer from receiving MAC routes, thereby conserving device resources.
- (Optional) Run local mac-only-route no-generate
The device is disabled from generating an EVPN MAC route when the local MAC address exists in both a MAC address entry and an ARP/ND entry.
If a MAC address entry and an ARP/ND entry on the device both contain the local MAC address, the device generates both an EVPN MAC/IP route and an EVPN MAC route by default. To optimize memory utilization, perform this step so that the device generates only the EVPN MAC/IP route. To ensure normal Layer 2 traffic forwarding, also run the mac-ip route generate-mac command on the peer device to enable the function to generate MAC address entries based on MAC/IP routes.
- (Optional) Run mac-ip route generate-mac
The function to generate MAC address entries based on MAC/IP routes is enabled.
If the peer device is configured not to advertise MAC routes (using the mac-route no-advertise command) or not to generate MAC routes (using the local mac-only-route no-generate command), the local device cannot generate MAC address entries by default. To ensure normal Layer 2 traffic forwarding, perform this step on the local device to enable the function to generate MAC entries based on MAC/IP routes.
- Run quit
Exit from the EVPN instance view.
- Run bridge-domain bd-id
The BD view is displayed.
- Run vxlan vni vni-id split-horizon-mode
A VNI is created and associated with the BD, and split horizon is applied to the BD.
- Run evpn binding vpn-instance vpn-instance-name [ bd-tag bd-tag ]
A specified EVPN instance is bound to the BD. By specifying different bd-tag values, you can bind multiple BDs with different VLANs to the same EVPN instance and isolate services in the BDs.
- Run quit
Return to the system view.