< 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 restores the default setting.

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 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. 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 x.y format. Here, "x" and "y" are integers that range from 1 to 65535 and 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

The peer fake-as command is often used for network deployment changing of carriers' networks. For example, if carrier A purchases the network of carrier B and the networks of the two carriers belong to different ASs, the ASs of the two carriers need to be combined and the AS number of carrier B needs to be changed to the AS number of carrier A. BGP peers (in another AS) of devices on carrier B's network may not be willing to have their BGP configurations changed or changed immediately during network combination. As a result, the connections with these BGP peers will be interrupted.

To ensure that the ASs are combined properly, you can run the peer fake-as command on the ASBR on carrier's B network to set the AS number of carrier B to the fake AS number of carrier A. This setting enables the BGP peers of devices in carrier B's network to use the fake AS number to set up connections.

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

Peers have been created by using the peer as-number command.

Precautions

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

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.

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.

Example

# Set a 2-byte fake AS number for a peer.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] peer 10.1.1.2 as-number 200 
[HUAWEI-bgp] peer 10.1.1.2 fake-as 99

# Set a 4-byte fake AS number for a peer.

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