peer substitute-as (BGP-VPN instance IPv4 address family view) (group)

Function

The peer substitute-as 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.

Format

peer group-name substitute-as

undo peer group-name substitute-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.

Views

BGP-labeled VPN instance IPv4 address family view, BGP-VPN instance IPv4 address family view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
bgp write

Usage Guidelines

Usage Scenario

In a L3VPN 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.

On a BGP public network, two devices have the same AS number and the same EBGP peer. After one of the two devices learns a route of the other device from the EBGP peer, the route is discarded because it carries an AS number that is the same as the local one. To address this problem, run the peer substitute-as command on the EBGP peer.

Prerequisites

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.

On BGP public networks, if three or more BGP peers form a ring network, the peer substitute-as command cannot be run; otherwise, a routing loop may occur.

Example

# Configure a device to replace the AS number of a specified peer group in the AS_Path of a route with the local AS number.
<HUAWEI> system-view
[~HUAWEI] ip vpn-instance vpna
[*HUAWEI-vpn-instance-vpna] ipv4-family
[*HUAWEI-vpn-instance-vpna-af-ipv4] route-distinguisher 100:1
[*HUAWEI-vpn-instance-vpna-af-ipv4] quit
[*HUAWEI-vpn-instance-vpna] quit
[*HUAWEI] bgp 100
[*HUAWEI-bgp] vpn-instance vpna
[*HUAWEI-bgp-instance-vpna] group test external
[*HUAWEI-bgp-instance-vpna] quit
[*HUAWEI-bgp] ipv4-labeled-unicast vpn-instance vpna
[*HUAWEI-bgp-labeled-vpna] peer test enable
[*HUAWEI-bgp-labeled-vpna] peer test substitute-as
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >