peer as-path-filter import (BGP-IPv4 multicast address family view)

Function

The peer as-path-filter import command configures a policy based on an AS_Path list for filtering BGP routes received from a peer.

The undo peer as-path-filter import command cancels this configuration.

By default, no policy based on an AS_Path list is configured for filtering BGP routes received from a peer, and all the BGP routes will be received from the peer.

Format

peer peerIpv4Addr as-path-filter { number | name } import

undo peer peerIpv4Addr as-path-filter { number | name } import

Parameters

Parameter Description Value
peerIpv4Addr

Specifies the IP address of an MBGP peer.

The value is in dotted decimal notation.

number

Specifies the number of an AS_Path filter.

The value is an integer ranging from 1 to 256.

name

Specifies the name of an AS_Path filter.

The value is a string of 1 to 51 case-sensitive characters, spaces not supported.

When double quotation marks are used around the string, spaces are allowed in the string.

Views

BGP-IPv4 multicast address family view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
bgp write

Usage Guidelines

Usage Scenario

After the peer as-path-filter import command is used to apply a route filtering policy based on an AS_Path list to BGP routes to be received from a specified peer, the routers that do not match the policy are filtered out.

Prerequisites

The ip as-path-filter command has been run to define an AS-Path filter.

Precautions

Only one AS_Path filter can be used to filter routes to be received from the same peer.

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

Example

# Configure an MBGP routing policy based on an AS_Path list for a peer.
<HUAWEI> system-view
[~HUAWEI] ip as-path-filter 3 permit 1
[*HUAWEI] bgp 100
[*HUAWEI-bgp] peer 1.1.1.1 as-number 10
[*HUAWEI-bgp] ipv4-family multicast
[*HUAWEI-bgp-af-multicast] peer 1.1.1.1 enable
[*HUAWEI-bgp-af-multicast] peer 1.1.1.1 as-path-filter 3 import
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >