< Home

peer as-number

Function

The peer as-number command specifies an AS number for a peer or peer group.

The undo peer as-number command deletes the AS number for a peer or peer group.

By default, no peer or peer group is configured.

Format

peer { group-name | ipv4-address | ipv6-address } as-number { as-number-plain | as-number-dot }

undo peer group-name as-number

undo peer { ipv4-address | ipv6-address }

Parameters

Parameter Description Value

group-name

Specifies the name of the peer group.

The name is a string of 1 to 47 characters without any space. It is case-sensitive.

ipv4-address

Specifies the IPv4 address of the peer.

It is in dotted decimal notation.

ipv6-address

Specifies the IPv6 address of the peer.

The prefix is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X.

as-number-plain

Specifies the integral AS number.

The value is an integer ranging from 1 to 4294967295.

as-number-dot

Specifies the AS number in dotted notation.

The value is in the format of x.y, where x and y are integers that range from 1 to 65535 and from 0 to 65535, respectively.

Views

BGP view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The peer as-number command is used to specify an AS number for a peer during the establishment of a BGP peer relationship. After BGP peer relationship is established, the BGP device and its peer can exchange BGP routing information.

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.

Example

# Specify the peer AS number for IPv4 peer 1.1.1.1 as 100.

<sysname> system-view
[sysname] bgp 100
[sysname-bgp] peer 1.1.1.1 as-number 100
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >