- 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 import and export VPN targets of the local end must be the same as the export and import VPN targets of the remote end, respectively.
- (Optional) Run import route-policy policy-name
The EVPN instance is associated with an import route-policy.
Perform this step to associate the EVPN instance with an import route-policy and set attributes for eligible routes. This enables you to control routes to be imported into the EVPN instance more precisely.
- (Optional) Run export route-policy policy-name
The EVPN instance is associated with an export route-policy.
Perform this step to associate the EVPN instance with an export route-policy and set attributes for eligible routes. This enables you to control routes to be advertised more precisely.
- (Optional) Run mac limit number { simply-alert | mac-unchanged
The maximum number of MAC addresses allowed in the EVPN instance is set.
A device consumes more system resources as it learns more MAC addresses, meaning that the device may fail to operate when busy processing services. To limit the maximum number of MAC addresses allowed in an EVPN instance and thereby improving device security and reliability, run the mac limit command. After this configuration, if the number of MAC addresses exceeds the preset value, an alarm is triggered to prompt you to check the validity of existing MAC addresses.
- (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 the local MAC address exists in both a MAC address entry and an ARP/ND entry on the device, 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 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 specified for packet forwarding.
- Run evpn binding vpn-instance vpn-instance-name [ bd-tag bd-tag ]
The specified EVPN instance is bound to the BD.
By specifying different bd-tag values, you can bind multiple BDs to the same EVPN instance. In this way, VLAN services of different BDs can access the same EVPN instance while being isolated.
- Run quit
Return to the system view.