< Home

peer fake-as

Function

The peer fake-as command specifies a fake AS number for a local peer.

The undo peer fake-as command cancels the existing configuration.

By default, a peer uses the actual local AS number.

Format

peer { group-name | ipv4-address | ipv6-address } fake-as { as-number-plain | as-number-dot } [ prepend-global-as ]

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

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 Integral AS number The value is an integer ranging from 1 to 4294967295.
as-number-dot 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.
prepend-global-as Indicates that the actual AS number is added to packets to be sent. -
  • 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

Generally, a device supports only one BGP process. This means that a router supports only one AS number. In a situation where AS numbers need to be replaced during network migration, the peer fake-as command can be used to set a fake AS number of a specified peer to ensure smooth network migration. If the local peer uses the actual AS number to establish the EBGP peer relationship with a remote peer, the AS_Path attribute contained in the route sent to the remote peer carries the actual AS number. If the local peer uses the fake AS number to establish the EBGP peer relationship with a remote peer, the AS_Path attribute contained in the route sent to the remote peer carries the fake AS number.

If prepend-global-as is specified in the command and the local end establishes an EBGP peer relationship with the remote end using the fake AS number, the local end adds the actual AS number to the packets to be sent to the remote end.

Prerequisites

The peer as-number command has been run to create a peer.

Configuration Impact

The peer fake-as command is used to set a fake AS number for a specified peer, which is different from the actual AS number of the peer. After the peer fake-as command is used to set a fake AS number for a peer of the local device, the local device and the peer use fake ASs to establish a peer relationship.

If the peer fake-as command is run several times for the same peer or peer group, the latest configuration overrides the previous one.

Precautions

After the 4-byte AS number capability is disabled on a peer, configuring a 4-byte fake AS number for the peer may cause a failure to establish a BGP session.

The peer fake-as command takes effect only for EBGP peers, and the configured fake AS number cannot be the same as the peer AS number.

Example

# Configure the fake AS for the peer.

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