import route-policy (VPN instance view)

Function

The import route-policy command associates the current VPN instance IPv4 address family with an import route-policy.

The undo import route-policy command disassociates the current VPN instance IPv4 address family from an import route-policy.

By default, the current VPN instance IPv4 address family is not associated with any import route-policy.

Format

import route-policy policy-name

undo import route-policy

Parameters

Parameter Description Value
policy-name

Specifies the name of the import route-policy to be associated with a VPN instance IPv4 address family.

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 view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
l3vpn write

Usage Guidelines

Usage Scenario

If no import route-policy is configured, routes can only be filtered based on export VPN targets. The routes whose export VPN targets match the import VPN target of the local VPN instance IPv4 address family are added to the VPN instance IPv4 address family. To control the import of the routes into the VPN instance IPv4 address family more precisely, use the import route-policy. The import route-policy is used to filter the imported routing information and to set the routing attributes of the routes that pass the filtering.

The import route-policy command controls the VPN routes that are added to a VPN instance IPv4 address family. The peer route-policy command or the filter-policy command run in the BGP VPN instance IPv4 address family view filters routes of a VPN instance IPv4 address family advertised to or received from CE neighbors.

Prerequisites

If the import route-policy to be associated with a VPN instance IPv4 address family does not exist, configure the import route-policy first.

Configuration Impact

The current VPN instance IPv4 address family can be associated with only one import route-policy. If the import route-policy command is run more than once, the latest configuration overrides the previous one.

Example

# Apply an import route-policy named poly-1 to the IPv4 address family of the VPN instance named vrf1.
<HUAWEI> system-view
[~HUAWEI] route-policy poly-1 permit node 10
[*HUAWEI-route-policy] quit
[*HUAWEI] ip vpn-instance vrf1
[*HUAWEI-vpn-instance-vrf1] route-distinguisher 100:1
[*HUAWEI-vpn-instance-vrf1-af-ipv4] import route-policy poly-1
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >