apply bgp-peer

Function

The apply bgp-peer command associates BGP peers with the address pools to which their addresses belong.

The undo apply bgp-peer command disassociates BGP peers from the address pools to which their addresses belong.

By default, BGP peers are not associated with the address pools to which their addresses belong.

Format

apply bgp-peer [ public-vpn | all-private-vpn | vpn-instance vpn-instance-name ]

undo apply bgp-peer [ public-vpn | all-private-vpn | vpn-instance vpn-instance-name ]

Parameters

Parameter Description Value
public-vpn

Associates all public-network BGP peers with the address pools to which their addresses belong.

-

all-private-vpn

Associates all VPN BGP peers with the address pools to which their addresses belong.

-

vpn-instance vpn-instance-name

Associates BGP peers in a specified VPN with the address pools to which their addresses belong.

The value is a string of 1 to 31 case-sensitive characters, spaces not supported. In addition, the VPN instance name must not be _public_. When double quotation marks are used around the string, spaces are allowed in the string.

Views

ACL IPv6 address pool view, ACL address pool view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
acl write

Usage Guidelines

Usage Scenario

If you need to filter packets based on the source IP addresses of BGP peers, run the apply bgp-peer command to associate the IP addresses of BGP peers with the ACL/ACL IPv6 address pools to which these addresses belong. Then, reference ACL/ACL6 address pool in QoS or device security service to filter packets based on the source IP addresses of BGP peers.

You can configure multiple addresses in the ACL address pool view and bound these addresses to ACL rules. After address association is configured between ACL address pool and BGP peers, if the IP address of a BGP peer changes, the IP address changes accordingly in the ACL address pool. This simplifies configurations and provides flexibility.

Precautions

The address association function and manual IP configuration function are mutually exclusive. Only one of the apply bgp-peer and ip address commands can be run in the ACL address pool view.

This command is applicable only to QoS or device security services.

Example

# Associate the IPv4 addresses of BGP peers in a specified VPN with the ACL address pools to which these addresses belong.
<HUAWEI> system-view
[~HUAWEI] ip vpn-instance vpn1
[*HUAWEI-vpn-instance-vpn1] ipv4-family
[*HUAWEI-vpn-instance-vpn1-af-ipv4] quit
[*HUAWEI-vpn-instance-vpn1] quit
[*HUAWEI] acl ip-pool test
[*HUAWEI-acl-ip-pool-test] apply bgp-peer vpn-instance vpn1
# Associate the IPv4 addresses of BGP peers with the ACL address pools to which these addresses belong.
<HUAWEI> system-view
[~HUAWEI] acl ip-pool test
[~HUAWEI-acl-ip-pool-test] apply bgp-peer
# Associate the IPv6 addresses of BGP peers with the ACL6 address pools to which these addresses belong.
<HUAWEI> system-view
[~HUAWEI] acl ipv6-pool test
[~HUAWEI-acl-ipv6-pool-test] apply bgp-peer
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >