The advertise l2vpn evpn command enables a VPN instance to advertise EVPN IP prefix routes.
The undo advertise l2vpn evpn command restores the default configuration.
By default, a VPN instance is disabled from advertising EVPN IP prefix routes.
Parameter | Description | Value |
---|---|---|
best-route |
Advertises only optimal routes in a VPN instance as EVPN IP prefix routes. |
- |
valid-routes |
Advertises only valid routes in a VPN instance as EVPN IP prefix routes. |
- |
import-route-multipath |
Advertises all routes with the same destination address in a VPN instance as EVPN IP prefix routes. |
- |
include-local-cross-route |
Advertises all local cross routes in a VPN instance as EVPN IP prefix routes. |
- |
Usage Scenario
If EVPN IP prefix routes are used to advertise IP routes between devices, you need to enable the VPN instance to advertise EVPN IP prefix routes so that the local VPN instance can advertise IP routes to the peer device through BGP EVPN peer relationships.
By default, the device advertise external routes in the VPN instance routing table, including invalid routes and non-optimal routes, as EVPN IP prefix routes. To prevent invalid routes from being advertised, you can specify valid-routes. If you want to advertise only the optimal VPN routes as EVPN IP prefix routes, specify best-route. If the advertise l2vpn evpn command does not contain the import-route-multipath parameter when it is run, the VPN instance advertises only optimal locally imported routes as EVPN IP prefix routes. In load-balancing scenarios, the import-route-multipath parameter must be specified in the advertise l2vpn evpn command, so that the VPN instance advertises all locally imported routes with the same destination address as EVPN IP prefix routes. By default, the local cross routes of a VPN instance are not advertised as EVPN IP prefix routes. To solve the problem of mutual access between VPN instances, run the advertise l2vpn evpn command with the include-local-cross-route parameter specified, the local cross routes collected by the VPN instance are advertised as EVPN IP prefix routes and then sent to the remote device through BGP EVPN peer relationships.<~HUAWEI> system-view [~HUAWEI] ip vpn-instance vrf1 [*HUAWEI-vpn-instance-vrf1] ipv6-family [*HUAWEI-vpn-instance-vrf1-af-ipv6] route-distinguisher 10:1 [*HUAWEI-vpn-instance-vrf1-af-ipv6] quit [*HUAWEI-vpn-instance-vrf1] quit [*HUAWEI] bgp 100 [*HUAWEI-bgp] ipv6-family vpn-instance vrf1 [*HUAWEI-bgp-6-vrf1] advertise l2vpn evpn include-local-cross-route
<HUAWEI> system-view [~HUAWEI] ip vpn-instance vpna [*HUAWEI-vpn-instance-vpna] route-distinguisher 1:1 [*HUAWEI-vpn-instance-vpna-af-ipv4] quit [*HUAWEI-vpn-instance-vpna] quit [*HUAWEI] bgp 100 [*HUAWEI-bgp] ipv4-family vpn-instance vpna [*HUAWEI-bgp-vpna] advertise l2vpn evpn valid-routes