< Home

peer as-number

Function

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

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

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

Format

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

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

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

Specifies the IPv4 address of a peer.

The IPv4 address can be the IP address of an interface that is directly connected to the peer or the IP address of a loopback interface of the reachable peer.

It is in dotted decimal notation.
ipv6-address Specifies the IPv6 address of a peer. The value is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X.
as-number-plain Specifies the number of the AS, in integer format. The value is an integer that ranges from 1 to 4294967295.
as-number-dot Specifies the number of the AS, 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.
  • ipv4-address is valid only in the BGP view and BGP-VPN instance IPv4 address family view.

  • ipv6-address is valid only in the BGP view and BGP-VPN instance IPv6 address family view.

Views

BGP view, BGP-VPN instance IPv4 address family view, BGP-VPN instance IPv6 address family view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The peer ipv4-address as-number { as-number-plain | as-number-dot } command is used to create a BGP peer.

The peer group-name as-number { as-number-plain | as-number-dot } command is used to configure an AS number for a specified peer group.

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 of an external peer group must be different from the local AS number.

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

# Set the AS number to 100 for a peer group named test.

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