The import route-policy evpn command associates the IPv4 or IPv6 address family of a VPN instance with an import routing policy to filter EVPN routes imported.
The undo import route-policy evpn command cancels the association between the IPv4 or IPv6 address family of a VPN instance and an import routing policy.
By default, the IPv4 or IPv6 address family of a VPN instance is not associated with any import routing policy.
Parameter | Description | Value |
---|---|---|
policy-name | Specifies the name of the import routing policy to be associated with the IPv4 or IPv6 address family of a VPN instance. | 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, a VPN instance matches the export EVPN-VPN targets of the routes against the import EVPN-VPN targets of the IPv4 or IPv6 address family of the VPN instance to determine whether to import these IPv4 or IPv6 address family routes. To control EVPN route import more precisely, run the import route-policy policy-name evpn command to associate the VPN instance with an import routing policy 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 import routing policy. If the import route-policy evpn command is run several times, the latest configuration overrides the previous configurations.
The import routing policy configured using the import route-policy evpn command does not affect the import routing policy applied to the VPN instance using the import route-policy policy-name command.
# Associate the IPv4 address family of VPN instance vrf1 with an import routing policy policy-1 to filter EVPN routes to be advertised by other VPN instances to the IPv4 address family of the VPN instance.
<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] import route-policy policy-1 evpn