
379
Parameters
vpn-target
&<1-8>: Adds VPN target extended community attributes to the import VPN target extended
community attribute list (Import Target) or export VPN target extended community attribute list (Export
Target). &<1-8> means that you can add up to eight VPN targets.
A VPN target attribute can be a string of 3 to 21 characters in one the following formats:
•
16-bit AS number:32-bit user-defined number. For example, 101:3.
•
32-bit IP address:16-bit user-defined number. For example, 192.168.122.15:1.
•
32-bit AS number:16-bit user-defined number, where the AS number must not be less than 65,536.
For example, 65536:1.
both
: Uses the specified VPN targets as both import targets and export targets. The
both
keyword is also
used when you do not specify any of
both
,
export-extcommunity
, and
import-extcommunity
.
export-extcommunity
: Uses the specified VPN targets as export targets.
import-extcommunity
: Uses the specified VPN targets as import targets.
all
: Removes all VPN targets.
Examples
# Configure VPN targets for VPN instance
vpn1
.
<Sysname> system-view
[Sysname] ip vpn-instance vpn1
[Sysname-vpn-instance-vpn1] vpn-target 3:3 export-extcommunity
[Sysname-vpn-instance-vpn1] vpn-target 4:4 import-extcommunity
[Sysname-vpn-instance-vpn1] vpn-target 5:5 both
# Configure VPN targets for the IPv6 VPN of VPN instance
vpn3
.
<Sysname> system-view
[Sysname] ip vpn-instance vpn3
[Sysname-vpn-instance-vpn3] ipv6-family
[Sysname-vpn-ipv6-vpn3] vpn-target 3:3 export-extcommunity
[Sysname-vpn-ipv6-vpn3] vpn-target 4:4 import-extcommunity
[Sysname-vpn-ipv6-vpn3] vpn-target 5:5 both