peer as-number (BGP view)

Function

The peer as-number command creates a peer and configures an AS number for a specified peer.

The undo peer as-number command deletes the AS number of a specified peer.

By default, no BGP peer is configured, and no AS number is specified for a peer.

Format

peer ipv4-address as-number as-number

undo peer ipv4-address

Parameters

Parameter Description Value
ipv4-address

Specifies the IPv4 address of a peer.

It is in dotted decimal notation.

as-number

Specifies a destination AS number.

For an integral AS number, the value is an integer ranging from 1 to 4294967295.

For an AS number in dotted notation, the value is in the format of x.y, where x and y are integers ranging from 1 to 65535 and from 0 to 65535, respectively.

Views

BGP view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
bgp write

Usage Guidelines

Usage Scenario

The peer as-number command is used to create a BGP peer.

Precautions

If a peer does not join any peer group or the peer group to which a peer belongs is not configured with an AS number, deleting the AS number of the peer will reset the peer relationship.

If a peer in a peer group is not configured with an AS number, deleting the AS number of the peer group will interrupt the connection on the peer.

The AS number for external session group cannot be the same as the local AS number.

If you run the undo peer ipv4-address command, all configurations related to the peer are deleted. Therefore, exercise caution when running this command.

Example

# Set the AS number to 100 for IPv4 peer 10.1.1.1.
<HUAWEI> system-view
[~HUAWEI] bgp 100
[*HUAWEI-bgp] peer 10.1.1.1 as-number 100
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >