No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search


To have a better experience, please upgrade your IE browser.


Command Reference

CloudEngine 8800, 7800, 6800, and 5800 V200R002C50

This document describes all the configuration commands of the device, including the command function, syntax, parameters, views, default level, usage guidelines, examples, and related commands.
Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
peer substitute-as

peer substitute-as


The peer substitute-as command enables AS number substitution. This command enables a device to replace the AS number of the peer specified in the AS_Path attribute with the local AS number.

The undo peer substitute-as command disables AS number substitution.

By default, AS number substitution is disabled.


CE6810LI series do not support this command.


peer { group-name | ipv4-address | ipv6-address } substitute-as

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


Parameter Description Value
group-name Specifies the name of a peer group. The name is a string of 1 to 47 case-sensitive characters except spaces. When double quotation marks are used to include 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 address is in the format of X:X:X:X:X:X:X:X.


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

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

In a BGP/MPLS IP VPN scenario, if the ASs to which two VPN sites belong use private AS numbers, the AS numbers of the two VPN sites may be the same. If a CE in a VPN site sends a VPN route to the connected PE using EBGP and the PE then sends the route to the remote PE, the remote CE will discard the route because the AS number carried by the route is the same as the local AS number. As a result, different sites of the same VPN cannot communicate. The peer substitute-as command can be used on the PE to enable AS number substitution to address this problem. After that, the PE replaces the AS number carried in the VPN route with the local AS number. As a result, the remote CE will not discard the route due to identical AS numbers.

Pre-configuration Tasks

Run the peer as-number command to create a peer or configure an AS number for a specified peer group.


Enabling BGP AS number substitution may cause route loops in a CE multi-homing network. The peer soo command must be run to prevent a routing loop in a VPN site.


# Configure a device to replace the AS number of a specified peer in the AS_Path of a route with the local AS number.

<HUAWEI> system-view
[~HUAWEI] bgp 100
[*HUAWEI-bgp] ipv4-family vpn-instance vpn1
[*HUAWEI-bgp-vpn1] peer as-number 200
[*HUAWEI-bgp-vpn1] peer substitute-as
Related Topics
Updated: 2019-03-21

Document ID: EDOC1000166501

Views: 70565

Downloads: 376

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Previous Next