peer ip-prefix export (BGP-IPv4 multicast address family view) (group)

Function

The peer ip-prefix export command configures a policy based on an IP prefix list for filtering BGP routes to be advertised to a specified peer group.

The undo peer ip-prefix export command cancels this configuration.

By default, no route filtering policy based on an IP address prefix list is configured for a peer group.

Format

peer peerGroupName ip-prefix ip-prefix-name export

undo peer peerGroupName ip-prefix [ ip-prefix-name ] export

Parameters

Parameter Description Value
peerGroupName

Specifies the name of an MBGP peer group.

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

ip-prefix-name

Specifies the name of an IP prefix list.

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

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

The peer ip-prefix export command can be used to configure a route filtering policy that is based on an IP prefix list for filtering BGP routes to be advertised to a specified peer group, implementing route control.

Prerequisites

If the peer ip-prefix command specifies an IP prefix list that does not exist for a peer, use the ip ip-prefix command to create an IP prefix list.

Configuration Impact

If an IP prefix list is specified for a peer group, all the members of the peer group inherit the configuration.

After an IP prefix list is specified for a peer group, the peers in the peer group filter the routes to be advertised to other peers based on the IP prefix list. Only the routes that pass the filtering of the IP prefix list can be advertised.

Precautions

If both this command and the peer route-filter export command are run, the latest configuration overrides the previous one.

If the length of the filter name is less than or equal to six characters and the name matches the first six characters of export or import, When you run the undo command, the filter name cannot be entered. You only need to enter the keyword import or export.

Example

# Apply a route filtering policy based on an IP prefix list named aaa to the routes received from a peer group named group1.
<HUAWEI> system-view
[~HUAWEI] ip ip-prefix aaa permit 192.168.0.0 16 greater-equal 16 less-equal 32
[*HUAWEI] bgp 100
[*HUAWEI-bgp] group group1 internal
[*HUAWEI-bgp] ipv4-family multicast
[*HUAWEI-bgp-af-multicast] peer group1 enable
[*HUAWEI-bgp-af-multicast] peer group1 ip-prefix aaa export
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >