peer as-path-filter export (BGP-VPN instance IPv6 address family view) (IPv6)

Function

The peer as-path-filter export command configures a policy based on an AS_Path list for filtering BGP routes to be advertised to a specified peer.

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

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

Format

peer ipv6-address as-path-filter { number | name } export

undo peer ipv6-address as-path-filter { number | name } export

Parameters

Parameter Description Value
ipv6-address

Specifies the IPv6 address of a peer.

The value is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X.

number

Specifies the number of an AS_Path filter.

The value is an integer that ranges 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.

Views

BGP-VPN instance IPv6 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 export command is used to apply a route filtering policy based on an AS_Path list to BGP routes to be advertised to 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 advertised to the same peer.

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

Example

# Configure an AS_Path filter for a peer.
<HUAWEI> system-view
[~HUAWEI] ip as-path-filter 3 permit ^10_
[*HUAWEI] ip vpn-instance vpna
[*HUAWEI-vpn-instance-vpna] ipv6-family
[*HUAWEI-vpn-instance-vpn1-af-ipv6] route-distinguisher 100:1
[*HUAWEI-vpn-instance-vpna-af-ipv6] quit
[*HUAWEI-vpn-instance-vpna] quit
[*HUAWEI] bgp 100
[*HUAWEI-bgp] ipv6-family vpn-instance vpna
[*HUAWEI-bgp-6-vpna] peer 2001:DB8:1::1 as-number 100
[*HUAWEI-bgp-6-vpna] peer 2001:DB8:1::1 as-path-filter 3 export
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >