< Home

peer substitute-as

Function

The peer substitute-as command substitutes the AS number of the specified peer in the as-path with the local AS number.

The undo peer substitute-as command cancels the configuration.

By default, the substitution of the AS number is disabled.

Format

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

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

Parameters

Parameter Description Value

group-name

Specifies the name of the peer group. It is case-sensitive.

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 address is a 32-digit hexadecimal number in the X:X:X:X:X:X:X:X format.

  • ipv4-address is valid only in the BGP-VPN instance IPv4 address family view.

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

Views

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

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

In a scenario where VPN sites in the same site or those that have different private AS numbers communicate through the BGP/MPLS IP VPN backbone network, if a CE and its connected PE in a VPN site establish an EBGP connection, VPN routes from other VPN sites may carry the AS number of this VPN site. As a result, the CE discards the VPN routes, causing a failure in VPN site communication. To prevent this situation from occurring, run the peer substitute-as command on the PE to enable the AS number substitute function.

Prerequisites

The peer as-number command has been used to create a peer or peer group.

Precautions

In case of CE multi-homing, enabling the AS number substitute function may lead to a routing loop within a VPN site. Then you need to configure the peer soo command to prevent the routing loop.

Example

# Substitute the AS number of peers in the AS_Path for the local AS number.

<sysname> system-view
[sysname] bgp 100
[sysname-bgp] ipv4-family vpn-instance vpn1
[sysname-bgp-vpn1] peer 1.1.1.2 as-number 200
[sysname-bgp-vpn1] peer 1.1.1.2 substitute-as
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >