The export route-policy evpn command associates the current VPN instance IPv4 or IPv6 address family with an export routing policy to filter EVPN routes to be advertised by the VPN instance IPv4 or IPv6 address family.
The undo export route-policy evpn command cancels the association between the IPv4 or IPv6 address family of a VPN instance and an export routing policy.
By default, the IPv4 or IPv6 address family of a VPN instance is not associated with any export routing policy.
Parameter | Description | Value |
---|---|---|
policy-name | Specifies the name of the export routing policy to be associated with the VPN instance IPv4 or IPv6 address family. | The name is a string of 1 to 40 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string. |
VPN instance view, VPN instance IPv4 address family view, VPN instance IPv6 address family view
Usage Scenario
By default, the IPv4 or IPv6 address family of a VPN instance adds all EVPN-VPN targets in the export EVPN-VPN target list to EVPN routes to be advertised by the IPv4 or IPv6 address family of the VPN instance to the EVPN address family. To control route export more precisely, run the export route-policy policy-name evpncommand, specify the export routing policy to filter the routes to be advertised, and set attributes for eligible routes.
Prerequisites
An RD has been configured for the IPv4 or IPv6 address family of the VPN instance by running the route-distinguisher route-distinguisher command.
If no associated routing policy exists, a routing policy needs to be configured by running the route-policy command.
Precautions
The IPv4 or IPv6 address family of a VPN instance can be associated with only one export routing policy. If the export route-policy evpn command is run more than once, the latest configuration overrides the previous one.
The export routing policy configured using the export route-policy evpn command does not affect the export routing policy associated with another VPN instance using the export route-policy policy-name command.
# Associate the IPv4 address family of VPN instance vrf1 with an export routing policy policy-2 to filter EVPN routes to be advertised by the IPv4 address family of the VPN instance to the other VPN instances.
<HUAWEI> system-view
[HUAWEI] ip vpn-instance vrf1
[HUAWEI-vpn-instance-vrf1] ipv4-family
[HUAWEI-vpn-instance-vrf1-af-ipv4] route-distinguisher 100:1
[HUAWEI-vpn-instance-vrf1-af-ipv4] export route-policy policy-2 evpn