The vpn-target command associates a VSI in a BGP AD VPLS domain with one or more VPN targets.
The undo vpn-target command deletes the association between a VSI and VPN targets.
By default, a VSI is not associated with any VPN target. The association must be configured when a VSI is created.
Parameter | Description | Value |
---|---|---|
vpnTargetValue |
Associates a VPN target with a VSI. |
The format of a VPN target can be one of the following:
|
both |
Specifies the extended community attributes of the received and sent routing information. |
- |
import-extcommunity |
Receives routing information carrying specified extended community attributes. |
- |
export-extcommunity |
Specifies the extended community attributes carried in routing information to be sent. |
- |
all |
Deletes all VPN targets. |
- |
Usage Scenario
VPN targets can be used in a BGP AD VPLS domain to control the route advertisement and communication between nodes. When a PE advertises routing information to other PEs of different VSIs, it adds export VPN targets to the routing information. When the PE receives routing information from other PEs, it uses import VPN targets to determine whether to import the routing information to the VSIs on it.
Prerequisites
A VPLS ID has been configured for the VSI.
Configuration Impact
After the vpn-target command is run, the PE only advertises the routing information that contains the export VPN targets and imports the routing information that contains the import VPN targets. Two PEs are allowed to communicate with each other only when the VPN targets carried in their exchanged routing information match.
Precautions
A PW can be set up between two VSIs in a BGP AD VPLS domain only when the import VPN target associated with a VSI is the same as the export VPN target associated with the other VSI.
<HUAWEI> system-view [~HUAWEI] mpls [*HUAWEI-mpls] quit [*HUAWEI] mpls l2vpn [*HUAWEI-l2vpn] quit [*HUAWEI] vsi company2 [*HUAWEI-vsi-company2] bgp-ad [*HUAWEI-vsi-company2-bgpad] vpls-id·100:1 [*HUAWEI-vsi-company2-bgpad] vpn-target 3:3 export-extcommunity [*HUAWEI-vsi-company2-bgpad] vpn-target 4:4 import-extcommunity [*HUAWEI-vsi-company2-bgpad] vpn-target 5:5 both