import route-policy evpn

Function

The import route-policy evpn command associates the VPN-IPv4 address family or VPN-IPv6 address family of a VPN instance with an import routing policy to filter routes imported from the EVPN.

The undo import route-policy evpn command dissociates the VPN-IPv4 address family or VPN-IPv6 address family of a VPN instance with an import routing policy.

By default, the VPN-IPv4 address family or VPN-IPv6 address family of a VPN instance is not associated with any import routing policy.

Format

import route-policy policy-name evpn

undo import route-policy policy-name evpn

Parameters

Parameter Description Value
policy-name

Specifies the name of a routing policy.

The name is a string of 1 to 200 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.

Views

VPN instance IPv4 address family view, VPN instance IPv6 address family view, VPN instance view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
l3vpn write

Usage Guidelines

Usage Scenario

By default, the VPN-IPv4 address family or VPN-IPv6 address family of a VPN instance matches the export VPN targets of received routes against its import VPN targets to determine whether to import these routes. To control route import more precisely, run the import route-policy evpn command to associate the VPN IPv4/IPv6 address family with an import routing policy and set attributes for eligible routes.

Prerequisites

An RD has been configured for the VPN-IPv4 address family or VPN-IPv6 address family using the route-distinguisher command.

Configuration Impact

If the command is run more than once, the latest configuration overrides the previous one.

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 command.

Precautions

If the specified routing policy does not exist, run the route-policy command to create the routing policy.

Example

# Associate the VPN instance IPv4 address family of a VPN instance named vrf1 with an import routing policy named policy-1 to filter routes received from the EVPN.
<HUAWEI> system-view
[~HUAWEI] route-policy policy-1 permit node 10
[*HUAWEI-route-policy] apply extcommunity rt 10:1
[*HUAWEI-route-policy] quit
[*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
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >