The vpn-target command associates a VSI with one or more VPN targets.
The undo vpn-target command restores the default configuration.
By default, a VSI is not associated with any VPN targets.
Parameter | Description | Value |
---|---|---|
vpnTargetValue |
Specifies a VPN target. |
The available VPN target formats are as follows:
|
both |
Indicates the VPN target carried by both incoming and outgoing routes. |
- |
import-extcommunity |
Indicates the VPN target carried by incoming routes. |
- |
export-extcommunity |
Indicates the VPN target carried by outgoing routes. |
- |
all |
Deletes all VPN targets. |
- |
Usage Scenario
VPN targets are used on a BGP VPLS network to control route advertisement and communication between nodes:
Prerequisites
The VSI-BGP view has been displayed using the pwsignal bgp command.
Configuration Impact
In a BGP VPLS domain, two PEs can communicate only if the import VPN target of one PE is the same as the export VPN target of the other PE.
Precautions
In a BGP VPLS domain, a PW can be established between two PEs only if the import VPN target of one PE is the same as the export VPN target of the other PE.
<HUAWEI> system-view [~HUAWEI] mpls [*HUAWEI-mpls] quit [*HUAWEI] mpls l2vpn [*HUAWEI-l2vpn] quit [*HUAWEI] vsi vsi1 auto [*HUAWEI-vsi-vsi1] pwsignal bgp [*HUAWEI-vsi-vsi1-bgp] route-distinguisher 1:1 [*HUAWEI-vsi-vsi1-bgp] vpn-target 100:100 import-extcommunity [*HUAWEI-vsi-vsi1-bgp] vpn-target 200:200 export-extcommunity