The as-number command configures an AS number for a VPN instance.
The undo as-number command restores the default setting.
By default, a VPN instance uses the AS number of BGP.
Parameter | Description | Value |
---|---|---|
vrf-as |
Specifies the number of an AS. |
For an integral AS number, the value is an integer ranging from 1 to 4294967295. For an AS number in dotted notation, the value is in the format of x.y, where x is an integer that ranges from 1 to 65535, and y is an integer ranging from 0 to 65535. |
Usage Scenario
During network transfer or service identification, a device needs to be simulated as multiple BGP devices logically. In this case, you can run the as-number command to configure an AS number for each VPN instance.
After the as-number command is used:Prerequisites
If a BGP peer or a BGP peer group is configured in the VPN instance, you need to delete the configuration of the BGP peer or peer group before configuring or deleting an AS number.
Precautions
If a VPN instance has been configured with an independent AS number, no confederation can be configured. When configuring a confederation, you cannot configure an independent AS number for a VPN instance.
The independent AS number configured in the VPN instance view cannot be the same as the AS number configured in the BGP view. This command cannot be configured in the BGP YANG management mode. To configure an independent AS number for the VPN instance IPv4 address family, run the as-number ipv4 ipv4-as command in the BGP-VPN instance view.<HUAWEI> system-view [~HUAWEI] ip vpn-instance vpn1 [*HUAWEI-vpn-instance-vpn1] ipv4-family [*HUAWEI-vpn-instance-vpn1-af-ipv4] route-distinguisher 100:1 [*HUAWEI-vpn-instance-vpn1-af-ipv4] quit [*HUAWEI-vpn-instance-vpn1] quit [*HUAWEI] bgp 100 [*HUAWEI-bgp] ipv4-family vpn-instance vpn1 [*HUAWEI-bgp-vpn1] as-number 65001