The as-number ipv4 command configures an independent AS number for an IPv4 peer of a VPN instance.
The undo as-number ipv4 command restores the default configuration.
The as-number ipv6 command configures an independent AS number for an IPv6 peer of a VPN instance.
The undo as-number ipv6 command restores the default configuration.
By default, a VPN instance uses the AS number of BGP.
Parameter | Description | Value |
---|---|---|
ipv4-as |
Specifies the AS number of an IPv4 peer. |
The value is an integer that ranges from 1 to 4294967295. The value is in dotted notation in the format of x.y, where x is an integer ranging from 1 to 65535 and y is an integer ranging from 0 to 65535. |
ipv6-as |
Specifies the AS number of an IPv6 peer. |
The value is an integer that ranges from 1 to 4294967295. The value is in dotted notation in the format of x.y, where x is an integer ranging from 1 to 65535 and y is an integer ranging from 0 to 65535. |
Usage Scenario
If a physical device needs to be simulated as multiple logical BGP devices during network migration or service identification, you can run the as-number { ipv4 | ipv6 } command to configure an independent AS number for each VPN instance when VPN instances are managed in YANG mode.
After the command is run:Prerequisites
If a BGP peer or a BGP peer group has been configured in the VPN instance, delete the configuration of the BGP peer or peer group before configuring or deleting an AS number.
Precautions
<HUAWEI> system-view [~HUAWEI] ip vpn-instance vpna [*HUAWEI-vpn-instance-vpna] route-distinguisher 1:4 [*HUAWEI-vpn-instance-vpna-af-ipv4] vpn-target 10:1 [*HUAWEI-vpn-instance-vpna-af-ipv4] quit [*HUAWEI-vpn-instance-vpna] ipv6-family [*HUAWEI-vpn-instance-vpna-af-ipv6] route-distinguisher 1:4 [*HUAWEI-vpn-instance-vpna-af-ipv6] vpn-target 10:1 [*HUAWEI-vpn-instance-vpna-af-ipv6] quit [*HUAWEI-vpn-instance-vpna] quit [*HUAWEI] bgp 100 [*HUAWEI-bgp] vpn-instance vpna [*HUAWEI-bgp-instance-vpna] as-number ipv4 65001 [*HUAWEI-bgp-instance-vpna] as-number ipv6 65001