< Home

filter-policy import (BGP)

Function

The filter-policy import command configures a device to filter received routes.

The undo filter-policy import command restores the default configuration.

By default, received routes are not filtered.

Format

filter-policy { acl-number | acl-name acl-name | ip-prefix ip-prefix-name } import

filter-policy { acl6-number | acl6-name acl6-name | ipv6-prefix ipv6-prefix-name } import

undo filter-policy import

undo filter-policy { acl-number | acl-name acl-name | ip-prefix ip-prefix-name } import

undo filter-policy { acl6-number | acl6-name acl6-name | ipv6-prefix ipv6-prefix-name } import

Parameters

Parameter Description Value

acl-number

Specifies the number of a basic ACL.

The value is an integer that ranges from 2000 to 2999.

acl-name acl-name

Specifies the name of a named ACL.

The value is a string of 1 to 64 case-sensitive characters without spaces. The value must start with a letter.

ip-prefix ip-prefix-name

Specifies the name of an IPv4 prefix list.

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

acl6-number

Specifies the number of a basic ACL6.

-

acl6-name acl6-name

Specifies the name of a named ACL6.

The value is a string of 1 to 64 case-sensitive characters without spaces. The name should start with a letter and can contain numbers, hyphens (-), or underscores (_).

ipv6-prefix ipv6-prefix-name

Specifies the name of an IPv6 prefix list.

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

  • acl-name acl-name, acl-number, and ip-prefix ip-prefix-name are valid only in the BGP view, BGP-IPv4 unicast address family view, BGP-IPv4 multicast address family view, BGP-VPN instance IPv4 address family view, and BGP-VPNv4 address family view.

  • acl6-name acl6-name, acl6-number, and ipv6-prefix ipv6-prefix-name are valid only in the BGP-IPv6 unicast address family view, BGP-VPN instance IPv6 address family view, and BGP-VPNv6 address family view.

Views

BGP view, BGP-IPv4 unicast address family view, BGP-IPv4 multicast address family view, BGP-VPN instance IPv4 address family view, BGP-VPNv4 address family view, BGP-IPv6 unicast address family view, BGP-VPN instance IPv6 address family view, BGP-VPNv6 address family view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The filter-policy import command is used to filter the routes received by BGP to determine whether to add them to the BGP routing table.

When the rule command is run to configure rules for an ACL, only the source address range specified by source and the time period specified by time-range are valid as the rules.

When the rule (basic ACL6 view) or rule (advanced ACL6 view) command is run to configure rules for an ACL6, only the source address range specified by source and the time period specified by time-range are valid as the rules.

Precautions

Creating an IP prefix list before it is referenced is recommended. By default, nonexistent IP prefix lists cannot be referenced using the command. If the route-policy nonexistent-config-check disable command is run in the system view and a nonexistent IP prefix list is referenced using the current command, all routes advertised by the specified peer are accepted.

Example

# Use ACL 2000 to filter the routes received by BGP.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] ipv4-family unicast
[HUAWEI-bgp-af-ipv4] filter-policy 2000 import
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >