peer substitute-as
Use peer substitute-as to replace the AS number of a peer or peer group in the AS_PATH attribute with the local AS number.
Use undo peer substitute-as to restore the default.
Syntax
peer { group-name | ip-address | ipv6-address } substitute-as
undo peer { group-name | ip-address | ipv6-address } substitute-as
Default
The AS number of a peer or peer group in the AS_PATH attribute is not replaced.
Views
BGP view, BGP-VPN instance view
Predefined user roles
network-admin
mdc-admin
Parameters
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer group must have been created.
ip-address: Specifies a peer by its IP address. The peer must have been created.
ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.
Usage guidelines
In MPLS L3VPN, if EBGP is used between PE and CE, sites in different geographical areas must have different AS numbers assigned to ensure correct route advertisement. If different CEs use the same AS number, you must configure the relevant PE to replace the AS number of the CE as its own AS number to ensure correct advertisement of private network routes.
Examples
# In BGP view, substitute the local AS number for the AS number of peer 1.1.1.1.
<Sysname> system-view [Sysname] bgp 100 [Sysname-bgp] peer 1.1.1.1 substitute-as
# In BGP-VPN instance view, substitute the local AS number for the AS number of peer 1::1.
<Sysname> system-view [Sysname] bgp 100 [Sysname-bgp] ip vpn-instance vpn1 [Sysname-bgp-vpn1] peer 1::1 substitute-as