peer check-first-as (BGP-VPN instance IPv6 address family view) (group)

Function

The peer check-first-as enable command enables a device to check the first AS number in the AS_Path attribute contained in the update messages received from a specified EBGP peer group.

The peer check-first-as disable command disables a device from checking the first AS number in the AS_Path attribute contained in the update messages received from a specified EBGP peer group.

The undo peer check-first-as enable command disables a device from checking the first AS number in the AS_Path attribute contained in the update messages received from a specified EBGP peer group.

The undo peer check-first-as disable command enables a device to check the first AS number in the AS_Path attribute contained in the update messages received from a specified EBGP peer group.

By default, a device checks the first AS number in the AS_Path attribute contained in the update messages received from all EBGP peers or peer groups.

Format

peer group-name check-first-as enable

peer group-name check-first-as disable

undo peer group-name check-first-as enable

undo peer group-name check-first-as disable

Parameters

Parameter Description Value
group-name

Specifies the name of a peer group.

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

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

If the peer check-first-as enable command is run, the device checks whether the first AS number in the AS_Path attribute contained in the update messages received from the specified EBGP peer group is the number of the AS where the EBGP peer group resides. If the two AS numbers are different, the local device discards the update messages. If the peer check-first-as disable command is run, the device accepts all update messages received from the specified EBGP peer group, regardless whether the two AS numbers are the same. If the undo peer check-first-as disable command is run, the default configuration takes effect.

The check function can be configured for a specified EBGP peer, peer group, or for BGP as a whole. If the function is not configured for a specified EBGP peer, the device checks whether the function is configured for the related peer group; if the function is not configured for the peer group, the device checks whether the function is configured in the BGP view.

Follow-up Procedure

After the check function is enabled, to enable the device to perform a check on received update messages, run the refresh bgp command.

Precautions

The configuration of the peer check-first-as { enable | disable } command is displayed in the configuration file.

The check-first-as command applies to all EBGP peers, whereas the peer check-first-as command applies only to the specified EBGP peer.

Example

# Enable the device to check the first AS number in the AS_Path attribute contained in the update messages received from a specified EBGP peer group.
<HUAWEI> system-view
[~HUAWEI] ip vpn-instance vpna
[*HUAWEI-vpn-instance-vpna] ipv6-family
[*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-vpn1] group test
[*HUAWEI-bgp-6-vpn1] peer test check-first-as enable
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >