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.
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.<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