< Home

vpn-target (VSI-BGPAD view)

Function

The vpn-target command associates a VSI in a BGP AD VPLS domain with one or more VPN targets.

The undo vpn-target command removes the VPN targets associated with the VSI.

By default, a VSI is not associated with any VPN target. The association must be configured when a VSI is created.

Format

vpn-target vpn-target &<1-16> [ both | export-extcommunity | import-extcommunity ]

undo vpn-target { all | vpn-target &<1-16> } [ both | export-extcommunity | import-extcommunity ]

Parameters

Parameter Description Value
vpn-target Associates a VPN target with a VSI. The format of a VPN target can be one of the following:
  • 16-bit AS number:32-bit user-defined number. For example, 1:3. The AS number ranges from 0 to 65535, and the user-defined number ranges from 0 to 4294967295. The AS number and user-defined number cannot be both 0. This means that the VPN target value cannot be 0:0.

  • 32-bit IP address:16-bit user-defined number. For example, 192.168.122.15:1. The IP address ranges from 0.0.0.0 to 255.255.255.255, and the user-defined number ranges from 0 to 65535.

  • Integral 4-byte AS number:2-byte user-defined number, for example, 65537:3. An AS number ranges from 65536 to 4294967295. A user-defined number ranges from 0 to 65535. The AS number and user-defined number cannot be both 0s. That is, a VPN target cannot be 0:0.

  • 4-byte AS number in dotted notation:2-byte user-defined number, for example, 0.0:3 or 0.1:0. A 4-byte AS number in dotted notation is in the format of x.y, where x and y are integers that range from 1 to 65535 and from 0 to 65535, respectively. A user-defined number ranges from 0 to 65535. The AS number and user-defined number cannot be both 0s. That is, a VPN target cannot be 0.0:0.

both Specifies the extended community attributes of the received and sent routing information. -
export-extcommunity Specifies the extended community attributes carried in routing information to be sent. -
import-extcommunity Receives routing information carrying specified extended community attributes. -
all Deletes all VPN targets. -

Views

VSI-BGPAD view

Default Level

2: Configuration level

Usage Guidelines

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

The VPLS ID has been configured using the vpls-id vpls-id command in the VSI-BGPAD view.

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.

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.

Example

# Configure a VSI named company2, and associate the VSI with import VPN targets 4:4 and 5:5 and with export VPN targets 3:3 and 5:5.

<HUAWEI> system-view
[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
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >