peer check-first-as (BGP view)

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.

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.

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.

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.

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 ipv4-address check-first-as enable

peer ipv4-address check-first-as disable

undo peer ipv4-address check-first-as enable

undo peer ipv4-address check-first-as disable

Parameters

Parameter Description Value
ipv4-address

Specifies the IPv4 address of a peer.

The value is in dotted decimal notation.

Views

BGP 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 is the number of the AS where the EBGP peer 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, 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.
<HUAWEI> system-view
[~HUAWEI] bgp 100
[*HUAWEI-bgp] peer 10.1.1.1 as-number 200
[*HUAWEI-bgp] peer 10.1.1.1 check-first-as enable
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >