peer filter-policy import (BGP-VPN instance IPv4 address family view)

Function

The peer filter-policy import command configures an ACL-based policy for filtering BGP routes received from a specified peer.

The undo peer filter-policy import command cancels this configuration.

By default, no filtering policy is set for a peer.

Format

peer ipv4-address filter-policy acl-number import

peer ipv4-address filter-policy acl-name acl-name import

undo peer ipv4-address filter-policy acl-number import

undo peer ipv4-address filter-policy acl-name acl-name import

Parameters

Parameter Description Value
ipv4-address

Specifies the IPv4 address of a peer.

It is in dotted decimal notation.

acl-number

Specifies the number of a basic ACL.

The value is an integer ranging from 2000 to 2999.

import

Filters received routes.

-

acl-name acl-name

Specifies the name of a named basic ACL.

The value is a string of 1 to 64 case-sensitive characters without spaces. The value must start with a letter (a to z or A to Z, case sensitive).

Views

BGP-labeled VPN instance IPv4 address family view, BGP-VPN instance IPv4 address family view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
bgp write

Usage Guidelines

Usage Scenario

The peer filter-policy import command is used to configure an ACL-based policy for filtering routes to be received from peers.

A proper basic ACL needs to be selected based on the address family of a peer.

Configuration Impact

If the peer filter-policy import command is run multiple times, the latest configuration overwrites the previous one.

Precautions

When the rule command is run to configure rules for a named ACL, only the source address range specified by source and the time period specified by time-range take effect.

The peer route-filter import command is mutually exclusive with the peer route-filter import commands.

Example

# Set the filtering policy for peers.
<HUAWEI> system-view
[~HUAWEI] ip vpn-instance vpna
[*HUAWEI-vpn-instance-vpna] ipv4-family
[*HUAWEI-vpn-instance-vpna-af-ipv4] route-distinguisher 100:1
[*HUAWEI-vpn-instance-vpna-af-ipv4] quit
[*HUAWEI-vpn-instance-vpna] quit
[*HUAWEI] bgp 100
[*HUAWEI-bgp] ipv4-family vpn-instance vpna
[*HUAWEI-bgp-vpna] peer 10.1.1.1 as-number 100
[*HUAWEI-bgp-vpna] peer 10.1.1.1 filter-policy 2001 import
<HUAWEI> system-view
[~HUAWEI] ip vpn-instance vpna
[*HUAWEI-vpn-instance-vpna] ipv4-family
[*HUAWEI-vpn-instance-vpna-af-ipv4] route-distinguisher 100:1
[*HUAWEI-vpn-instance-vpna-af-ipv4] quit
[*HUAWEI-vpn-instance-vpna] quit
[*HUAWEI] bgp 100
[*HUAWEI-bgp] vpn-instance vpna
[*HUAWEI-bgp-instance-vpna] peer 10.1.1.1 as-number 100
[*HUAWEI-bgp-instance-vpna] quit
[*HUAWEI-bgp] ipv4-labeled-unicast vpn-instance vpna
[*HUAWEI-bgp-labeled-vpna] peer 10.1.1.1 enable
[*HUAWEI-bgp-labeled-vpna] peer 10.1.1.1 filter-policy 2001 import
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >