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.
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.
If import-route-multipath is not specified in the advertise l2vpn evpn command, the VPN instance advertises only the optimal route among the routes with the same destination address when advertising EVPN IP prefix routes. In load balancing scenarios, the import-route-multipath parameter must be specified in the advertise l2vpn evpn command so that all routes with the same destination address are advertised 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 vpna [*HUAWEI-vpn-instance-vpna] route-distinguisher 1:1 [*HUAWEI-vpn-instance-vpna] quit [*HUAWEI] bgp 100 [*HUAWEI-bgp] ipv4-family vpn-instance vpna [*HUAWEI-bgp-vpna] advertise l2vpn evpn
<~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